summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c')
-rw-r--r--firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c b/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
index 70355bc24c..7f981b5d68 100644
--- a/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
+++ b/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
@@ -107,7 +107,7 @@ static void mpr121_thread(void)
if(status & 0x80) touchpad_btns |= BUTTON_PLAY;
}
/* enable interrupt */
- imx233_setup_pin_irq(0, 18, true, true, false, &mpr121_irq_cb);
+ imx233_pinctrl_setup_irq(0, 18, true, true, false, &mpr121_irq_cb);
}
}
@@ -122,28 +122,28 @@ void button_init_device(void)
create_thread(mpr121_thread, mpr121_stack, sizeof(mpr121_stack), 0,
mpr121_thread_name IF_PRIO(, PRIORITY_USER_INTERFACE) IF_COP(, CPU));
/* enable interrupt */
- imx233_pinctrl_acquire_pin(0, 18, "mpr121 int");
- imx233_set_pin_function(0, 18, PINCTRL_FUNCTION_GPIO);
- imx233_enable_gpio_output(0, 18, false);
- imx233_setup_pin_irq(0, 18, true, true, false, &mpr121_irq_cb);
+ imx233_pinctrl_acquire(0, 18, "mpr121 int");
+ imx233_pinctrl_set_function(0, 18, PINCTRL_FUNCTION_GPIO);
+ imx233_pinctrl_enable_gpio(0, 18, false);
+ imx233_pinctrl_setup_irq(0, 18, true, true, false, &mpr121_irq_cb);
/* hold button */
- imx233_pinctrl_acquire_pin(0, 4, "hold");
- imx233_set_pin_function(0, 4, PINCTRL_FUNCTION_GPIO);
- imx233_enable_gpio_output(0, 4, false);
+ imx233_pinctrl_acquire(0, 4, "hold");
+ imx233_pinctrl_set_function(0, 4, PINCTRL_FUNCTION_GPIO);
+ imx233_pinctrl_enable_gpio(0, 4, false);
/* volume down button */
- imx233_pinctrl_acquire_pin(2, 7, "volume down");
- imx233_set_pin_function(2, 7, PINCTRL_FUNCTION_GPIO);
- imx233_enable_gpio_output(2, 7, false);
+ imx233_pinctrl_acquire(2, 7, "volume down");
+ imx233_pinctrl_set_function(2, 7, PINCTRL_FUNCTION_GPIO);
+ imx233_pinctrl_enable_gpio(2, 7, false);
/* volume up button */
- imx233_pinctrl_acquire_pin(2, 8, "volume up");
- imx233_set_pin_function(2, 8, PINCTRL_FUNCTION_GPIO);
- imx233_enable_gpio_output(2, 8, false);
+ imx233_pinctrl_acquire(2, 8, "volume up");
+ imx233_pinctrl_set_function(2, 8, PINCTRL_FUNCTION_GPIO);
+ imx233_pinctrl_enable_gpio(2, 8, false);
}
bool button_hold(void)
{
/* B0P04: #hold */
- return !imx233_get_gpio_input_mask(0, 0x10);
+ return !imx233_pinctrl_get_gpio_mask(0, 0x10);
}
int button_read_device(void)
@@ -171,7 +171,7 @@ int button_read_device(void)
/* B2P07: #volume-
* B2P08: #volume+
* PSWITCH: power */
- uint32_t mask = imx233_get_gpio_input_mask(2, 0x180);
+ uint32_t mask = imx233_pinctrl_get_gpio_mask(2, 0x180);
if(!(mask & 0x80))
res |= BUTTON_VOL_DOWN;
if(!(mask & 0x100))