diff options
Diffstat (limited to 'firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c')
-rw-r--r-- | firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c b/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c index c3f1908511..f89297b80c 100644 --- a/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c +++ b/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c | |||
@@ -144,7 +144,7 @@ void button_init_device(void) | |||
144 | bool button_hold(void) | 144 | bool button_hold(void) |
145 | { | 145 | { |
146 | /* B0P04: #hold */ | 146 | /* B0P04: #hold */ |
147 | return !imx233_pinctrl_get_gpio_mask(0, 0x10); | 147 | return !imx233_pinctrl_get_gpio(0, 4); |
148 | } | 148 | } |
149 | 149 | ||
150 | int button_read_device(void) | 150 | int button_read_device(void) |
@@ -172,10 +172,9 @@ int button_read_device(void) | |||
172 | /* B2P07: #volume- | 172 | /* B2P07: #volume- |
173 | * B2P08: #volume+ | 173 | * B2P08: #volume+ |
174 | * PSWITCH: power */ | 174 | * PSWITCH: power */ |
175 | uint32_t mask = imx233_pinctrl_get_gpio_mask(2, 0x180); | 175 | if(!imx233_pinctrl_get_gpio(2, 7)) |
176 | if(!(mask & 0x80)) | ||
177 | res |= BUTTON_VOL_DOWN; | 176 | res |= BUTTON_VOL_DOWN; |
178 | if(!(mask & 0x100)) | 177 | if(!imx233_pinctrl_get_gpio(2, 8)) |
179 | res |= BUTTON_VOL_UP; | 178 | res |= BUTTON_VOL_UP; |
180 | if(BF_RD(POWER_STS, PSWITCH) != 0 && power_ignore_counter == 0) | 179 | if(BF_RD(POWER_STS, PSWITCH) != 0 && power_ignore_counter == 0) |
181 | res |= BUTTON_POWER; | 180 | res |= BUTTON_POWER; |