void px_gpio_open(px_gpio_handle_t *gpio, px_gpio_reg_t port, px_gpio_reg_t ddr, px_gpio_reg_t pin, uint8_t bit, uint8_t dir, uint8_t init)
Initialise a GPIO structure.
bool px_gpio_out_is_lo(const px_gpio_handle_t *gpio)
Test if GPIO pin output is set low.
bool px_gpio_dir_is_in(const px_gpio_handle_t *gpio)
Test if GPIO pin is configured to be an input.
void px_gpio_out_set_lo(const px_gpio_handle_t *gpio)
Set GPIO pin output low.
bool px_gpio_in_is_lo(const px_gpio_handle_t *gpio)
Test if GPIO pin input is low.
bool px_gpio_dir_is_out(const px_gpio_handle_t *gpio)
Test if GPIO pin is configured to be an output.
uint8_t px_gpio_init_ddr(const px_gpio_handle_t *gpio)
Calculate bit mask used to initialise DDR register.
uint8_t px_gpio_init_port(const px_gpio_handle_t *gpio)
Calculate bit mask used to initialise PORT register.
void px_gpio_dir_set_out(const px_gpio_handle_t *gpio)
Set GPIO pin direction to output.
void px_gpio_pull_up_disable(const px_gpio_handle_t *gpio)
Disable pull-up on GPIO pin.
void px_gpio_out_set_hi(const px_gpio_handle_t *gpio)
Set GPIO pin output high.
void px_gpio_dir_set_in(const px_gpio_handle_t *gpio)
Set GPIO pin direction to input.
bool px_gpio_out_is_hi(const px_gpio_handle_t *gpio)
Test if GPIO pin output is set high.
void px_gpio_pull_up_enable(const px_gpio_handle_t *gpio)
Enable pull-up on GPIO pin.
void px_gpio_out_toggle(const px_gpio_handle_t *gpio)
Toggle GPIO pin output.
bool px_gpio_in_is_hi(const px_gpio_handle_t *gpio)
Test if GPIO pin input is high.
volatile uint8_t * px_gpio_reg_t
GPIO peripheral register address definition.
#define PX_LOG_NAME(name)
Macro to declare a log name string once for each file to reduce code size.
void px_gpio_init(const px_gpio_handle_t *gpio)
Initialise a GPIO pin using supplied handle.
GPIO pin handle definition.