|
|
@@ -33,7 +33,7 @@ extern "C" {
|
|
|
* Select the rtcio function.
|
|
|
*
|
|
|
* @note The RTC function must be selected before the pad analog function is enabled.
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
* @param func Select pin function.
|
|
|
*/
|
|
|
#define rtcio_hal_function_select(rtcio_num, func) rtcio_ll_function_select(rtcio_num, func)
|
|
|
@@ -41,21 +41,21 @@ extern "C" {
|
|
|
/**
|
|
|
* Enable rtcio output.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
*/
|
|
|
#define rtcio_hal_output_enable(rtcio_num) rtcio_ll_output_enable(rtcio_num)
|
|
|
|
|
|
/**
|
|
|
* Disable rtcio output.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
*/
|
|
|
#define rtcio_hal_output_disable(rtcio_num) rtcio_ll_output_disable(rtcio_num)
|
|
|
|
|
|
/**
|
|
|
* Set RTCIO output level.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
* @param level 0: output low; ~0: output high.
|
|
|
*/
|
|
|
#define rtcio_hal_set_level(rtcio_num, level) rtcio_ll_set_level(rtcio_num, level)
|
|
|
@@ -63,21 +63,21 @@ extern "C" {
|
|
|
/**
|
|
|
* Enable rtcio input.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
*/
|
|
|
#define rtcio_hal_input_enable(rtcio_num) rtcio_ll_input_enable(rtcio_num)
|
|
|
|
|
|
/**
|
|
|
* Disable rtcio input.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
*/
|
|
|
#define rtcio_hal_input_disable(rtcio_num) rtcio_ll_input_disable(rtcio_num)
|
|
|
|
|
|
/**
|
|
|
* Get RTCIO input level.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
* @return 0: input low; ~0: input high.
|
|
|
*/
|
|
|
#define rtcio_hal_get_level(rtcio_num) rtcio_ll_get_level(rtcio_num)
|
|
|
@@ -85,7 +85,7 @@ extern "C" {
|
|
|
/**
|
|
|
* @brief Set RTC GPIO pad drive capability.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
* @param strength Drive capability of the pad. Range: 0 ~ 3.
|
|
|
*/
|
|
|
#define rtcio_hal_set_drive_capability(rtcio_num, strength) rtcio_ll_set_drive_capability(rtcio_num, strength)
|
|
|
@@ -93,7 +93,7 @@ extern "C" {
|
|
|
/**
|
|
|
* @brief Get RTC GPIO pad drive capability.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
* @return Drive capability of the pad. Range: 0 ~ 3.
|
|
|
*/
|
|
|
#define rtcio_hal_get_drive_capability(rtcio_num) rtcio_ll_get_drive_capability(rtcio_num)
|
|
|
@@ -101,7 +101,7 @@ extern "C" {
|
|
|
/**
|
|
|
* Set RTCIO output level.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
* @param level 0: output low; ~0: output high.
|
|
|
*/
|
|
|
#define rtcio_hal_set_level(rtcio_num, level) rtcio_ll_set_level(rtcio_num, level)
|
|
|
@@ -109,7 +109,7 @@ extern "C" {
|
|
|
/**
|
|
|
* Get RTCIO input level.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
* @return 0: input low; ~0: input high.
|
|
|
*/
|
|
|
#define rtcio_hal_get_level(rtcio_num) rtcio_ll_get_level(rtcio_num)
|
|
|
@@ -120,7 +120,7 @@ extern "C" {
|
|
|
* Configure RTC IO direction, such as output only, input only,
|
|
|
* output and input.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
* @param mode IO direction.
|
|
|
*/
|
|
|
void rtcio_hal_set_direction(int rtcio_num, rtc_gpio_mode_t mode);
|
|
|
@@ -131,7 +131,7 @@ void rtcio_hal_set_direction(int rtcio_num, rtc_gpio_mode_t mode);
|
|
|
* NOTE: ESP32 support INPUT_ONLY mode.
|
|
|
* ESP32S2 support INPUT_ONLY, OUTPUT_ONLY, INPUT_OUTPUT mode.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
* @param mode IO direction.
|
|
|
*/
|
|
|
void rtcio_hal_set_direction_in_sleep(int rtcio_num, rtc_gpio_mode_t mode);
|
|
|
@@ -139,28 +139,28 @@ void rtcio_hal_set_direction_in_sleep(int rtcio_num, rtc_gpio_mode_t mode);
|
|
|
/**
|
|
|
* RTC GPIO pullup enable.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
*/
|
|
|
#define rtcio_hal_pullup_enable(rtcio_num) rtcio_ll_pullup_enable(rtcio_num)
|
|
|
|
|
|
/**
|
|
|
* RTC GPIO pullup disable.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
*/
|
|
|
#define rtcio_hal_pullup_disable(rtcio_num) rtcio_ll_pullup_disable(rtcio_num)
|
|
|
|
|
|
/**
|
|
|
* RTC GPIO pulldown enable.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
*/
|
|
|
#define rtcio_hal_pulldown_enable(rtcio_num) rtcio_ll_pulldown_enable(rtcio_num)
|
|
|
|
|
|
/**
|
|
|
* RTC GPIO pulldown disable.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
*/
|
|
|
#define rtcio_hal_pulldown_disable(rtcio_num) rtcio_ll_pulldown_disable(rtcio_num)
|
|
|
|
|
|
@@ -172,7 +172,7 @@ void rtcio_hal_set_direction_in_sleep(int rtcio_num, rtc_gpio_mode_t mode);
|
|
|
* This function is useful when going into light or deep sleep mode to prevent
|
|
|
* the pin configuration from changing.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
*/
|
|
|
#define rtcio_hal_hold_enable(rtcio_num) rtcio_ll_force_hold_enable(rtcio_num)
|
|
|
|
|
|
@@ -180,7 +180,7 @@ void rtcio_hal_set_direction_in_sleep(int rtcio_num, rtc_gpio_mode_t mode);
|
|
|
* Disable hold function on an RTC IO pad
|
|
|
*
|
|
|
* @note If disable the pad hold, the status of pad maybe changed in sleep mode.
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
*/
|
|
|
#define rtcio_hal_hold_disable(rtcio_num) rtcio_ll_force_hold_disable(rtcio_num)
|
|
|
|
|
|
@@ -192,7 +192,7 @@ void rtcio_hal_set_direction_in_sleep(int rtcio_num, rtc_gpio_mode_t mode);
|
|
|
* This function is useful when going into light or deep sleep mode to prevent
|
|
|
* the pin configuration from changing.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
*/
|
|
|
#define rtcio_hal_hold_all() rtcio_ll_force_hold_all()
|
|
|
|
|
|
@@ -200,14 +200,14 @@ void rtcio_hal_set_direction_in_sleep(int rtcio_num, rtc_gpio_mode_t mode);
|
|
|
* Disable hold function on an RTC IO pads.
|
|
|
*
|
|
|
* @note If disable the pad hold, the status of pad maybe changed in sleep mode.
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
*/
|
|
|
#define rtcio_hal_unhold_all() rtcio_ll_force_unhold_all()
|
|
|
|
|
|
/**
|
|
|
* Enable wakeup function and set wakeup type from light sleep status for rtcio.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
* @param type Wakeup on high level or low level.
|
|
|
*/
|
|
|
#define rtcio_hal_wakeup_enable(rtcio_num, type) rtcio_ll_wakeup_enable(rtcio_num, type)
|
|
|
@@ -215,14 +215,14 @@ void rtcio_hal_set_direction_in_sleep(int rtcio_num, rtc_gpio_mode_t mode);
|
|
|
/**
|
|
|
* Disable wakeup function from light sleep status for rtcio.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
*/
|
|
|
#define rtcio_hal_wakeup_disable(rtcio_num) rtcio_ll_wakeup_disable(rtcio_num)
|
|
|
|
|
|
/**
|
|
|
* Disable wakeup function from light sleep status for rtcio.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
*/
|
|
|
#define rtcio_hal_ext0_set_wakeup_pin(rtcio_num, level) rtcio_ll_ext0_set_wakeup_pin(rtcio_num, level)
|
|
|
|
|
|
@@ -237,7 +237,7 @@ void rtcio_hal_set_direction_in_sleep(int rtcio_num, rtc_gpio_mode_t mode);
|
|
|
* rtc_gpio_isolate(GPIO_NUM_12) before entering deep sleep, to reduce
|
|
|
* deep sleep current.
|
|
|
*
|
|
|
- * @param rtcio_num The index of rtcio. 0 ~ SOC_RTC_IO_PIN_COUNT.
|
|
|
+ * @param rtcio_num The index of rtcio. 0 ~ SOC_RTCIO_PIN_COUNT.
|
|
|
*/
|
|
|
void rtcio_hal_isolate(int rtc_num);
|
|
|
|