Chapter 2. API Reference
uint32_t dedic_gpio_bundle_read_in(dedic_gpio_bundle_handle_t bundle)
Read the value that input to the given GPIO bundle.
Return Value that input to the GPIO bundle, low bit represents low member in the bundle
Note For performance reasons, this function doesn’t check the validity of any parameters, and is placed in
IRAM.
Parameters
• [in] bundle: Handle of GPIO bundle that returned from “dedic_gpio_new_bundle”
esp_err_t dedic_gpio_bundle_set_interrupt_and_callback(dedic_gpio_bundle_handle_t
bundle, uint32_t mask,
dedic_gpio_intr_type_t
intr_type,
dedic_gpio_isr_callback_t
cb_isr, void *cb_args)
Set interrupt and callback function for GPIO bundle.
Note This function is only valid for bundle with input mode enabled. See “dedic_gpio_bundle_config_t”
Note The mask is seen from the view of GPIO Bundle. For example, bundleA contains [GPIO10, GPIO12,
GPIO17], to set GPIO17 individually, the mask should be 0x04.
Return
• ESP_OK: Set GPIO interrupt and callback function successfully
• ESP_ERR_INVALID_ARG: Set GPIO interrupt and callback function failed because of invalid
argument
• ESP_FAIL: Set GPIO interrupt and callback function failed because of other error
Parameters
• [in] bundle: Handle of GPIO bundle that returned from “dedic_gpio_new_bundle”
• [in] mask: Mask of the GPIOs in the given bundle
• [in] intr_type: Interrupt type, set to DEDIC_GPIO_INTR_NONE can disable interrupt
• [in] cb_isr: Callback function, which got invoked in ISR context. A NULL pointer here will
bypass the callback
• [in] cb_args: User defined argument to be passed to the callback function
Structures
struct dedic_gpio_bundle_config_t
Type of Dedicated GPIO bundle configuration.
Public Members
const int *gpio_array
Array of GPIO numbers, gpio_array[0] ~ gpio_array[size-1] <=> low_dedic_channel_num ~
high_dedic_channel_num
size_t array_size
Number of GPIOs in gpio_array
unsigned int in_en : 1
Enable input
unsigned int in_invert : 1
Invert input signal
unsigned int out_en : 1
Enable output
unsigned int out_invert : 1
Invert output signal
struct dedic_gpio_bundle_config_t::[anonymous] flags
Flags to control specific behaviour of GPIO bundle
Espressif Systems 271
Submit Document Feedback
Release v4.4