From: Nathael Pajani Date: Thu, 19 Mar 2015 22:02:10 +0000 (+0100) Subject: Add gpio_toggle define X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=7512a712446b7ffa56af6fe0090274b92567acd5;p=soft%2Flpc122x%2Fcore Add gpio_toggle define --- diff --git a/include/drivers/gpio.h b/include/drivers/gpio.h index 9c167cc..c8a88c1 100644 --- a/include/drivers/gpio.h +++ b/include/drivers/gpio.h @@ -85,6 +85,12 @@ void gpio_off(void); gpio_port->clear = (1 << gpio.pin);\ } +#define gpio_toggle(gpio) \ +{ \ + struct lpc_gpio* gpio_port = LPC_GPIO_REGS(gpio.port); \ + gpio_port->toggle = (1 << gpio.pin);\ +} + /* GPIO Configuration * This function calls the config_pio() function for the gpio with the given