Stub in RNG impl.

This commit is contained in:
Bob McWhirter
2021-04-26 14:11:46 -04:00
parent dc919c236d
commit 0713947d67
270 changed files with 20330 additions and 2 deletions

View File

@ -14,7 +14,7 @@ os.chdir(dname)
# ======= load chips
chips = {}
for f in sorted(glob('stm32-data/data/chips/*.yaml')):
if 'STM32F4' not in f:
if 'STM32F4' not in f and 'STM32L4' not in f:
continue
with open(f, 'r') as f:
chip = yaml.load(f, Loader=yaml.SafeLoader)
@ -105,6 +105,9 @@ for chip in chips.values():
if func := funcs.get(f'{name}_CK'):
impls.append(f'impl_usart_pin!({name}, CkPin, {pin}, {func});')
if peri['block'] == 'rng_v1/RNG':
impls.append(f'impl_rng!(0x{peri["address"]:x});')
with open(f'src/chip/{chip["name"]}.rs', 'w') as f:
# TODO uart etc
# TODO import the right GPIO AF map mod