Merge pull request #46 from bobmcwhirter/adc_common_more_families
Adc common more families
This commit is contained in:
commit
83b10acc02
4
data/extra/family/STM32L4.yaml
Normal file
4
data/extra/family/STM32L4.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
peripherals:
|
||||
VREFINTCAL:
|
||||
address: 0x1FFF75AA
|
||||
block: vrefintcal_v1/VREFINTCAL
|
4
data/extra/family/STM32WB.yaml
Normal file
4
data/extra/family/STM32WB.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
peripherals:
|
||||
VREFINTCAL:
|
||||
address: 0x1FFF75AA
|
||||
block: vrefintcal_v1/VREFINTCAL
|
12
parse.py
12
parse.py
@ -410,8 +410,9 @@ def parse_chips():
|
||||
if pname in FAKE_PERIPHERALS:
|
||||
continue
|
||||
if pname.startswith('ADC'):
|
||||
if not pname + '_COMMON' in peris:
|
||||
peris[pname + '_COMMON'] = ip['@Name'] + '_COMMON:'+removesuffix(ip['@Version'], '_Cube')
|
||||
if not 'ADC_COMMON' in peris:
|
||||
print(f'adding ADC_COMMON')
|
||||
peris['ADC_COMMON'] = 'ADC_COMMON:'+removesuffix(ip['@Version'], '_Cube')
|
||||
peris[pname] = pkind
|
||||
pins[pname] = []
|
||||
|
||||
@ -462,6 +463,13 @@ def parse_chips():
|
||||
peris = {}
|
||||
for pname, pkind in chip['peripherals'].items():
|
||||
addr = h['defines'].get(pname)
|
||||
if addr is None:
|
||||
if pname == 'ADC_COMMON':
|
||||
addr = h['defines'].get('ADC1_COMMON')
|
||||
if addr is None:
|
||||
addr = h['defines'].get('ADC12_COMMON')
|
||||
if addr is None:
|
||||
addr = h['defines'].get('ADC123_COMMON')
|
||||
if addr is None:
|
||||
continue
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user