forked from len0rd/rockbox
x1000: GPIO refactor
The GPIO API was pretty clunky and pin settings were decentralized, making it hard to see what was happening and making GPIO stuff look like a mess, frankly. Instead of passing clunky (port, pin) pairs everywhere, GPIOs are now identified with a single int. The extra overhead should be minimal as GPIO configuration is generally not on a performance-critical path. Pin assignments are now mostly consolidated in gpio-target.h and put in various tables so gpio_init() can assign most pins at boot time. Most drivers no longer need to touch GPIOs and basic pin I/O stuff can happen without config since pins are put into the right state. IRQ pins still need to be configured manually before use. Change-Id: Ic5326284b0b2a2f613e9e76a41cb50e24af3aa47
This commit is contained in:
parent
695d1701cd
commit
e85bc74b30
17 changed files with 281 additions and 196 deletions
|
|
@ -1659,7 +1659,9 @@ target/mips/ingenic_x1000/pwm-x1000.c
|
|||
target/mips/ingenic_x1000/sfc-x1000.c
|
||||
target/mips/ingenic_x1000/system-x1000.c
|
||||
target/mips/ingenic_x1000/timer-x1000.c
|
||||
#ifndef USB_NONE
|
||||
target/mips/ingenic_x1000/usb-x1000.c
|
||||
#endif
|
||||
#if (CONFIG_STORAGE & (STORAGE_SD|STORAGE_MMC|STORAGE_ATA))
|
||||
target/mips/ingenic_x1000/msc-x1000.c
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue