auto-sync

This commit is contained in:
rusEfi 2016-08-09 23:03:58 -04:00
parent 524b61089a
commit a31f078dbf
3 changed files with 7 additions and 2 deletions

View File

@ -154,6 +154,8 @@ void rtc_lld_set_time(RTCDriver *rtcp, const RTCTime *timespec) {
void rtc_lld_get_time(RTCDriver *rtcp, RTCTime *timespec) {
(void)rtcp;
chDbgAssert(RTCD1.id_rtc == RTC, "RTC", "RTC");
rtc_lld_apb1_sync();
#if STM32_RTC_HAS_SUBSECONDS

View File

@ -13,8 +13,6 @@
#include "datalogging.h"
#include "histogram.h"
#define _MAX_FILLER 11
const char * boolToString(bool value) {
return value ? "Yes" : "No";
}
@ -118,6 +116,9 @@ int atoi(const char *string) {
static char todofixthismesswithcopy[100];
/**
* WARNING: due to implementation details specifid buffer should be at least size of '_MAX_FILLER'
*/
static char *ltoa_internal(char *p, long num, unsigned radix) {
int i;
char *q;

View File

@ -11,6 +11,8 @@
#include <stdint.h>
#include "global.h"
#define _MAX_FILLER 11
// http://en.wikipedia.org/wiki/Endianness
#define SWAP_UINT16(x) ((x) << 8) | ((x) >> 8)