diff options
| author | Ulf Lilleengen <[email protected]> | 2021-05-19 10:37:52 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-05-21 18:38:33 +0200 |
| commit | 8172db6d8e41e526c08454c233c4be2d74cd0818 (patch) | |
| tree | 6eed64eeb3034202259d67717ed69caf5226f677 | |
| parent | 2e6c55035576864a380539006cc91af9b90db0d3 (diff) | |
Match on RNG interrupt names to support other RNG peripherals
| -rw-r--r-- | embassy-stm32/gen.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/embassy-stm32/gen.py b/embassy-stm32/gen.py index 6c931e4a7..97773bb45 100644 --- a/embassy-stm32/gen.py +++ b/embassy-stm32/gen.py | |||
| @@ -3,6 +3,7 @@ import yaml | |||
| 3 | import re | 3 | import re |
| 4 | import json | 4 | import json |
| 5 | import os | 5 | import os |
| 6 | import re | ||
| 6 | import toml | 7 | import toml |
| 7 | from collections import OrderedDict | 8 | from collections import OrderedDict |
| 8 | from glob import glob | 9 | from glob import glob |
| @@ -113,10 +114,9 @@ for chip in chips.values(): | |||
| 113 | f.write(f'impl_usart_pin!({name}, CkPin, {pin}, {func});') | 114 | f.write(f'impl_usart_pin!({name}, CkPin, {pin}, {func});') |
| 114 | 115 | ||
| 115 | if block_mod == 'rng': | 116 | if block_mod == 'rng': |
| 116 | if 'RNG' in chip['interrupts']: | 117 | for irq in chip['interrupts']: |
| 117 | f.write(f'impl_rng!({name}, RNG);') | 118 | if re.search('RNG', irq): |
| 118 | else: | 119 | f.write(f'impl_rng!({name}, ' + irq + f');') |
| 119 | f.write(f'impl_rng!({name}, HASH_RNG);') | ||
| 120 | 120 | ||
| 121 | if block_mod == 'spi': | 121 | if block_mod == 'spi': |
| 122 | if 'clock' in peri: | 122 | if 'clock' in peri: |
