aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2021-05-31 03:58:03 +0200
committerDario Nieuwenhuis <[email protected]>2021-05-31 03:58:03 +0200
commit553432a8e89c65683f13494befaabdb9c8c18628 (patch)
tree969cddf087f124b50c25ede495fdc8e228c85ce3
parentb4fcb8168717f9a16c25fe055abea5e2e33b790a (diff)
stm32: remove unused stuff from gen.py
-rw-r--r--embassy-stm32/gen.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/embassy-stm32/gen.py b/embassy-stm32/gen.py
index 0b6af1665..b2b95ca8f 100644
--- a/embassy-stm32/gen.py
+++ b/embassy-stm32/gen.py
@@ -19,10 +19,6 @@ except:
19chip_name = chip_name.upper() 19chip_name = chip_name.upper()
20with open(f'{data_path}/chips/{chip_name}.yaml', 'r') as f: 20with open(f'{data_path}/chips/{chip_name}.yaml', 'r') as f:
21 chip = yaml.load(f, Loader=yaml.CSafeLoader) 21 chip = yaml.load(f, Loader=yaml.CSafeLoader)
22chip['name'] = chip['name'].lower()
23chip['features'] = set()
24family = chip["family"].lower().replace('+', 'p')
25chip['features'].add(f'_{family}')
26 22
27# ======= load GPIO AF 23# ======= load GPIO AF
28with open(f'{data_path}/gpio_af/{chip["gpio_af"]}.yaml', 'r') as f: 24with open(f'{data_path}/gpio_af/{chip["gpio_af"]}.yaml', 'r') as f:
@@ -32,7 +28,6 @@ with open(f'{data_path}/gpio_af/{chip["gpio_af"]}.yaml', 'r') as f:
32with open(output_file, 'w') as f: 28with open(output_file, 'w') as f:
33 singletons = [] # USART1, PA5, EXTI8 29 singletons = [] # USART1, PA5, EXTI8
34 exti_interrupts = [] # EXTI IRQs, EXTI0, EXTI4_15 etc. 30 exti_interrupts = [] # EXTI IRQs, EXTI0, EXTI4_15 etc.
35 peripheral_versions = {} # usart -> v1, syscfg -> f4
36 pins = set() # set of all present pins. PA4, PA5... 31 pins = set() # set of all present pins. PA4, PA5...
37 32
38 # ========= peripherals 33 # ========= peripherals
@@ -51,12 +46,6 @@ with open(output_file, 'w') as f:
51 for b in block_name_unparsed.split('_'): 46 for b in block_name_unparsed.split('_'):
52 block_name += b.capitalize() 47 block_name += b.capitalize()
53 48
54 # Check all peripherals have the same version: it's not OK for the same chip to use both usart_v1 and usart_v2
55 if old_version := peripheral_versions.get(block_mod):
56 if old_version != block_version:
57 raise Exception(f'Peripheral {block_mod} has two versions: {old_version} and {block_version}')
58 peripheral_versions[block_mod] = block_version
59
60 custom_singletons = False 49 custom_singletons = False
61 50
62 if block_mod == 'usart': 51 if block_mod == 'usart':