You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/06/02 20:04:19 UTC

[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #3794: risc-v/esp32c3: Support ESP32-C3 RTC driver

gustavonihei commented on a change in pull request #3794:
URL: https://github.com/apache/incubator-nuttx/pull/3794#discussion_r644282367



##########
File path: arch/risc-v/src/esp32c3/esp32c3_rtc.c
##########
@@ -210,18 +214,26 @@
  */
 
 #define RTC_CONFIG_DEFAULT() {\
-    .ck8m_wait = RTC_CNTL_CK8M_WAIT_DEFAULT, \
-    .xtal_wait = RTC_CNTL_XTL_BUF_WAIT_DEFAULT, \
-    .pll_wait  = RTC_CNTL_PLL_BUF_WAIT_DEFAULT, \
-    .clkctl_init = 1, \
-    .pwrctl_init = 1, \
-    .rtc_dboost_fpd = 1, \
-    .xtal_fpu = 0, \
-    .bbpll_fpu = 0, \
-    .cpu_waiti_clk_gate = 1, \
-    .cali_ocode = 0\
+  .ck8m_wait = RTC_CNTL_CK8M_WAIT_DEFAULT, \
+  .xtal_wait = RTC_CNTL_XTL_BUF_WAIT_DEFAULT, \
+  .pll_wait  = RTC_CNTL_PLL_BUF_WAIT_DEFAULT, \
+  .clkctl_init = 1, \
+  .pwrctl_init = 1, \
+  .rtc_dboost_fpd = 1, \
+  .xtal_fpu = 0, \
+  .bbpll_fpu = 0, \
+  .cpu_waiti_clk_gate = 1, \
+  .cali_ocode = 0\
 }
 
+#ifdef CONFIG_RTC_DRIVER
+/* The magic data for the struct esp32c3_rtc_backup_s that is in RTC slow
+ * memory.
+ */
+
+#  define MAGIC_RTC_SAVE (0x11223344556677ull)

Review comment:
       ```suggestion
   #  define MAGIC_RTC_SAVE (UINT64_C(0x11223344556677))
   ```
   nit: Use the definitions from `inttypes.h` for applying the suffix to integer constants




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org