Skip to content

Commit

Permalink
test for compil with esp8266 3.0.0 core
Browse files Browse the repository at this point in the history
  • Loading branch information
stef-ladefense committed May 31, 2021
1 parent dbdb7dc commit ed22ce9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/NTPClientLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ void NTPClient::processDNSTimeout () {
onSyncEvent (invalidAddress);
}

void ICACHE_RAM_ATTR NTPClient::s_processDNSTimeout (void* arg) {
void IRAM_ATTR NTPClient::s_processDNSTimeout (void* arg) {
reinterpret_cast<NTPClient*>(arg)->processDNSTimeout ();
}
#endif
Expand Down Expand Up @@ -334,7 +334,7 @@ time_t NTPClient::getTime () {

}

void dumpNTPPacket (byte *data, size_t length) {
void dumpNTPPacket (uint8_t *data, size_t length) {
//byte *data = packet.data ();
//size_t length = packet.length ();

Expand Down Expand Up @@ -426,7 +426,7 @@ void NTPClient::processPacket (AsyncUDPPacket& packet) {
DEBUGLOG ("\n");
}

void ICACHE_RAM_ATTR NTPClient::processRequestTimeout () {
void IRAM_ATTR NTPClient::processRequestTimeout () {
status = unsyncd;
//timer1_disable ();
responseTimer.detach ();
Expand All @@ -435,7 +435,7 @@ void ICACHE_RAM_ATTR NTPClient::processRequestTimeout () {
onSyncEvent (noResponse);
}

void ICACHE_RAM_ATTR NTPClient::s_processRequestTimeout (void* arg) {
void IRAM_ATTR NTPClient::s_processRequestTimeout (void* arg) {
NTPClient* self = reinterpret_cast<NTPClient*>(arg);
self->processRequestTimeout ();
}
Expand Down Expand Up @@ -652,7 +652,7 @@ time_t NTPClient::getFirstSync () {
return _firstSync;
}

bool NTPClient::summertime (int year, byte month, byte day, byte hour, byte weekday, byte tzHours)
bool NTPClient::summertime (uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t weekday, uint8_t tzHours)
// input parameters: "normal time" for year, month, day, hour, weekday and tzHours (0=UTC, 1=MEZ)
{
if (DST_ZONE_EU == _dstZone) {
Expand Down
8 changes: 4 additions & 4 deletions src/NtpClientLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -475,16 +475,16 @@ class NTPClient {
/**
* Process internal state in case of a response timeout. If a response comes later is is asumed as non valid.
*/
void ICACHE_RAM_ATTR processRequestTimeout ();
void IRAM_ATTR processRequestTimeout ();

/**
* Static method for Ticker argument.
*/
static void ICACHE_RAM_ATTR s_processRequestTimeout (void* arg);
static void IRAM_ATTR s_processRequestTimeout (void* arg);

static void s_dnsFound (const char *name, const ip_addr_t *ipaddr, void *callback_arg);
void dnsFound (const ip_addr_t *ipaddr);
static void ICACHE_RAM_ATTR s_processDNSTimeout (void* arg);
static void IRAM_ATTR s_processDNSTimeout (void* arg);
void processDNSTimeout ();

#endif
Expand All @@ -505,7 +505,7 @@ class NTPClient {
* @param[in] Time zone offset.
* @param[out] true if date and time are inside summertime period.
*/
bool summertime (int year, byte month, byte day, byte hour, byte weekday, byte tzHours);
bool summertime (uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t weekday, uint8_t tzHours);

/**
* Helper function to add leading 0 to hour, minutes or seconds if < 10.
Expand Down

0 comments on commit ed22ce9

Please sign in to comment.