Removed unused stuff from RTCv1.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3753 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
9923c1663e
commit
618b341a05
|
@ -64,15 +64,15 @@ static void rtc_lld_serve_interrupt(RTCDriver *rtcp) {
|
||||||
chSysLockFromIsr();
|
chSysLockFromIsr();
|
||||||
|
|
||||||
if ((RTC->CRH & RTC_CRH_SECIE) && (RTC->CRL & RTC_CRL_SECF)) {
|
if ((RTC->CRH & RTC_CRH_SECIE) && (RTC->CRL & RTC_CRL_SECF)) {
|
||||||
rtcp->rtc_cb(rtcp, RTC_EVENT_SECOND);
|
rtcp->callback(rtcp, RTC_EVENT_SECOND);
|
||||||
RTC->CRL &= ~RTC_CRL_SECF;
|
RTC->CRL &= ~RTC_CRL_SECF;
|
||||||
}
|
}
|
||||||
if ((RTC->CRH & RTC_CRH_ALRIE) && (RTC->CRL & RTC_CRL_ALRF)) {
|
if ((RTC->CRH & RTC_CRH_ALRIE) && (RTC->CRL & RTC_CRL_ALRF)) {
|
||||||
rtcp->rtc_cb(rtcp, RTC_EVENT_ALARM);
|
rtcp->callback(rtcp, RTC_EVENT_ALARM);
|
||||||
RTC->CRL &= ~RTC_CRL_ALRF;
|
RTC->CRL &= ~RTC_CRL_ALRF;
|
||||||
}
|
}
|
||||||
if ((RTC->CRH & RTC_CRH_OWIE) && (RTC->CRL & RTC_CRL_OWF)) {
|
if ((RTC->CRH & RTC_CRH_OWIE) && (RTC->CRL & RTC_CRL_OWF)) {
|
||||||
rtcp->rtc_cb(rtcp, RTC_EVENT_OVERFLOW);
|
rtcp->callback(rtcp, RTC_EVENT_OVERFLOW);
|
||||||
RTC->CRL &= ~RTC_CRL_OWF;
|
RTC->CRL &= ~RTC_CRL_OWF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ void rtc_lld_init(void){
|
||||||
RTC->CRH = 0;
|
RTC->CRH = 0;
|
||||||
|
|
||||||
/* Callback initially disabled.*/
|
/* Callback initially disabled.*/
|
||||||
RTCD1.rtc_cb = NULL;
|
RTCD1.callback = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -312,7 +312,7 @@ void rtc_lld_get_alarm(RTCDriver *rtcp,
|
||||||
void rtc_lld_set_callback(RTCDriver *rtcp, rtccb_t callback) {
|
void rtc_lld_set_callback(RTCDriver *rtcp, rtccb_t callback) {
|
||||||
|
|
||||||
if (callback != NULL) {
|
if (callback != NULL) {
|
||||||
rtcp->rtc_cb = callback;
|
rtcp->callback = callback;
|
||||||
|
|
||||||
/* Interrupts are enabled only after setting up the callback, this
|
/* Interrupts are enabled only after setting up the callback, this
|
||||||
way there is no need to check for the NULL callback pointer inside
|
way there is no need to check for the NULL callback pointer inside
|
||||||
|
|
|
@ -80,11 +80,6 @@ typedef struct RTCAlarm RTCAlarm;
|
||||||
*/
|
*/
|
||||||
typedef struct RTCCallbackConfig RTCCallbackConfig;
|
typedef struct RTCCallbackConfig RTCCallbackConfig;
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Type of a structure representing an RTC wakeup period.
|
|
||||||
*/
|
|
||||||
typedef struct RTCWakeup RTCWakeup;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Type of an RTC alarm.
|
* @brief Type of an RTC alarm.
|
||||||
* @details Meaningful on platforms with more than 1 alarm comparator.
|
* @details Meaningful on platforms with more than 1 alarm comparator.
|
||||||
|
@ -113,7 +108,7 @@ struct RTCCallbackConfig{
|
||||||
/**
|
/**
|
||||||
* @brief Generic RTC callback pointer.
|
* @brief Generic RTC callback pointer.
|
||||||
*/
|
*/
|
||||||
rtccb_t rtc_cb;
|
rtccb_t callback;
|
||||||
#endif /* RTC_SUPPORTS_CALLBACKS */
|
#endif /* RTC_SUPPORTS_CALLBACKS */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -138,7 +133,7 @@ struct RTCAlarm {
|
||||||
/**
|
/**
|
||||||
* @brief Seconds since UNIX epoch.
|
* @brief Seconds since UNIX epoch.
|
||||||
*/
|
*/
|
||||||
uint32_t tv_sec;
|
uint32_t tv_sec;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -148,40 +143,12 @@ struct RTCDriver{
|
||||||
/**
|
/**
|
||||||
* @brief Callback pointer.
|
* @brief Callback pointer.
|
||||||
*/
|
*/
|
||||||
rtccb_t rtc_cb;
|
rtccb_t callback;
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Structure representing an RTC periodic wakeup period.
|
|
||||||
* @note On this platform it is pointless.
|
|
||||||
*/
|
|
||||||
struct RTCWakeup {
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver macros. */
|
/* Driver macros. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/**
|
|
||||||
* @brief Gets time of periodic wakeup.
|
|
||||||
*
|
|
||||||
* @note On this platform function is pointless.
|
|
||||||
* There is no possibilities to change period on this platform.
|
|
||||||
* It always equal to 1 second.
|
|
||||||
*
|
|
||||||
* @notapi
|
|
||||||
*/
|
|
||||||
#define rtc_lld_set_periodic_wakeup(rtcp, wakeupspec){(void)wakeupspec;}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Gets time of periodic wakeup.
|
|
||||||
*
|
|
||||||
* @note On this platform function is pointless.
|
|
||||||
* There is no possibilities to change period on this platform.
|
|
||||||
* It always equal to 1 second.
|
|
||||||
*
|
|
||||||
* @notapi
|
|
||||||
*/
|
|
||||||
#define rtc_lld_get_periodic_wakeup(rtcp, wakeupspec){(void)wakeupspec;}
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
|
@ -203,7 +170,7 @@ extern "C" {
|
||||||
void rtc_lld_get_alarm(RTCDriver *rtcp,
|
void rtc_lld_get_alarm(RTCDriver *rtcp,
|
||||||
rtcalarm_t alarm,
|
rtcalarm_t alarm,
|
||||||
RTCAlarm *alarmspec);
|
RTCAlarm *alarmspec);
|
||||||
void rtc_lld_set_callback(RTCDriver *rtcp, rtccb_t cb_cfg);
|
void rtc_lld_set_callback(RTCDriver *rtcp, rtccb_t callback);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -6,10 +6,6 @@
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16
|
USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16
|
||||||
#USE_OPT = -O1 -ggdb -fomit-frame-pointer -falign-functions=16 -fno-inline
|
|
||||||
#USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -fno-strict-aliasing
|
|
||||||
#USE_OPT = -O3 -ggdb -fomit-frame-pointer -falign-functions=16
|
|
||||||
#USE_OPT = -Os -ggdb -fomit-frame-pointer -falign-functions=16
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# C specific options here (added to USE_OPT).
|
# C specific options here (added to USE_OPT).
|
||||||
|
@ -34,7 +30,7 @@ endif
|
||||||
|
|
||||||
# Enable this if you want to see the full log while compiling.
|
# Enable this if you want to see the full log while compiling.
|
||||||
ifeq ($(USE_VERBOSE_COMPILE),)
|
ifeq ($(USE_VERBOSE_COMPILE),)
|
||||||
USE_VERBOSE_COMPILE = yes
|
USE_VERBOSE_COMPILE = no
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue