stm32/rtc: Don't try to set SubSeconds value on RTC.

The hardware doesn't allow it, instead the value is reset to 255 upon
setting the other calendar/time values.
This commit is contained in:
Damien George 2018-05-21 14:08:37 +10:00
parent 6bd78741c1
commit 6c955932f3
2 changed files with 1 additions and 2 deletions

View File

@ -31,7 +31,7 @@ Methods
With no arguments, this method returns an 8-tuple with the current
date and time. With 1 argument (being an 8-tuple) it sets the date
and time.
and time (and ``subseconds`` is reset to 255).
.. only:: port_pyboard

View File

@ -529,7 +529,6 @@ mp_obj_t pyb_rtc_datetime(size_t n_args, const mp_obj_t *args) {
time.Hours = mp_obj_get_int(items[4]);
time.Minutes = mp_obj_get_int(items[5]);
time.Seconds = mp_obj_get_int(items[6]);
time.SubSeconds = rtc_us_to_subsec(mp_obj_get_int(items[7]));
time.TimeFormat = RTC_HOURFORMAT12_AM;
time.DayLightSaving = RTC_DAYLIGHTSAVING_NONE;
time.StoreOperation = RTC_STOREOPERATION_SET;