Skip to content

Commit 3fd7e1d

Browse files
committed
Modify rtc_api.h header file - update tests specification.
1 parent 5e6c46e commit 3fd7e1d

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

hal/rtc_api.h

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
2-
/** \addtogroup hal */
3-
/** @{*/
41
/* mbed Microcontroller Library
52
* Copyright (c) 2006-2013 ARM Limited
63
*
@@ -16,6 +13,10 @@
1613
* See the License for the specific language governing permissions and
1714
* limitations under the License.
1815
*/
16+
17+
/** \addtogroup hal */
18+
/** @{*/
19+
1920
#ifndef MBED_RTC_API_H
2021
#define MBED_RTC_API_H
2122

@@ -33,16 +34,20 @@ extern "C" {
3334
* The RTC hal provides a low level interface to the Real Time Counter (RTC) of a
3435
* target.
3536
*
36-
* # Defined behavior
37-
* * The function ::rtc_init is safe to call repeatedly - Verified by test ::rtc_init_test
38-
* * RTC accuracy is at least 10% - Not verified
39-
* * Init/free doesn't stop RTC from counting - Verified by test ::rtc_persist_test
40-
* * Software reset doesn't stop RTC from counting - Verified by ::rtc_reset_test
41-
* * Sleep modes don't stop RTC from counting - Verified by ::rtc_sleep_test
42-
* * Shutdown mode doesn't stop RTC from counting - Not verified
43-
*
44-
* # Undefined behavior
45-
* * Calling any function other than ::rtc_init before the initialization of the RTC
37+
* # Defined behaviour
38+
* * The function ::rtc_init is safe to call repeatedly - Verified by test ::rtc_init_test.
39+
* * RTC accuracy is at least 10% - Verified by test ::rtc_accuracy_test.
40+
* * Init/free doesn't stop RTC from counting - Verified by test ::rtc_persist_test.
41+
* * Software reset doesn't stop RTC from counting - Verified by test ::rtc_reset_test.
42+
* * Sleep modes don't stop RTC from counting - Verified by test ::rtc_sleep_test.
43+
* * Shutdown mode doesn't stop RTC from counting - Not verified.
44+
* * The functions ::rtc_write/::rtc_read provides availability to set/get RTC time
45+
* - Verified by test ::rtc_write_read_test.
46+
* * The functions ::rtc_isenabled returns 1 if the RTC is counting and the time has been set,
47+
* 0 otherwise - Verified by test ::rtc_enabled_test.
48+
*
49+
* # Undefined behaviour
50+
* * Calling any function other than ::rtc_init before the initialisation of the RTC
4651
*
4752
* # Potential bugs
4853
* * Incorrect overflow handling - Verified by ::rtc_range_test
@@ -71,7 +76,7 @@ extern "C" {
7176
*
7277
* @note This function is safe to call repeatedly - Tested by ::rtc_init_test
7378
*
74-
* Pseudo Code:
79+
* Example Implementation Pseudo Code:
7580
* @code
7681
* void rtc_init()
7782
* {
@@ -97,7 +102,7 @@ void rtc_init(void);
97102
*
98103
* @note This function does not stop the RTC from counting - Tested by ::rtc_persist_test
99104
*
100-
* Pseudo Code:
105+
* Example Implementation Pseudo Code:
101106
* @code
102107
* void rtc_free()
103108
* {
@@ -113,7 +118,7 @@ void rtc_free(void);
113118
* @retval 0 The time reported by the RTC is not valid
114119
* @retval 1 The time has been set the RTC is counting
115120
*
116-
* Pseudo Code:
121+
* Example Implementation Pseudo Code:
117122
* @code
118123
* int rtc_isenabled()
119124
* {
@@ -160,7 +165,7 @@ time_t rtc_read(void);
160165
*
161166
* @param t The current time to be set in seconds.
162167
*
163-
* Pseudo Code:
168+
* Example Implementation Pseudo Code:
164169
* @code
165170
* void rtc_write(time_t t)
166171
* {

0 commit comments

Comments
 (0)