Match on RNG interrupt names to support other RNG peripherals
This commit is contained in:
parent
2e6c550355
commit
8172db6d8e
@ -3,6 +3,7 @@ import yaml
|
|||||||
import re
|
import re
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
import toml
|
import toml
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from glob import glob
|
from glob import glob
|
||||||
@ -113,10 +114,9 @@ for chip in chips.values():
|
|||||||
f.write(f'impl_usart_pin!({name}, CkPin, {pin}, {func});')
|
f.write(f'impl_usart_pin!({name}, CkPin, {pin}, {func});')
|
||||||
|
|
||||||
if block_mod == 'rng':
|
if block_mod == 'rng':
|
||||||
if 'RNG' in chip['interrupts']:
|
for irq in chip['interrupts']:
|
||||||
f.write(f'impl_rng!({name}, RNG);')
|
if re.search('RNG', irq):
|
||||||
else:
|
f.write(f'impl_rng!({name}, ' + irq + f');')
|
||||||
f.write(f'impl_rng!({name}, HASH_RNG);')
|
|
||||||
|
|
||||||
if block_mod == 'spi':
|
if block_mod == 'spi':
|
||||||
if 'clock' in peri:
|
if 'clock' in peri:
|
||||||
|
Loading…
Reference in New Issue
Block a user