kasli_generic: expose peripheral_processors dictionary. Closes #1403

This commit is contained in:
Sebastien Bourdeauducq 2019-12-10 10:30:06 +08:00 committed by Sébastien Bourdeauducq
parent 5211534619
commit 8d61cd8344
1 changed files with 11 additions and 9 deletions

View File

@ -95,8 +95,7 @@ def peripheral_grabber(module, peripheral):
eem.Grabber.add_std(module, port, port_aux, port_aux2)
def add_peripherals(module, peripherals):
peripheral_processors = {
peripheral_processors = {
"dio": peripheral_dio,
"urukul": peripheral_urukul,
"novogorny": peripheral_novogorny,
@ -104,7 +103,10 @@ def add_peripherals(module, peripherals):
"suservo": peripheral_suservo,
"zotino": peripheral_zotino,
"grabber": peripheral_grabber,
}
}
def add_peripherals(module, peripherals):
for peripheral in peripherals:
peripheral_processors[peripheral["type"]](module, peripheral)