removal of all time libs (inital commit)
This commit is contained in:
1 parent
bbc9cc735b
commit
df8d218c43
20 files changed
+208
-136
No files matched your search
+1
-4
@@ -4,9 +4,6 @@
|
||||
#include "globals.h"
|
||||
#include "timekeeper.h"
|
||||
|
||||
#define DCF77_FRAME_SIZE (60)
|
||||
#define DCF77_PULSE_LENGTH (100)
|
||||
|
||||
#ifdef DCF77_ACTIVE_LOW
|
||||
enum dcf_pinstate { dcf_high, dcf_low };
|
||||
#else
|
||||
@@ -16,7 +13,7 @@ enum dcf_pinstate { dcf_low, dcf_high };
|
||||
enum DCF77_Pulses { dcf_Z, dcf_0, dcf_1 };
|
||||
|
||||
void DCF77_Pulse(time_t t, uint8_t const *DCFpulse);
|
||||
uint8_t *IRAM_ATTR DCF77_Frame(time_t const t);
|
||||
uint8_t *IRAM_ATTR DCF77_Frame(time_t const tt);
|
||||
uint8_t IRAM_ATTR dec2bcd(uint8_t const dec, uint8_t const startpos, uint8_t const endpos,
|
||||
uint8_t *DCFpulse);
|
||||
uint8_t IRAM_ATTR setParityBit(uint8_t const p);
|
||||
|
||||
+2
-2
@@ -5,7 +5,6 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
// Time functions
|
||||
#include <ezTime.h>
|
||||
#include <RtcDateTime.h>
|
||||
#include <Ticker.h>
|
||||
|
||||
@@ -111,6 +110,7 @@ typedef struct {
|
||||
float pm25;
|
||||
} sdsStatus_t;
|
||||
|
||||
extern char clientId[20]; // unique clientID
|
||||
extern char clientId[20]; // unique clientID
|
||||
extern time_t _COMPILETIME; // epoch build time
|
||||
|
||||
#endif
|
||||
@@ -21,6 +21,5 @@ bool gps_hasfix();
|
||||
void gps_storelocation(gpsStatus_t *gps_store);
|
||||
void gps_loop(void *pvParameters);
|
||||
time_t get_gpstime(uint16_t *msec);
|
||||
time_t get_gpstime(void);
|
||||
|
||||
#endif
|
||||
@@ -10,7 +10,7 @@
|
||||
#define MOBALINE_HEAD_PULSE_LENGTH (1500)
|
||||
|
||||
void MOBALINE_Pulse(time_t t, uint8_t const *DCFpulse);
|
||||
uint8_t *IRAM_ATTR MOBALINE_Frame(time_t const t);
|
||||
uint8_t *IRAM_ATTR MOBALINE_Frame(time_t const tt);
|
||||
void IRAM_ATTR dec2bcd(uint8_t const dec, uint8_t const startpos,
|
||||
uint8_t const endpos, uint8_t *DCFpulse);
|
||||
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
#include "if482.h"
|
||||
#include "dcf77.h"
|
||||
|
||||
#define SECS_YR_2000 (946684800UL) // the time at the start of y2k
|
||||
#define GPS_UTC_DIFF 315964800UL // seconds diff between gps and utc epoch
|
||||
#define LEAP_SECS_SINCE_GPSEPOCH 18UL // state of 2021
|
||||
|
||||
enum timesource_t { _gps, _rtc, _lora, _unsynced, _set };
|
||||
|
||||
extern const char timeSetSymbols[];
|
||||
extern Ticker timesyncer;
|
||||
extern timesource_t timeSource;
|
||||
extern TaskHandle_t ClockTask;
|
||||
extern Timezone myTZ;
|
||||
extern bool volatile TimePulseTick; // 1sec pps flag set by GPS or RTC
|
||||
extern hw_timer_t *ppsIRQ;
|
||||
|
||||
@@ -25,11 +28,12 @@ void clock_loop(void *pvParameters);
|
||||
void timepulse_start(void);
|
||||
void setTimeSyncIRQ(void);
|
||||
uint8_t timepulse_init(void);
|
||||
time_t timeIsValid(time_t const t);
|
||||
bool timeIsValid(time_t const t);
|
||||
void calibrateTime(void);
|
||||
void IRAM_ATTR setMyTime(uint32_t t_sec, uint16_t t_msec,
|
||||
timesource_t mytimesource);
|
||||
time_t compiledUTC(void);
|
||||
time_t compileTime(const String compile_date);
|
||||
time_t mkgmtime(const struct tm *ptm);
|
||||
TickType_t tx_Ticks(uint32_t framesize, unsigned long baud, uint32_t config,
|
||||
int8_t rxPin, int8_t txPins);
|
||||
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
#define TIME_SYNC_FIXUP 25 // compensation for processing time [milliseconds]
|
||||
#define TIME_SYNC_MAX_SEQNO 0xfe // threshold for wrap around time_sync_seqNo
|
||||
#define TIME_SYNC_END_FLAG (TIME_SYNC_MAX_SEQNO + 1) // end of handshake marker
|
||||
#define GPS_UTC_DIFF 315964800UL // seconds diff between gps and utc epoch
|
||||
#define LEAP_SECS_SINCE_GPSEPOCH 18UL // state of 2021
|
||||
|
||||
enum timesync_t {
|
||||
timesync_tx,
|
||||
|
||||
Reference in new issue
Block a user