Modify rtc_api.h header file - update tests specification.

pull/7009/head
Przemyslaw Stekiel 2017-11-02 09:52:26 +01:00 committed by Bartek Szatkowski
parent 6d90c2716d
commit 5a79655d05
1 changed files with 21 additions and 16 deletions

View File

@ -1,6 +1,3 @@
/** \addtogroup hal */
/** @{*/
/* mbed Microcontroller Library /* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited * Copyright (c) 2006-2013 ARM Limited
* *
@ -16,6 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/** \addtogroup hal */
/** @{*/
#ifndef MBED_RTC_API_H #ifndef MBED_RTC_API_H
#define MBED_RTC_API_H #define MBED_RTC_API_H
@ -33,16 +34,20 @@ extern "C" {
* The RTC hal provides a low level interface to the Real Time Counter (RTC) of a * The RTC hal provides a low level interface to the Real Time Counter (RTC) of a
* target. * target.
* *
* # Defined behavior * # Defined behaviour
* * The function ::rtc_init is safe to call repeatedly - Verified by test ::rtc_init_test * * The function ::rtc_init is safe to call repeatedly - Verified by test ::rtc_init_test.
* * RTC accuracy is at least 10% - Not verified * * RTC accuracy is at least 10% - Verified by test ::rtc_accuracy_test.
* * Init/free doesn't stop RTC from counting - Verified by test ::rtc_persist_test * * Init/free doesn't stop RTC from counting - Verified by test ::rtc_persist_test.
* * Software reset doesn't stop RTC from counting - Verified by ::rtc_reset_test * * Software reset doesn't stop RTC from counting - Verified by test ::rtc_reset_test.
* * Sleep modes don't stop RTC from counting - Verified by ::rtc_sleep_test * * Sleep modes don't stop RTC from counting - Verified by test ::rtc_sleep_test.
* * Shutdown mode doesn't stop RTC from counting - Not verified * * Shutdown mode doesn't stop RTC from counting - Not verified.
* * The functions ::rtc_write/::rtc_read provides availability to set/get RTC time
* - Verified by test ::rtc_write_read_test.
* * The functions ::rtc_isenabled returns 1 if the RTC is counting and the time has been set,
* 0 otherwise - Verified by test ::rtc_enabled_test.
* *
* # Undefined behavior * # Undefined behaviour
* * Calling any function other than ::rtc_init before the initialization of the RTC * * Calling any function other than ::rtc_init before the initialisation of the RTC
* *
* # Potential bugs * # Potential bugs
* * Incorrect overflow handling - Verified by ::rtc_range_test * * Incorrect overflow handling - Verified by ::rtc_range_test
@ -71,7 +76,7 @@ extern "C" {
* *
* @note This function is safe to call repeatedly - Tested by ::rtc_init_test * @note This function is safe to call repeatedly - Tested by ::rtc_init_test
* *
* Pseudo Code: * Example Implementation Pseudo Code:
* @code * @code
* void rtc_init() * void rtc_init()
* { * {
@ -97,7 +102,7 @@ void rtc_init(void);
* *
* @note This function does not stop the RTC from counting - Tested by ::rtc_persist_test * @note This function does not stop the RTC from counting - Tested by ::rtc_persist_test
* *
* Pseudo Code: * Example Implementation Pseudo Code:
* @code * @code
* void rtc_free() * void rtc_free()
* { * {
@ -113,7 +118,7 @@ void rtc_free(void);
* @retval 0 The time reported by the RTC is not valid * @retval 0 The time reported by the RTC is not valid
* @retval 1 The time has been set the RTC is counting * @retval 1 The time has been set the RTC is counting
* *
* Pseudo Code: * Example Implementation Pseudo Code:
* @code * @code
* int rtc_isenabled() * int rtc_isenabled()
* { * {
@ -160,7 +165,7 @@ time_t rtc_read(void);
* *
* @param t The current time to be set in seconds. * @param t The current time to be set in seconds.
* *
* Pseudo Code: * Example Implementation Pseudo Code:
* @code * @code
* void rtc_write(time_t t) * void rtc_write(time_t t)
* { * {