add macros for number of adcs and dacs

This commit is contained in:
Peter McGoron 2022-07-13 15:35:42 -04:00
parent 60d9b63163
commit 32b96eaf9a
1 changed files with 6 additions and 3 deletions

View File

@ -12,9 +12,12 @@ def get_reg(j, name, num, pos):
j = json.load(open("csr.json")) j = json.load(open("csr.json"))
print('''#pragma once print('''
typedef volatile uint32_t *csr_t; #pragma once
''') typedef volatile uint32_t *csr_t;
#define ADC_MAX 8
#define DAC_MAX 8
''')
for conv in iter(reg_names): for conv in iter(reg_names):
for reg in reg_names[conv]: for reg in reg_names[conv]: