查看ESP32 RTC的源代码
←
ESP32 RTC
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
==== rtc_pad_ext_wakeup ==== Following: * p1 is the 1st parameter of rtc_pad_ext_wakeup * p2 is the 2nd parameter of rtc_pad_ext_wakeup * p3 is the 3rd parameter of rtc_pad_ext_wakeup <source lang=c> 0x4008ee9c <rtc_pad_ext_wakeup>: entry a1, 32 0x4008ee9f <rtc_pad_ext_wakeup+3>: mov.n a10, a2 0x4008eea1 <rtc_pad_ext_wakeup+5>: movi.n a11, 1 0x4008eea3 <rtc_pad_ext_wakeup+7>: call8 0x4008d2f4 <rtc_pads_muxsel> /* rtc_pads_muxsel (p1, 1) */ 0x4008eea6 <rtc_pad_ext_wakeup+10>: mov.n a10, a2 0x4008eea8 <rtc_pad_ext_wakeup+12>: movi.n a11, 0 0x4008eeaa <rtc_pad_ext_wakeup+14>: call8 0x4008d54c <rtc_pads_funsel> /* rtc_pads_funsel (p1, 0) */ 0x4008eead <rtc_pad_ext_wakeup+17>: l32r a8, 0x4008edf4 /* a8 = *(4008edf4) = 0x3ff4840c, RTC_GPIO_ENABLE_REG */ 0x4008eeb0 <rtc_pad_ext_wakeup+20>: slli a9, a2, 14 0x4008eeb3 <rtc_pad_ext_wakeup+23>: memw 0x4008eeb6 <rtc_pad_ext_wakeup+26>: l32i.n a10, a8, 0 /* a10 = read RTC_GPIO_ENABLE_REG */ 0x4008eeb8 <rtc_pad_ext_wakeup+28>: movi.n a11, -1 /* a11 = 0xffff ffff */ 0x4008eeba <rtc_pad_ext_wakeup+30>: xor a9, a11, a9 /* a9 = ~a9 */ 0x4008eebd <rtc_pad_ext_wakeup+33>: and a9, a9, a10 /* a9 = a10 & a9 */ 0x4008eec0 <rtc_pad_ext_wakeup+36>: memw 0x4008eec3 <rtc_pad_ext_wakeup+39>: s32i.n a9, a8, 0 /* store to RTC_GPIO_ENABLE_REG, disable the output of the RTC_PAD */ 0x4008eec5 <rtc_pad_ext_wakeup+41>: mov.n a10, a2 0x4008eec7 <rtc_pad_ext_wakeup+43>: movi a11, 1 0x4008eeca <rtc_pad_ext_wakeup+46>: call8 0x4008d794 <rtc_pads_slpsel> /* rtc_pads_slpsel (p1, 1) */ 0x4008eecd <rtc_pad_ext_wakeup+49>: mov.n a10, a2 0x4008eecf <rtc_pad_ext_wakeup+51>: movi a11, 0 0x4008eed2 <rtc_pad_ext_wakeup+54>: call8 0x4008d9dc <rtc_pads_slpoe> /* rtc_pads_slpoe (p1, 0) */ 0x4008eed5 <rtc_pad_ext_wakeup+57>: mov.n a10, a2 0x4008eed7 <rtc_pad_ext_wakeup+59>: movi a11, 1 0x4008eeda <rtc_pad_ext_wakeup+62>: call8 0x4008db68 <rtc_pads_slpie> /* rtc_pads_slpie (p1, 1) */ 0x4008eedd <rtc_pad_ext_wakeup+65>: mov.n a10, a2 0x4008eedf <rtc_pad_ext_wakeup+67>: movi a11, 1 0x4008eee2 <rtc_pad_ext_wakeup+70>: call8 0x4008dcf0 <rtc_pads_funie> /* rtc_pads_funie (p1, 1) */ 0x4008eee5 <rtc_pad_ext_wakeup+73>: mov.n a10, a2 0x4008eee7 <rtc_pad_ext_wakeup+75>: movi a11, 0 0x4008eeea <rtc_pad_ext_wakeup+78>: call8 0x4008de78 <rtc_pads_pu> /* rtc_pads_pu (p1, 0) */ 0x4008eeed <rtc_pad_ext_wakeup+81>: mov.n a10, a2 0x4008eeef <rtc_pad_ext_wakeup+83>: movi.n a11, 0 0x4008eef1 <rtc_pad_ext_wakeup+85>: call8 0x4008e000 <rtc_pads_pd> /* rtc_pads_pd (p1, 0) */ 0x4008eef4 <rtc_pad_ext_wakeup+88>: l32r a8, 0x4008ee90 /* a8 = *(0x4008ee90) = 0x3ff484bc, RTC_IO_EXT_WAKEUP0_REG */ 0x4008eef7 <rtc_pad_ext_wakeup+91>: l32r a2, 0x4008ee94 /* a2 = *(0x4008ee94) = 0x07ffffff */ 0x4008eefa <rtc_pad_ext_wakeup+94>: memw 0x4008eefd <rtc_pad_ext_wakeup+97>: l32i.n a9, a8, 0 /* a9 = read RTC_IO_EXT_WAKEUP0_REG */ 0x4008eeff <rtc_pad_ext_wakeup+99>: slli a3, a3, 27 /* a3 = p2 << 27 */ 0x4008ef02 <rtc_pad_ext_wakeup+102>: and a9, a9, a2 /* a9 = RTC_IO_EXT_WAKEUP0_REG & 0x07ff ffff */ 0x4008ef05 <rtc_pad_ext_wakeup+105>: or a3, a3, a9 /* a3 = (p2 << 27) | a9 */ 0x4008ef08 <rtc_pad_ext_wakeup+108>: l32r a2, 0x4008ee98 /* a2 = *(0x4008ee98) = 0x3ff48060, RTC_CNTL_EXT_WAKEUP_CONF_REG */ 0x4008ef0b <rtc_pad_ext_wakeup+111>: memw 0x4008ef0e <rtc_pad_ext_wakeup+114>: s32i.n a3, a8, 0 /* write to RTC_IO_EXT_WAKEUP0_REG */ 0x4008ef10 <rtc_pad_ext_wakeup+116>: memw 0x4008ef13 <rtc_pad_ext_wakeup+119>: l32i.n a8, a2, 0 /* a8 = read RTC_CNTL_EXT_WAKEUP_CONF_REG */ 0x4008ef15 <rtc_pad_ext_wakeup+121>: l32r a3, 0x4008838c /* a3 = *(0x4008838c) = 0xbfffffff */ 0x4008ef18 <rtc_pad_ext_wakeup+124>: extui a4, a4, 0, 1 /* a4 = p3[0] */ 0x4008ef1b <rtc_pad_ext_wakeup+127>: slli a4, a4, 30 /* a4 = a4 << 30 */ 0x4008ef1e <rtc_pad_ext_wakeup+130>: and a3, a8, a3 /* a3 = a8 & a3 = RTC_CNTL_EXT_WAKEUP_CONF_REG & 0xbfff ffff */ 0x4008ef21 <rtc_pad_ext_wakeup+133>: or a4, a4, a3 /* a4 = RTC_CNTL_EXT_WAKEUP_CONF_REG & 0xbfff ffff | (p3[0] << 30) */ 0x4008ef24 <rtc_pad_ext_wakeup+136>: memw 0x4008ef27 <rtc_pad_ext_wakeup+139>: s32i.n a4, a2, 0 /* write to RTC_CNTL_EXT_WAKEUP_CONF_REG */ /* use the EXT_WAKEUP0, 0: external wakeup at low level 1: external wakeup at high level */ 0x4008ef29 <rtc_pad_ext_wakeup+141>: retw.n </source> So: <source lang=c> typedef enum { RTC_GPIO0 = BIT(0), RTC_GPIO1 = BIT(1), ...... ...... RTC_GPIO17 = BIT(17) } rtc_gpio_num_t; /* * rtc_io_num is the number of rtc_pad. e.g. The number of RTC_GPIO5 is 5 * wakeup_level = 0: external wakeup at low level * wakeup_level = 1: external wakeup at high level */ void rtc_pad_ext_wakeup(rtc_gpio_num_t rtc_pad, uint8_t rtc_io_num, uint8_t wakeup_level); </source> <br>
返回到
ESP32 RTC
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面