fix(gpio): remove GPIO_OUTPUT_SET macro for ESP32P4

Use GPIO_OUTPUT_SET led to compilation error

Closes https://github.com/espressif/esp-idf/issues/16050
This commit is contained in:
Song Ruo Jing
2025-06-11 17:30:23 +08:00
parent 60bef64f5c
commit 3e2945b595
17 changed files with 108 additions and 371 deletions

View File

@@ -33,62 +33,23 @@ extern "C" {
#define GPIO_REGID_TO_PINIDX(reg_id) ((reg_id) - GPIO_ID_PIN0)
typedef enum {
GPIO_PIN_INTR_DISABLE = 0,
GPIO_PIN_INTR_POSEDGE = 1,
GPIO_PIN_INTR_NEGEDGE = 2,
GPIO_PIN_INTR_ANYEDGE = 3,
GPIO_PIN_INTR_LOLEVEL = 4,
GPIO_PIN_INTR_HILEVEL = 5
} GPIO_INT_TYPE;
/**
* @brief Change GPIO(0-29) pin output by setting, clearing, or disabling pins, GPIO0<->BIT(0).
* There is no particular ordering guaranteed; so if the order of writes is significant,
* calling code should divide a single call into multiple calls.
* @brief Set GPIO output level
*
* @param uint32_t set_mask : the gpios that need high level.
*
* @param uint32_t clear_mask : the gpios that need low level.
*
* @param uint32_t enable_mask : the gpios that need be changed.
*
* @param uint32_t disable_mask : the gpios that need disable output.
*
* @return None
* @param gpio_num GPIO number
* @param level Output level, 0:low; 1:high
*/
void gpio_output_set(uint32_t set_mask, uint32_t clear_mask, uint32_t enable_mask, uint32_t disable_mask);
void gpio_set_output_level(uint32_t gpio_num, uint32_t level);
/**
* @brief Sample the value of GPIO input pins(0-29) and returns a bitmask.
* @param None
* @brief Get GPIO input level
*
* @return uint32_t : bitmask for GPIO input pins, BIT(0) for GPIO0.
* @param gpio_num GPIO number
*
* @return 0:the GPIO_input level is low; 1:the GPIO input level is high
*/
uint32_t gpio_input_get(void);
/**
* @brief Set GPIO to wakeup.
* Please do not call this function in SDK.
*
* @param uint32_t i: gpio number.
*
* @param GPIO_INT_TYPE intr_state : only GPIO_PIN_INTR_LOLEVEL\GPIO_PIN_INTR_HILEVEL can be used
*
* @return None
*/
void gpio_pin_wakeup_enable(uint32_t i, GPIO_INT_TYPE intr_state);
/**
* @brief disable GPIOs to wakeup.
* Please do not call this function in SDK.
*
* @param None
*
* @return None
*/
void gpio_pin_wakeup_disable(void);
uint32_t gpio_get_input_level(uint32_t gpio_num);
/**
* @brief set gpio input to a signal, one gpio can input to several signals.