Customizing the On Board Silicon Labs PLLs » gen_regmap.c
1 |
#include <stdio.h>
|
---|---|
2 |
#include <stdlib.h>
|
3 |
|
4 |
#define code
|
5 |
#define FILENAME "PLL.bin"
|
6 |
#include "register_map.h"
|
7 |
|
8 |
int main(int argc, char* argv[]) |
9 |
{
|
10 |
FILE* fid = fopen(FILENAME,"w"); |
11 |
for (int i = 0; i < NUM_REGS_MAX-1; ++i) { |
12 |
fwrite(&Reg_Store[i].Reg_Addr, 1, 1, fid); |
13 |
fwrite(&Reg_Store[i].Reg_Val, 1, 1, fid); |
14 |
fwrite(&Reg_Store[i].Reg_Mask, 1, 1, fid); |
15 |
}
|
16 |
fclose(fid); |
17 |
printf("%s : Done \n", FILENAME); |
18 |
}
|