48 #ifndef __DRV_EXT_GPIO_H__ 49 #define __DRV_EXT_GPIO_H__ 52 #include "nrf_error.h" 53 #include "drv_sx1509.h" 64 #define DRV_EXT_GPIO_PIN_HIGHEST_ID DRV_SX1509_DATA_PIN15_Pos 65 #define DRV_EXT_GPIO_NUM_PINS_TOTAL (DRV_EXT_GPIO_PIN_HIGHEST_ID + 1) uint32_t drv_ext_gpio_cfg_output(uint32_t pin_number)
Function for configuring the given GPIO pin_number as output with given initial value set...
Successfull.
Definition: drv_ext_gpio.h:59
Pin pulldown resistor enabled.
Definition: drv_ext_gpio.h:88
drv_ext_gpio_pin_dir_t
Pin direction definitions.
Definition: drv_ext_gpio.h:69
SX1509 configuration.
Definition: drv_sx1509.h:70
drv_ext_gpio_pin_slew_rate_t
Regular or increased slew rate.
Definition: drv_ext_gpio.h:102
uint32_t drv_ext_gpio_pins_clear(uint32_t pin_mask)
Function for clearing GPIO pins.
drv_ext_gpio_pin_drive_type_t
Push-pull or open drain operation.
Definition: drv_ext_gpio.h:94
uint32_t drv_ext_gpio_reset(void)
Function for resetting all the registers of the GPIO extender to their default values.
uint32_t drv_ext_gpio_pin_set(uint32_t pin_number)
Function for setting a GPIO pin.
uint32_t drv_ext_gpio_init(drv_ext_gpio_init_t const *const p_init, bool on_init_reset)
Function for initializing the GPIO extender.
uint32_t drv_ext_gpio_pins_read(uint32_t *const p_pins)
Function for reading the input level of all GPIO pins.
Invalid parameters.
Definition: drv_ext_gpio.h:60
uint32_t drv_ext_gpio_pins_set(uint32_t pin_mask)
Function for setting GPIO pins.
uint32_t drv_ext_gpio_reg_data_init(uint32_t data)
Function for setting all the RegData registers at the same time.
uint32_t drv_ext_gpio_pin_dir_modify(uint32_t pin_number, drv_ext_gpio_pin_dir_t direction)
Function for setting the direction of a GPIO pin.
uint32_t drv_ext_gpio_cfg(uint32_t pin_number, drv_ext_gpio_pin_dir_t dir, drv_ext_gpio_pin_input_buf_t input_buf, drv_ext_gpio_pin_pull_t pull_config, drv_ext_gpio_pin_drive_type_t drive_type, drv_ext_gpio_pin_slew_rate_t slew_rate)
Pin configuration function.
drv_ext_gpio_pin_input_buf_t
Connection of input buffer.
Definition: drv_ext_gpio.h:77
uint32_t drv_ext_gpio_pin_read(uint32_t pin_number, uint32_t *const p_pin)
Function for reading the input level of a GPIO pin.
uint32_t drv_ext_gpio_pin_toggle(uint32_t pin_number)
Function for toggling a GPIO pin.
Standard push-pull operation.
Definition: drv_ext_gpio.h:96
uint32_t drv_ext_gpio_pins_toggle(uint32_t pin_mask)
Function for toggling GPIO pins.
Open drain.
Definition: drv_ext_gpio.h:97
uint32_t drv_ext_gpio_pin_drive_type_modify(uint32_t pin_number, drv_ext_gpio_pin_drive_type_t drive_type)
Function for setting the drive type a given GPIO pin.
uint32_t drv_ext_gpio_pin_slew_rate_modify(uint32_t pin_number, drv_ext_gpio_pin_slew_rate_t slew_rate)
Function for enabling or disabling increased slew rate for a given GPIO pin.
uint32_t drv_ext_gpio_pin_input_buffer_modify(uint32_t pin_number, drv_ext_gpio_pin_input_buf_t input_buf)
Function for enabling and disabling the input buffer.
No pin pullup or pulldown.
Definition: drv_ext_gpio.h:87
Invalid GPIO pin or pin mask selected.
Definition: drv_ext_gpio.h:61
Input.
Definition: drv_ext_gpio.h:72
Connect input buffer.
Definition: drv_ext_gpio.h:79
uint32_t drv_ext_gpio_cfg_input(uint32_t pin_number, drv_ext_gpio_pin_pull_t pull_config)
Function for configuring the given GPIO pin number as input with given initial value set...
Increased slew rate.
Definition: drv_ext_gpio.h:105
drv_ext_gpio_pin_pull_t
Pin to be pulled down, up, or no-pull.
Definition: drv_ext_gpio.h:85
Pin pullup resistor enabled.
Definition: drv_ext_gpio.h:89
No slew rate alteration.
Definition: drv_ext_gpio.h:104
uint32_t drv_ext_gpio_pin_write(uint32_t pin_number, uint32_t value)
Function for writing a value to a GPIO pin.
uint32_t drv_ext_gpio_pin_clear(uint32_t pin_number)
Function for clearing a GPIO pin.
Disconnect input buffer.
Definition: drv_ext_gpio.h:80
Output.
Definition: drv_ext_gpio.h:71
GPIO extender driver configuration.
Definition: drv_ext_gpio.h:135