You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gu...@apache.org on 2021/11/26 18:23:52 UTC

[incubator-nuttx] 01/02: esp32xx_rtc.c: Fix a duplicated assignment.

This is an automated email from the ASF dual-hosted git repository.

gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit af11cf6cd10914617051455dab4f6a719a7245a7
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Fri Nov 26 14:25:38 2021 +0100

    esp32xx_rtc.c: Fix a duplicated assignment.
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 arch/risc-v/src/esp32c3/esp32c3_rtc.c | 3 +--
 arch/xtensa/src/esp32/esp32_rtc.c     | 5 ++---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/risc-v/src/esp32c3/esp32c3_rtc.c b/arch/risc-v/src/esp32c3/esp32c3_rtc.c
index 539a9bc..fa37b6f 100644
--- a/arch/risc-v/src/esp32c3/esp32c3_rtc.c
+++ b/arch/risc-v/src/esp32c3/esp32c3_rtc.c
@@ -2464,8 +2464,7 @@ int up_rtc_gettime(struct timespec *tp)
     }
   else
     {
-      time_us = = esp32c3_rtc_get_time_us() +
-                    esp32c3_rtc_get_boot_time();
+      time_us = esp32c3_rtc_get_time_us() + esp32c3_rtc_get_boot_time();
     }
 
   tp->tv_sec  = time_us / USEC_PER_SEC;
diff --git a/arch/xtensa/src/esp32/esp32_rtc.c b/arch/xtensa/src/esp32/esp32_rtc.c
index da65492..07c0153 100644
--- a/arch/xtensa/src/esp32/esp32_rtc.c
+++ b/arch/xtensa/src/esp32/esp32_rtc.c
@@ -2066,8 +2066,7 @@ int up_rtc_gettime(struct timespec *tp)
     }
   else
     {
-      time_us = = esp32_rtc_get_time_us() +
-                    esp32_rtc_get_boot_time();
+      time_us = esp32_rtc_get_time_us() + esp32_rtc_get_boot_time();
     }
 
   tp->tv_sec  = time_us / USEC_PER_SEC;
@@ -2270,4 +2269,4 @@ int up_rtc_timer_init(void)
   return OK;
 }
 
-#endif /* CONFIG_RTC_DRIVER */
\ No newline at end of file
+#endif /* CONFIG_RTC_DRIVER */