26 #ifndef __RFLPC_GPIO_H__
27 #define __RFLPC_GPIO_H__
30 #include "../nxp/LPC17xx.h"
32 #include "../pinconf.h"
void rflpc_gpio_set_pin_mode_output(rflpc_pin_t pin, uint8_t val)
Sets a pin to output mode Uses a pin as output pin and sets its value.
void rflpc_gpio_use_pin(rflpc_pin_t pin, rflpc_pin_mode_t mode)
Configures the multi-purpose pins of the CM3 so that it uses a given GPIO pin.
uint8_t rflpc_pin_t
Represents a pin.
void rflpc_gpio_set_pin(rflpc_pin_t pin)
Set a pin (put a logical 1 on it)
void rflpc_gpio_set_pin_mode_input(rflpc_pin_t pin, rflpc_pin_mode_t mode)
Sets a pin to input mode.
rflpc_pin_mode_t
Pin mode.
uint32_t rflpc_gpio_get_val(uint8_t gpio)
Gets the value of the entire port.
void rflpc_gpio_set_val(uint8_t gpio, uint32_t val, uint32_t mask)
Sets the value of multiple pins of a given port from a mask and a value.
void rflpc_gpio_set_pin_val(rflpc_pin_t pin, int val)
Sets the value of a pin (0 or 1)
void rflpc_gpio_set_pins_from_mask(uint8_t gpio, uint32_t mask)
Set multiple pins from a mask.
int rflpc_gpio_get_pin(rflpc_pin_t pin)
Gets the value of a pin.
void rflpc_gpio_clr_pin(rflpc_pin_t pin)
Clear a pin (put a logical 0 on it)
void rflpc_gpio_clr_pins_from_mask(uint8_t gpio, uint32_t mask)
Clean multiple pins from a mask.