Fixed bug #475.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6785 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
13364b3ca9
commit
24204f0de8
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file STM32/RTCv2/rtc_lld.c
|
* @file STM32/RTCv2/rtc_lld.c
|
||||||
* @brief STM32L1xx/STM32F2xx/STM32F4xx RTC low level driver.
|
* @brief RTC low level driver.
|
||||||
*
|
*
|
||||||
* @addtogroup RTC
|
* @addtogroup RTC
|
||||||
* @{
|
* @{
|
||||||
|
@ -164,16 +164,17 @@ void rtc_lld_get_time(RTCDriver *rtcp, RTCTime *timespec) {
|
||||||
* @note Default value after BKP domain reset for both comparators is 0.
|
* @note Default value after BKP domain reset for both comparators is 0.
|
||||||
* @note Function does not performs any checks of alarm time validity.
|
* @note Function does not performs any checks of alarm time validity.
|
||||||
*
|
*
|
||||||
* @param[in] rtcp Pointer to RTC driver structure.
|
* @param[in] rtcp pointer to RTC driver structure
|
||||||
* @param[in] alarm Alarm identifier. Can be 1 or 2.
|
* @param[in] alarm alarm identifier starting from zero
|
||||||
* @param[in] alarmspec Pointer to a @p RTCAlarm structure.
|
* @param[in] alarmspec pointer to a @p RTCAlarm structure
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
void rtc_lld_set_alarm(RTCDriver *rtcp,
|
void rtc_lld_set_alarm(RTCDriver *rtcp,
|
||||||
rtcalarm_t alarm,
|
rtcalarm_t alarm,
|
||||||
const RTCAlarm *alarmspec) {
|
const RTCAlarm *alarmspec) {
|
||||||
if (alarm == 1){
|
|
||||||
|
if (alarm == 0) {
|
||||||
if (alarmspec != NULL){
|
if (alarmspec != NULL){
|
||||||
rtcp->id_rtc->CR &= ~RTC_CR_ALRAE;
|
rtcp->id_rtc->CR &= ~RTC_CR_ALRAE;
|
||||||
while(!(rtcp->id_rtc->ISR & RTC_ISR_ALRAWF))
|
while(!(rtcp->id_rtc->ISR & RTC_ISR_ALRAWF))
|
||||||
|
@ -209,7 +210,7 @@ void rtc_lld_set_alarm(RTCDriver *rtcp,
|
||||||
* @brief Get alarm time.
|
* @brief Get alarm time.
|
||||||
*
|
*
|
||||||
* @param[in] rtcp pointer to RTC driver structure
|
* @param[in] rtcp pointer to RTC driver structure
|
||||||
* @param[in] alarm alarm identifier
|
* @param[in] alarm alarm identifier starting from zero
|
||||||
* @param[out] alarmspec pointer to a @p RTCAlarm structure
|
* @param[out] alarmspec pointer to a @p RTCAlarm structure
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
|
@ -217,7 +218,8 @@ void rtc_lld_set_alarm(RTCDriver *rtcp,
|
||||||
void rtc_lld_get_alarm(RTCDriver *rtcp,
|
void rtc_lld_get_alarm(RTCDriver *rtcp,
|
||||||
rtcalarm_t alarm,
|
rtcalarm_t alarm,
|
||||||
RTCAlarm *alarmspec) {
|
RTCAlarm *alarmspec) {
|
||||||
if (alarm == 1)
|
|
||||||
|
if (alarm == 0)
|
||||||
alarmspec->tv_datetime = rtcp->id_rtc->ALRMAR;
|
alarmspec->tv_datetime = rtcp->id_rtc->ALRMAR;
|
||||||
#if RTC_ALARMS == 2
|
#if RTC_ALARMS == 2
|
||||||
else
|
else
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file STM32/RTCv2/rtc_lld.h
|
* @file STM32/RTCv2/rtc_lld.h
|
||||||
* @brief STM32L1xx/STM32F2xx/STM32F4xx RTC low level driver header.
|
* @brief RTC low level driver header.
|
||||||
*
|
*
|
||||||
* @addtogroup RTC
|
* @addtogroup RTC
|
||||||
* @{
|
* @{
|
||||||
|
|
|
@ -89,6 +89,8 @@
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
|
|
||||||
*** 2.7.0 ***
|
*** 2.7.0 ***
|
||||||
|
- FIX: Fixed wrong STM32 RTCv2 alarms implementation (bug #475)(backported
|
||||||
|
to 2.6.4).
|
||||||
- FIX: Fixed wrong ADC34 macros in STM32F30x HAL driver (bug #474)
|
- FIX: Fixed wrong ADC34 macros in STM32F30x HAL driver (bug #474)
|
||||||
(backported to 2.6.4).
|
(backported to 2.6.4).
|
||||||
- FIX: Fixed wrong TIM1 and TIM8 macros in STM32F30x HAL driver (bug #473)
|
- FIX: Fixed wrong TIM1 and TIM8 macros in STM32F30x HAL driver (bug #473)
|
||||||
|
|
Loading…
Reference in New Issue