timesync code refactoring
This commit is contained in:
1 parent
ce87c67439
commit
1467d2145b
4 files changed
+130
-135
No files matched your search
+2
-7
@@ -8,7 +8,7 @@
|
||||
#define TIME_SYNC_FRAME_LENGTH 0x07 // timeserver answer frame length [bytes]
|
||||
#define TIME_SYNC_FIXUP 16 // compensation for processing time [milliseconds]
|
||||
#define TIMEREQUEST_MAX_SEQNO 0xfe // threshold for wrap around seqno
|
||||
#define TIMEREQUEST_FINISH \
|
||||
#define TIMEREQUEST_END \
|
||||
(TIMEREQUEST_MAX_SEQNO + 1) // marker for end of timesync handshake
|
||||
#define GPS_UTC_DIFF 315964800
|
||||
|
||||
@@ -24,11 +24,6 @@ void timesync_init(void);
|
||||
void timesync_sendReq(void);
|
||||
void timesync_storeReq(uint32_t timestamp, timesync_t timestamp_type);
|
||||
void IRAM_ATTR timesync_processReq(void *taskparameter);
|
||||
|
||||
#if (TIME_SYNC_LORASERVER)
|
||||
int recv_timeserver_ans(const uint8_t buf[], uint8_t buf_len);
|
||||
#elif (TIME_SYNC_LORAWAN)
|
||||
void IRAM_ATTR DevTimeAns_Cb(void *pUserData, int flagSuccess);
|
||||
#endif
|
||||
void IRAM_ATTR timesync_serverAnswer(void *pUserData, int flag);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user