mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-11 13:00:19 +00:00
esp_rom: update rom gpio.h
Closes https://github.com/espressif/esp-idf/issues/10205
This commit is contained in:
@@ -4,13 +4,11 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef _ROM_GPIO_H_
|
||||
#define _ROM_GPIO_H_
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "esp_attr.h"
|
||||
#include "sdkconfig.h"
|
||||
#include "soc/gpio_reg.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -53,20 +51,6 @@ typedef enum {
|
||||
#define GPIO_DIS_OUTPUT(gpio_no) ((gpio_no < 32) ? gpio_output_set(0,0,0, 1<<gpio_no) : gpio_output_set_high(0,0,0, 1<<(gpio_no - 32)))
|
||||
#define GPIO_INPUT_GET(gpio_no) ((gpio_no < 32) ? ((gpio_input_get()>>gpio_no)&BIT0) : ((gpio_input_get_high()>>(gpio_no - 32))&BIT0))
|
||||
|
||||
/* GPIO interrupt handler, registered through gpio_intr_handler_register */
|
||||
typedef void (* gpio_intr_handler_fn_t)(uint32_t intr_mask, bool high, void *arg);
|
||||
|
||||
/**
|
||||
* @brief Initialize GPIO. This includes reading the GPIO Configuration DataSet
|
||||
* to initialize "output enables" and pin configurations for each gpio pin.
|
||||
* Please do not call this function in SDK.
|
||||
*
|
||||
* @param None
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
void gpio_init(void);
|
||||
|
||||
/**
|
||||
* @brief Change GPIO(0-31) 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,
|
||||
@@ -119,59 +103,6 @@ uint32_t gpio_input_get(void);
|
||||
*/
|
||||
uint32_t gpio_input_get_high(void);
|
||||
|
||||
/**
|
||||
* @brief Register an application-specific interrupt handler for GPIO pin interrupts.
|
||||
* Once the interrupt handler is called, it will not be called again until after a call to gpio_intr_ack.
|
||||
* Please do not call this function in SDK.
|
||||
*
|
||||
* @param gpio_intr_handler_fn_t fn : gpio application-specific interrupt handler
|
||||
*
|
||||
* @param void *arg : gpio application-specific interrupt handler argument.
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
void gpio_intr_handler_register(gpio_intr_handler_fn_t fn, void *arg);
|
||||
|
||||
/**
|
||||
* @brief Get gpio interrupts which happens but not processed.
|
||||
* Please do not call this function in SDK.
|
||||
*
|
||||
* @param None
|
||||
*
|
||||
* @return uint32_t : bitmask for GPIO pending interrupts, BIT(0) for GPIO0.
|
||||
*/
|
||||
uint32_t gpio_intr_pending(void);
|
||||
|
||||
/**
|
||||
* @brief Get gpio interrupts which happens but not processed.
|
||||
* Please do not call this function in SDK.
|
||||
*
|
||||
* @param None
|
||||
*
|
||||
* @return uint32_t : bitmask for GPIO pending interrupts, BIT(0) for GPIO32.
|
||||
*/
|
||||
uint32_t gpio_intr_pending_high(void);
|
||||
|
||||
/**
|
||||
* @brief Ack gpio interrupts to process pending interrupts.
|
||||
* Please do not call this function in SDK.
|
||||
*
|
||||
* @param uint32_t ack_mask: bitmask for GPIO ack interrupts, BIT(0) for GPIO0.
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
void gpio_intr_ack(uint32_t ack_mask);
|
||||
|
||||
/**
|
||||
* @brief Ack gpio interrupts to process pending interrupts.
|
||||
* Please do not call this function in SDK.
|
||||
*
|
||||
* @param uint32_t ack_mask: bitmask for GPIO ack interrupts, BIT(0) for GPIO32.
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
void gpio_intr_ack_high(uint32_t ack_mask);
|
||||
|
||||
/**
|
||||
* @brief Set GPIO to wakeup the ESP32.
|
||||
* Please do not call this function in SDK.
|
||||
@@ -289,5 +220,3 @@ void gpio_pad_hold(uint8_t gpio_num);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ROM_GPIO_H_ */
|
||||
|
Reference in New Issue
Block a user