Skip to content

Commit 37f318c

Browse files
acassisxiaoxiang781216
authored andcommitted
boards/esp32s3: Add RTC initialization
1 parent 276d1c8 commit 37f318c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

boards/xtensa/esp32s3/esp32s3-devkit/src/esp32s3_bringup.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@
6262
# include <nuttx/input/buttons.h>
6363
#endif
6464

65+
#ifdef CONFIG_RTC_DRIVER
66+
# include "esp32s3_rtc_lowerhalf.h"
67+
#endif
68+
6569
#ifdef CONFIG_VIDEO_FB
6670
#include <nuttx/video/fb.h>
6771
#endif
@@ -153,6 +157,17 @@ int esp32s3_bringup(void)
153157
}
154158
#endif
155159

160+
#ifdef CONFIG_RTC_DRIVER
161+
/* Instantiate the ESP32-S3 RTC driver */
162+
163+
ret = esp32s3_rtc_driverinit();
164+
if (ret < 0)
165+
{
166+
syslog(LOG_ERR,
167+
"ERROR: Failed to Instantiate the RTC driver: %d\n", ret);
168+
}
169+
#endif
170+
156171
#ifdef CONFIG_WATCHDOG
157172
/* Configure watchdog timer */
158173

0 commit comments

Comments
 (0)