140 const uint32_t *args,
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:43
void(* meshx_gpio_hosted_event_cb_t)(const meshx_gpio_hosted_event_t *event)
Register callback for GPIO hosted mode events.
Definition meshx_gpio.h:208
meshx_gpio_pull_t
GPIO Pull Resistor Settings.
Definition meshx_gpio.h:41
@ MESHX_GPIO_PULL_DOWN
Definition meshx_gpio.h:44
@ MESHX_GPIO_PULL_NONE
Definition meshx_gpio.h:42
@ MESHX_GPIO_PULL_UP
Definition meshx_gpio.h:43
@ MESHX_GPIO_PULL_UP_DOWN
Definition meshx_gpio.h:45
@ MESHX_GPIO_PULL_MAX
Definition meshx_gpio.h:46
meshx_err_t meshx_gpio_register_hosted_event_cb(meshx_gpio_hosted_event_cb_t callback)
Register callback function for hosted mode events.
Definition meshx_gpio.c:802
meshx_err_t meshx_gpio_set_level(uint8_t logical_pin, uint8_t level)
Set GPIO pin level.
Definition meshx_gpio.c:322
meshx_err_t meshx_gpio_execute_function(uint8_t logical_pin, meshx_io_function_t function, const uint32_t *args, uint8_t arg_count)
Execute IO function on GPIO pin.
Definition meshx_gpio.c:616
meshx_err_t meshx_gpio_process_hosted_interrupt(uint8_t logical_pin, uint8_t value)
Process GPIO interrupt event from host (hosted mode).
Definition meshx_gpio.c:856
meshx_err_t meshx_gpio_get_level(uint8_t logical_pin, uint8_t *level)
Get GPIO pin level.
Definition meshx_gpio.c:392
meshx_err_t meshx_gpio_intr_enable(uint8_t logical_pin, bool enable)
Enable/disable GPIO interrupt.
Definition meshx_gpio.c:591
meshx_err_t meshx_gpio_unregister_intr(uint8_t logical_pin)
Unregister GPIO interrupt handler.
Definition meshx_gpio.c:557
meshx_err_t meshx_gpio_get_pin_state(uint8_t logical_pin, meshx_gpio_pin_state_t *state)
Get pin runtime state.
Definition meshx_gpio.c:689
meshx_err_t meshx_gpio_init(void)
Initialize GPIO subsystem.
Definition meshx_gpio.c:95
meshx_err_t meshx_gpio_set_hosted_mode(meshx_gpio_hosted_mode_t mode)
Set hosted mode for GPIO subsystem.
Definition meshx_gpio.c:711
meshx_err_t meshx_gpio_deinit(void)
Deinitialize GPIO subsystem.
Definition meshx_gpio.c:189
uint8_t meshx_gpio_get_pin_count(void)
Get number of configured GPIO pins.
Definition meshx_gpio.c:651
meshx_gpio_hosted_mode_t meshx_gpio_get_hosted_mode(void)
Get current hosted mode.
Definition meshx_gpio.c:786
bool meshx_gpio_is_initialized(void)
Check if GPIO subsystem is initialized.
Definition meshx_gpio.c:641
meshx_err_t meshx_gpio_get_pin_config(uint8_t logical_pin, meshx_gpio_pin_config_t *config)
Get pin configuration.
Definition meshx_gpio.c:663
meshx_err_t meshx_gpio_toggle(uint8_t logical_pin)
Toggle GPIO pin level.
Definition meshx_gpio.c:453
meshx_gpio_mode_t
GPIO Pin Modes.
Definition meshx_gpio.h:28
@ MESHX_GPIO_MODE_INPUT_OUTPUT
Definition meshx_gpio.h:31
@ MESHX_GPIO_MODE_OPEN_DRAIN_INPUT_OUTPUT
Definition meshx_gpio.h:33
@ MESHX_GPIO_MODE_INPUT
Definition meshx_gpio.h:29
@ MESHX_GPIO_MODE_PWM_OUTPUT
Definition meshx_gpio.h:34
@ MESHX_GPIO_MODE_OPEN_DRAIN
Definition meshx_gpio.h:32
@ MESHX_GPIO_MODE_MAX
Definition meshx_gpio.h:35
@ MESHX_GPIO_MODE_OUTPUT
Definition meshx_gpio.h:30
meshx_io_function_t
IO Function Types for function-based API.
Definition meshx_gpio.h:63
@ MESHX_IO_FUNCTION_MAX
Definition meshx_gpio.h:71
@ MESHX_IO_FUNCTION_CUSTOM
Definition meshx_gpio.h:70
@ MESHX_IO_FUNCTION_REGISTER_INTERRUPT
Definition meshx_gpio.h:69
@ MESHX_IO_FUNCTION_SET_PWM_FREQUENCY
Definition meshx_gpio.h:68
@ MESHX_IO_FUNCTION_SET_LEVEL
Definition meshx_gpio.h:64
@ MESHX_IO_FUNCTION_TOGGLE
Definition meshx_gpio.h:66
@ MESHX_IO_FUNCTION_GET_LEVEL
Definition meshx_gpio.h:65
@ MESHX_IO_FUNCTION_SET_PWM_DUTY
Definition meshx_gpio.h:67
meshx_err_t meshx_gpio_register_intr(uint8_t logical_pin, meshx_gpio_intr_type_t intr_type, meshx_gpio_intr_cb_t callback, void *user_data)
Register GPIO interrupt handler.
Definition meshx_gpio.c:488
void(* meshx_gpio_intr_cb_t)(uint8_t logical_pin, void *user_data)
GPIO Interrupt Callback Function.
Definition meshx_gpio.h:80
meshx_gpio_drive_t
GPIO Drive Strength.
Definition meshx_gpio.h:52
@ MESHX_GPIO_DRIVE_WEAK
Definition meshx_gpio.h:53
@ MESHX_GPIO_DRIVE_MEDIUM
Definition meshx_gpio.h:54
@ MESHX_GPIO_DRIVE_STRONG
Definition meshx_gpio.h:55
@ MESHX_GPIO_DRIVE_MAX_STRONG
Definition meshx_gpio.h:56
@ MESHX_GPIO_DRIVE_MAX
Definition meshx_gpio.h:57
bool meshx_gpio_is_hosted_mode(void)
Check if GPIO subsystem is in hosted mode.
Definition meshx_gpio.c:794
MeshX GPIO Type Definitions.
meshx_gpio_intr_type_t
GPIO Interrupt Trigger Types.
Definition meshx_gpio_types.h:28
meshx_gpio_hosted_mode_t
Hosted Mode State.
Definition meshx_gpio_types.h:169
uint8_t state
Definition meshx_serial.c:39
Hosted Mode GPIO Event.
Definition meshx_gpio_types.h:180
GPIO Pin Configuration Structure.
Definition meshx_gpio_types.h:51
GPIO Pin State Structure.
Definition meshx_gpio_types.h:91