diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2008-05-21 08:42:11 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2008-05-21 08:42:11 +0000 |
commit | a9c20f5789c13b486d217024a020f9d6163e2d51 (patch) | |
tree | 5da52ca9cc7a28ba21ced042cb739e6160d5f87b /firmware/target/arm/imx31/gigabeat-s/gpio-gigabeat-s.c | |
parent | 5f796087b009fee1ae60904b0355cc7febe3330f (diff) | |
download | rockbox-a9c20f5789c13b486d217024a020f9d6163e2d51.tar.gz rockbox-a9c20f5789c13b486d217024a020f9d6163e2d51.zip |
Gigabeat S:
1) Rework event handling and static registration mechanism. No target-
specific code in mc13783 driver. GPIO event driver interfaces more
cleanly.
2) Somewhat related - enable thread priority for bootloader which is
desireable here (ffs is used for GPIO event enabling anyway and that
goes along with priority).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17593 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/gpio-gigabeat-s.c')
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/gpio-gigabeat-s.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/gpio-gigabeat-s.c b/firmware/target/arm/imx31/gigabeat-s/gpio-gigabeat-s.c index cfbb7fcc4c..64d156407e 100644 --- a/firmware/target/arm/imx31/gigabeat-s/gpio-gigabeat-s.c +++ b/firmware/target/arm/imx31/gigabeat-s/gpio-gigabeat-s.c | |||
@@ -22,18 +22,23 @@ | |||
22 | #include "system.h" | 22 | #include "system.h" |
23 | #include "gpio-imx31.h" | 23 | #include "gpio-imx31.h" |
24 | 24 | ||
25 | extern int mc13783_event(void); | 25 | /* Gigabeat S definitions for static GPIO event registration */ |
26 | 26 | ||
27 | static const struct gpio_event gpio1_events = | 27 | /* Describes single events for each GPIO1 pin */ |
28 | static const struct gpio_event gpio1_events[] = | ||
28 | { | 29 | { |
29 | .line = MC13783_GPIO_LINE, | 30 | [MC13783_EVENT_ID-GPIO1_EVENT_FIRST] = |
30 | .sense = GPIO_SENSE_RISING, | 31 | { |
31 | .callback = mc13783_event, | 32 | .mask = 1 << MC13783_GPIO_LINE, |
33 | .sense = GPIO_SENSE_RISING, | ||
34 | .callback = mc13783_event, | ||
35 | } | ||
32 | }; | 36 | }; |
33 | 37 | ||
38 | /* Describes the events attached to GPIO1 port */ | ||
34 | const struct gpio_event_list gpio1_event_list = | 39 | const struct gpio_event_list gpio1_event_list = |
35 | { | 40 | { |
36 | .priority = 7, | 41 | .ints_priority = 7, |
37 | .count = 1, | 42 | .count = ARRAYLEN(gpio1_events), |
38 | .events = &gpio1_events, | 43 | .events = gpio1_events, |
39 | }; | 44 | }; |