summaryrefslogtreecommitdiff
path: root/platform/drivers/inc/gpio_vf6xx.h
diff options
context:
space:
mode:
authorBhuvanchandra DV <bhuvanchandra.dv@toradex.com>2017-02-17 21:19:07 +0530
committerStefan Agner <stefan.agner@toradex.com>2017-02-17 12:58:16 -0800
commit3ff48feae1e83761563a554a6b10faa8ebcc6356 (patch)
tree69b303d673f64cf465f64b1eebeda828f87fd1d9 /platform/drivers/inc/gpio_vf6xx.h
parent2f818b5e1b05ee0ce5cb7073ea312bb216ec591b (diff)
vf6xx: gpio_vf6xx: correct the GPIO toggle control
Drop unnecessary parameter gpio_pin_action_t and use the port toggle register to toggle the pin. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'platform/drivers/inc/gpio_vf6xx.h')
-rw-r--r--platform/drivers/inc/gpio_vf6xx.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/drivers/inc/gpio_vf6xx.h b/platform/drivers/inc/gpio_vf6xx.h
index e420b84..c191e07 100644
--- a/platform/drivers/inc/gpio_vf6xx.h
+++ b/platform/drivers/inc/gpio_vf6xx.h
@@ -88,8 +88,6 @@ extern "C" {
*/
void GPIO_Init(GPIO_Type* base, gpio_init_t* initStruct);
-void GPIO_TogglePinOutput(GPIO_Type* base, uint32_t pin, gpio_pin_action_t pinVal);
-
/*@}*/
/*!
@@ -203,6 +201,11 @@ static inline uint8_t GPIO_ReadPadStatus(GPIO_Type* base, uint32_t pin)
return (uint8_t)((GPIO_PSOR_REG(base) >> (pin & 0x1f)) & 1U);
}
+static inline void GPIO_TogglePinOutput(GPIO_Type* base, uint32_t pin)
+{
+ GPIO_PTOR_REG(base) |= GPIO_OFFSET(pin);
+}
+
/*@}*/
#if defined(__cplusplus)