diff options
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/gpio-target.h')
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/gpio-target.h | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/gpio-target.h b/firmware/target/arm/imx31/gigabeat-s/gpio-target.h index 4903d0f631..543b25f244 100644 --- a/firmware/target/arm/imx31/gigabeat-s/gpio-target.h +++ b/firmware/target/arm/imx31/gigabeat-s/gpio-target.h | |||
@@ -23,34 +23,33 @@ | |||
23 | #ifndef GPIO_TARGET_H | 23 | #ifndef GPIO_TARGET_H |
24 | #define GPIO_TARGET_H | 24 | #define GPIO_TARGET_H |
25 | 25 | ||
26 | /* MC13783 GPIO pin info for this target */ | 26 | /* Gigabeat S definitions for static GPIO event registration */ |
27 | #define MC13783_GPIO_IMR GPIO1_IMR | 27 | #include "gpio-imx31.h" |
28 | #define MC13783_GPIO_NUM GPIO1_NUM | 28 | |
29 | #define MC13783_GPIO_ISR GPIO1_ISR | 29 | #ifdef DEFINE_GPIO_VECTOR_TABLE |
30 | #define MC13783_GPIO_LINE 31 | 30 | |
31 | 31 | GPIO_VECTOR_TBL_START() | |
32 | /* SI4700 GPIO STC/RDS pin info for this target */ | 32 | /* mc13783 keeps the PRIINT high (no low pulse) if other unmasked |
33 | #define SI4700_GPIO_STC_RDS_IMR GPIO1_IMR | 33 | * interrupts become active when clearing them or if a source being |
34 | #define SI4700_GPIO_STC_RDS_NUM GPIO1_NUM | 34 | * cleared becomes active at that time. Edge-detection will not get |
35 | #define SI4700_GPIO_STC_RDS_ISR GPIO1_ISR | 35 | * a rising edge in that case so use high-level sense. */ |
36 | #define SI4700_GPIO_STC_RDS_LINE 27 | 36 | GPIO_EVENT_VECTOR(GPIO1_31, GPIO_SENSE_HIGH_LEVEL) |
37 | #if CONFIG_TUNER | ||
38 | /* Generates a 5ms low pulse on the line - detect the falling edge */ | ||
39 | GPIO_EVENT_VECTOR(GPIO1_27, GPIO_SENSE_FALLING) | ||
40 | #endif /* CONFIG_TUNER */ | ||
41 | GPIO_VECTOR_TBL_END() | ||
37 | 42 | ||
38 | #define GPIO1_INT_PRIO INT_PRIO_DEFAULT | 43 | #define GPIO1_INT_PRIO INT_PRIO_DEFAULT |
39 | 44 | ||
40 | /* Declare event indexes in priority order in a packed array */ | 45 | #endif /* DEFINE_GPIO_VECTOR_TABLE */ |
41 | enum gpio_event_ids | 46 | |
42 | { | 47 | #define INT_MC13783 GPIO1_31_EVENT_CB |
43 | /* GPIO1 event IDs */ | 48 | #define MC13783_EVENT_ID GPIO1_31_ID |
44 | MC13783_EVENT_ID = GPIO1_EVENT_FIRST, | 49 | |
45 | SI4700_STC_RDS_EVENT_ID, | 50 | #if CONFIG_TUNER |
46 | GPIO1_NUM_EVENTS = 2, | 51 | #define INT_SI4700_RDS GPIO1_27_EVENT_CB |
47 | /* GPIO2 event IDs */ | 52 | #define SI4700_EVENT_ID GPIO1_27_ID |
48 | /* none defined */ | 53 | #endif /* CONFIG_TUNER */ |
49 | /* GPIO3 event IDs */ | ||
50 | /* none defined */ | ||
51 | }; | ||
52 | |||
53 | void mc13783_event(void); | ||
54 | void si4700_stc_rds_event(void); | ||
55 | 54 | ||
56 | #endif /* GPIO_TARGET_H */ | 55 | #endif /* GPIO_TARGET_H */ |