auto-sync
This commit is contained in:
parent
524b61089a
commit
a31f078dbf
|
@ -154,6 +154,8 @@ void rtc_lld_set_time(RTCDriver *rtcp, const RTCTime *timespec) {
|
||||||
void rtc_lld_get_time(RTCDriver *rtcp, RTCTime *timespec) {
|
void rtc_lld_get_time(RTCDriver *rtcp, RTCTime *timespec) {
|
||||||
(void)rtcp;
|
(void)rtcp;
|
||||||
|
|
||||||
|
chDbgAssert(RTCD1.id_rtc == RTC, "RTC", "RTC");
|
||||||
|
|
||||||
rtc_lld_apb1_sync();
|
rtc_lld_apb1_sync();
|
||||||
|
|
||||||
#if STM32_RTC_HAS_SUBSECONDS
|
#if STM32_RTC_HAS_SUBSECONDS
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
#include "datalogging.h"
|
#include "datalogging.h"
|
||||||
#include "histogram.h"
|
#include "histogram.h"
|
||||||
|
|
||||||
#define _MAX_FILLER 11
|
|
||||||
|
|
||||||
const char * boolToString(bool value) {
|
const char * boolToString(bool value) {
|
||||||
return value ? "Yes" : "No";
|
return value ? "Yes" : "No";
|
||||||
}
|
}
|
||||||
|
@ -118,6 +116,9 @@ int atoi(const char *string) {
|
||||||
|
|
||||||
static char todofixthismesswithcopy[100];
|
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) {
|
static char *ltoa_internal(char *p, long num, unsigned radix) {
|
||||||
int i;
|
int i;
|
||||||
char *q;
|
char *q;
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
|
#define _MAX_FILLER 11
|
||||||
|
|
||||||
// http://en.wikipedia.org/wiki/Endianness
|
// http://en.wikipedia.org/wiki/Endianness
|
||||||
|
|
||||||
#define SWAP_UINT16(x) ((x) << 8) | ((x) >> 8)
|
#define SWAP_UINT16(x) ((x) << 8) | ((x) >> 8)
|
||||||
|
|
Loading…
Reference in New Issue