From dcfc4c95d91555c01f63ca3da4347b39c38fb22f Mon Sep 17 00:00:00 2001 From: Leandro Resende Mattioli Date: Sun, 18 Aug 2024 17:40:48 -0300 Subject: [PATCH 1/2] fix(timer): Typo - milis instead of millis. --- cores/esp32/esp32-hal-timer.c | 2 +- cores/esp32/esp32-hal-timer.h | 2 +- docs/en/api/timer.rst | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cores/esp32/esp32-hal-timer.c b/cores/esp32/esp32-hal-timer.c index 56f58529ec4..58e881690d0 100644 --- a/cores/esp32/esp32-hal-timer.c +++ b/cores/esp32/esp32-hal-timer.c @@ -202,7 +202,7 @@ uint64_t timerReadMicros(hw_timer_t *timer) { return timer_val * 1000000 / frequency; } -uint64_t timerReadMilis(hw_timer_t *timer) { +uint64_t timerReadMillis(hw_timer_t *timer) { uint64_t timer_val = timerRead(timer); uint32_t frequency = timerGetFrequency(timer); return timer_val * 1000 / frequency; diff --git a/cores/esp32/esp32-hal-timer.h b/cores/esp32/esp32-hal-timer.h index 35518534783..59b88c99cba 100644 --- a/cores/esp32/esp32-hal-timer.h +++ b/cores/esp32/esp32-hal-timer.h @@ -42,7 +42,7 @@ void timerWrite(hw_timer_t *timer, uint64_t val); uint64_t timerRead(hw_timer_t *timer); uint64_t timerReadMicros(hw_timer_t *timer); -uint64_t timerReadMilis(hw_timer_t *timer); +uint64_t timerReadMillis(hw_timer_t *timer); double timerReadSeconds(hw_timer_t *timer); uint32_t timerGetFrequency(hw_timer_t *timer); diff --git a/docs/en/api/timer.rst b/docs/en/api/timer.rst index 58706d8e453..a1647e693cd 100644 --- a/docs/en/api/timer.rst +++ b/docs/en/api/timer.rst @@ -119,14 +119,14 @@ This function is used to read counter value in microseconds of the timer. This function will return ``counter value`` of the timer in microseconds. -timerReadMilis +timerReadMillis ************** This function is used to read counter value in milliseconds of the timer. .. code-block:: arduino - uint64_t timerReadMilis(hw_timer_t * timer); + uint64_t timerReadMillis(hw_timer_t * timer); * ``timer`` timer struct. From 3cb8f65b39526feb165e5d008f02e1d77df844c1 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Thu, 22 Aug 2024 14:50:24 -0300 Subject: [PATCH 2/2] fix(doc0: format fix CI error about format --- docs/en/api/timer.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/api/timer.rst b/docs/en/api/timer.rst index a1647e693cd..2637f9eec1d 100644 --- a/docs/en/api/timer.rst +++ b/docs/en/api/timer.rst @@ -120,7 +120,7 @@ This function is used to read counter value in microseconds of the timer. This function will return ``counter value`` of the timer in microseconds. timerReadMillis -************** +*************** This function is used to read counter value in milliseconds of the timer.