Skip to content

Commit 46e134e

Browse files
author
Amanda Butler
authored
Merge pull request #533 from deepikabhavnani/wait_correction
Aligned to other API docs
2 parents 41959a6 + 355775d commit 46e134e

File tree

3 files changed

+7
-24
lines changed

3 files changed

+7
-24
lines changed

docs/reference/api/platform/Rtc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
## RTC
22

3-
The RTC (Real-Time Clock) class 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).
44

55
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](/docs/development/reference/time.html) provides more information about C `date` and `time` standard library functions.
66

77
RTC class APIs are thread safe.
88

99
RTC can keep track of time even in a powered down state if the secondary source of power (battery) is connected.
1010

11-
### RTC Time class reference
11+
### RTC function reference
1212

1313
[![View code](https://www.mbed.com/embed/?type=library)](http://os-doc-builder.test.mbed.com/docs/development/mbed-os-api-doxy/mbed__rtc__time_8h_source.html)
1414

docs/reference/api/platform/Time.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ 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 then C standard library functions, to overcome this issue.
88

9-
### Time class reference
9+
### Time function reference
1010

1111
[![View code](https://www.mbed.com/embed/?type=library)](http://os-doc-builder.test.mbed.com/docs/development/mbed-os-api-doxy/mbed__mktime_8h_source.html)
1212

docs/reference/api/platform/Wait.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,14 @@
22

33
Wait functions provide simple wait capabilities. The OS scheduler puts the current thread in `waiting state`, allowing another thread to execute. Even better: If there are no other threads in `ready state`, it can put the whole microcontroller to `sleep`, saving energy.
44

5-
```
6-
/** Waits for a number of seconds, with microsecond resolution (within
7-
* the accuracy of single precision floating point).
8-
*
9-
* @param s number of seconds to wait
10-
*/
11-
void wait(float s);
12-
13-
/** Waits a number of milliseconds.
14-
*
15-
* @param ms the whole number of milliseconds to wait
16-
*/
17-
void wait_ms(int ms);
18-
19-
/** Waits a number of microseconds.
20-
*
21-
* @param us the whole number of microseconds to wait
22-
*/
23-
void wait_us(int us);
24-
```
25-
265
### Avoiding OS delay
276

287
When you call wait, your board's CPU will sleep in the RTOS for the whole number of milliseconds and then spin as necessary to make up the remaining fraction of a millisecond. However, it blocks the platform deep sleep for the entire duration.
298

9+
### Wait function reference
10+
11+
[![View code](https://www.mbed.com/embed/?type=library)](http://os-doc-builder.test.mbed.com/docs/development/mbed-os-api-doxy/mbed__wait__api_8h_source.html)
12+
3013
### Example
3114

3215
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed_example/code/wait_ex_1/)](https://os.mbed.com/teams/mbed_example/code/wait_ex_1/file/7d249aa3d880/main.cpp)

0 commit comments

Comments
 (0)