RTC. Readability improvements.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/rtc_dev@3278 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
barthess 2011-09-01 17:44:44 +00:00
parent 88f24294e2
commit ca3cc2d555
3 changed files with 4 additions and 11 deletions

View File

@ -73,8 +73,8 @@ extern "C" {
void rtcStart(RTCDriver *rtcp, const RTCConfig *rtccfgp);
void rtcStop(void);
#else /* RTC_SUPPORTS_CALLBACKS */
#define rtcStart(rtcp, rtccfgp){;}
#define rtcStop(){;}
#define rtcStart(rtcp, rtccfgp)
#define rtcStop()
#endif /* RTC_SUPPORTS_CALLBACKS */
void rtcSetTime(uint32_t tv_sec);

View File

@ -163,7 +163,6 @@ void rtc_lld_init(void){
* @param[in] rtcp pointer to a @p RTCDriver object
* @param[in] rtccfgp pointer to a @p RTCDriver config object
*/
#if RTC_SUPPORTS_CALLBACKS
void rtc_lld_start(RTCDriver *rtcp, const RTCConfig *rtccfgp){
uint16_t isr_flags = 0;
@ -192,7 +191,6 @@ void rtc_lld_stop(void){
NVICDisableVector(RTC_IRQn);
RTC->CRH = 0;
}
#endif /* RTC_SUPPORTS_CALLBACKS */
/**

View File

@ -112,13 +112,8 @@ extern RTCDriver RTCD;
extern "C" {
#endif
void rtc_lld_init(void);
#if RTC_SUPPORTS_CALLBACKS
void rtc_lld_start(RTCDriver *rtcp, const RTCConfig *rtccfgp);
void rtc_lld_stop(void);
#else /* RTC_SUPPORTS_CALLBACKS */
#define rtc_lld_start(rtcp, rtccfgp){;}
#define rtc_lld_stop(){;}
#endif /* RTC_SUPPORTS_CALLBACKS */
void rtc_lld_start(RTCDriver *rtcp, const RTCConfig *rtccfgp);
void rtc_lld_stop(void);
void rtc_lld_set_time(uint32_t tv_sec);
uint32_t rtc_lld_get_sec(void);
uint16_t rtc_lld_get_msec(void);