Skip to content

Commit 96accac

Browse files
author
Donatien Garnier
authored
Merge pull request #1390 from ARMmbed/wc-fix-missing-reference-to-attach-rtc
Add missing mention to `attach_rtc`
2 parents 2f3463c + 3c709b5 commit 96accac

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

docs/api/platform/time/Rtc.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# RTC
22

3-
The RTC (Real-Time Clock) provides mechanisms to set the current time of the hardware RTC with `set_time` API. The time is set as an offset measured in seconds from the time epoch (Unix Epoch - January 1, 1970).
3+
The RTC (Real-Time Clock) provides mechanisms to set the current time of the hardware RTC with `set_time` API. The time is set as an offset measured in seconds from the time epoch (Unix Epoch - January 1, 1970). [Time](../apis/time.html) provides more information about C `date` and `time` standard library functions.
44

5-
You can use the `attach_rtc` API to hook external RTC for using C time functions. It provides you with `init()`, `read()`, `write()` and `isenabled()` functions to be attached. [Time](../apis/time.html) provides more information about C `date` and `time` standard library functions.
5+
<span class="notes">**Note:** If your MCU does not have an RTC nor an LPTICKER, you need to provide hooks to the external RTC you are using to the `attach_rtc` API. See the [platform RTC API](https://os.mbed.com/docs/mbed-os/development/mbed-os-api-doxy/group__platform__rtc__time.html) for more details about that function.</span>
66

77
RTC class APIs are thread safe.
88

docs/api/platform/time/Time.md

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ You can convert time to a human-readable format using `ctime`, `localtime`, `str
66

77
You cannot use `time`, `mktime` and `localtime` C standard library functions in an interrupt handler with the GCC toolchain. We have added dedicated routines `_rtc_mktime` and `_rtc_localtime`, which are optimized and faster than C standard library functions, to overcome this issue.
88

9+
<span class="notes">**Note:** If your MCU does not have an RTC nor an LPTICKER, you need to provide
10+
hooks to the external RTC you are using to the `attach_rtc` API. See the [platform RTC
11+
API](https://os.mbed.com/docs/mbed-os/development/mbed-os-api-doxy/group__platform__rtc__time.html)
12+
for more details about that function.</span>
13+
914
## Time function reference
1015

1116
[![View code](https://www.mbed.com/embed/?type=library)](https://os.mbed.com/docs/mbed-os/development/mbed-os-api-doxy/mbed__mktime_8h_source.html)

0 commit comments

Comments
 (0)