Merge pull request #60 from embassy-rs/usart1-F0
F0: Manually add usart1 clock
This commit is contained in:
commit
37e44246da
9
parse.py
9
parse.py
@ -397,9 +397,11 @@ def match_rng_clock(rcc):
|
||||
return clock
|
||||
return None
|
||||
|
||||
|
||||
all_mcu_files = {}
|
||||
per_mcu_files = {}
|
||||
|
||||
|
||||
def parse_documentations():
|
||||
print("linking files and documents")
|
||||
with open('sources/mcufinder/files.json', 'r') as j:
|
||||
@ -415,7 +417,7 @@ def parse_documentations():
|
||||
})
|
||||
|
||||
with open('sources/mcufinder/mcus.json', 'r') as j:
|
||||
mcus = json.load(j);
|
||||
mcus = json.load(j)
|
||||
for mcu in mcus['MCUs']:
|
||||
rpn = mcu['RPN']
|
||||
if rpn not in per_mcu_files:
|
||||
@ -423,6 +425,7 @@ def parse_documentations():
|
||||
for file in mcu['files']:
|
||||
per_mcu_files[rpn].append(file['file_id'])
|
||||
|
||||
|
||||
def documents_for(chip_name, type):
|
||||
docs = []
|
||||
for id in per_mcu_files[chip_name]:
|
||||
@ -437,6 +440,7 @@ def documents_for(chip_name, type):
|
||||
|
||||
return docs
|
||||
|
||||
|
||||
def parse_headers():
|
||||
os.makedirs('sources/headers_parsed', exist_ok=True)
|
||||
print('loading headers...')
|
||||
@ -511,7 +515,6 @@ def parse_chips():
|
||||
rcc = removesuffix(rcc, '-rcc_v1_0')
|
||||
rcc = removesuffix(rcc, '_rcc_v1_0')
|
||||
|
||||
|
||||
core = r['Core']
|
||||
family = r['@Family']
|
||||
|
||||
@ -673,6 +676,8 @@ def parse_chips():
|
||||
p['clock'] = "APB4"
|
||||
elif chip['family'] == 'STM32H7' and pname.startswith('I2C'):
|
||||
p['clock'] = "APB1"
|
||||
elif chip['family'] == 'STM32F0' and pname == 'USART1':
|
||||
p['clock'] = "APB2"
|
||||
|
||||
if block := match_peri(chip_name+':'+pname+':'+pkind):
|
||||
p['block'] = block
|
||||
|
Loading…
x
Reference in New Issue
Block a user