From 375764f87c2032c8974c95de2f51c6528a7b2418 Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Sat, 26 Feb 2022 17:26:14 +0100 Subject: [PATCH] cleanup IRAM_ATTR --- include/hash.h | 2 +- include/lorawan.h | 6 +++--- include/rcommand.h | 2 +- include/timekeeper.h | 2 +- include/timesync.h | 4 ++-- src/hash.cpp | 2 +- src/rcommand.cpp | 2 +- src/timekeeper.cpp | 2 +- src/timesync.cpp | 4 ++-- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/hash.h b/include/hash.h index fe756ec3..fab8df90 100644 --- a/include/hash.h +++ b/include/hash.h @@ -4,6 +4,6 @@ #include #include -uint32_t IRAM_ATTR myhash(const char *data, int len); +uint32_t myhash(const char *data, int len); #endif \ No newline at end of file diff --git a/include/lorawan.h b/include/lorawan.h index 0c870bb9..32ddc4ba 100644 --- a/include/lorawan.h +++ b/include/lorawan.h @@ -38,10 +38,10 @@ void lora_send(void *pvParameters); void lora_enqueuedata(MessageBuffer_t *message); void lora_queuereset(void); uint32_t lora_queuewaiting(void); -void IRAM_ATTR myEventCallback(void *pUserData, ev_t ev); -void IRAM_ATTR myRxCallback(void *pUserData, uint8_t port, const uint8_t *pMsg, +void myEventCallback(void *pUserData, ev_t ev); +void myRxCallback(void *pUserData, uint8_t port, const uint8_t *pMsg, size_t nMsg); -void IRAM_ATTR myTxCallback(void *pUserData, int fSuccess); +void myTxCallback(void *pUserData, int fSuccess); const char *getSfName(rps_t rps); const char *getBwName(rps_t rps); const char *getCrName(rps_t rps); diff --git a/include/rcommand.h b/include/rcommand.h index d842fdef..e01369b1 100644 --- a/include/rcommand.h +++ b/include/rcommand.h @@ -34,7 +34,7 @@ typedef struct { uint8_t cmdLen; } RcmdBuffer_t; -void IRAM_ATTR rcommand(const uint8_t *cmd, const size_t cmdlength); +void rcommand(const uint8_t *cmd, const size_t cmdlength); void rcmd_queuereset(void); uint32_t rcmd_queuewaiting(void); void rcmd_deinit(void); diff --git a/include/timekeeper.h b/include/timekeeper.h index ee20913e..e28b60d9 100644 --- a/include/timekeeper.h +++ b/include/timekeeper.h @@ -34,7 +34,7 @@ void setTimeSyncIRQ(void); uint8_t timepulse_init(void); bool timeIsValid(time_t const t); void calibrateTime(void); -bool IRAM_ATTR setMyTime(uint32_t t_sec, uint16_t t_msec, +bool setMyTime(uint32_t t_sec, uint16_t t_msec, timesource_t mytimesource); time_t compileTime(void); time_t mkgmtime(const struct tm *ptm); diff --git a/include/timesync.h b/include/timesync.h index cd517421..f12f70ec 100644 --- a/include/timesync.h +++ b/include/timesync.h @@ -21,7 +21,7 @@ enum timesync_t { void timesync_init(void); void timesync_request(void); void timesync_store(uint32_t timestamp, timesync_t timestamp_type); -void IRAM_ATTR timesync_processReq(void *taskparameter); -void IRAM_ATTR timesync_serverAnswer(void *pUserData, int flag); +void timesync_processReq(void *taskparameter); +void timesync_serverAnswer(void *pUserData, int flag); #endif diff --git a/src/hash.cpp b/src/hash.cpp index 78f31d03..864a51cd 100644 --- a/src/hash.cpp +++ b/src/hash.cpp @@ -40,6 +40,6 @@ #undef ROKKIT_ENABLE_8BIT_OPTIMIZATIONS #endif -uint32_t IRAM_ATTR myhash(const char *data, int len) { +uint32_t myhash(const char *data, int len) { return rokkit(data, len); } diff --git a/src/rcommand.cpp b/src/rcommand.cpp index 71c6f453..12c21e01 100644 --- a/src/rcommand.cpp +++ b/src/rcommand.cpp @@ -487,7 +487,7 @@ void rcmd_process(void *pvParameters) { } // rcmd_process() // enqueue remote command -void IRAM_ATTR rcommand(const uint8_t *cmd, const size_t cmdlength) { +void rcommand(const uint8_t *cmd, const size_t cmdlength) { RcmdBuffer_t rcmd = {0}; diff --git a/src/timekeeper.cpp b/src/timekeeper.cpp index f2765bf7..24c25f9e 100644 --- a/src/timekeeper.cpp +++ b/src/timekeeper.cpp @@ -60,7 +60,7 @@ void calibrateTime(void) { } // calibrateTime() // set system time (UTC), calibrate RTC and RTC_INT pps -bool IRAM_ATTR setMyTime(uint32_t t_sec, uint16_t t_msec, +bool setMyTime(uint32_t t_sec, uint16_t t_msec, timesource_t mytimesource) { struct timeval tv = {0}; diff --git a/src/timesync.cpp b/src/timesync.cpp index 80355eb8..8660c597 100644 --- a/src/timesync.cpp +++ b/src/timesync.cpp @@ -55,7 +55,7 @@ void timesync_request(void) { } // task for processing time sync request -void IRAM_ATTR timesync_processReq(void *taskparameter) { +void timesync_processReq(void *taskparameter) { uint32_t rcv_seqNo = TIME_SYNC_END_FLAG; uint32_t time_offset_sec = 0, time_offset_ms = 0; @@ -173,7 +173,7 @@ void timesync_store(uint32_t timestamp, timesync_t timestamp_type) { } // callback function to receive time answer from network or answer -void IRAM_ATTR timesync_serverAnswer(void *pUserData, int flag) { +void timesync_serverAnswer(void *pUserData, int flag) { #if (HAS_LORA_TIME)