diff --git a/include/lorawan.h b/include/lorawan.h index 72f42d26..11e45b4d 100644 --- a/include/lorawan.h +++ b/include/lorawan.h @@ -43,10 +43,10 @@ void showLoraKeys(void); void lora_send(void *pvParameters); void lora_enqueuedata(MessageBuffer_t *message); void lora_queuereset(void); -static void IRAM_ATTR myEventCallback(void *pUserData, ev_t ev); -static void IRAM_ATTR myRxCallback(void *pUserData, uint8_t port, +void IRAM_ATTR myEventCallback(void *pUserData, ev_t ev); +void IRAM_ATTR myRxCallback(void *pUserData, uint8_t port, const uint8_t *pMsg, size_t nMsg); -static void IRAM_ATTR myTxCallback(void *pUserData, int fSuccess); +void IRAM_ATTR myTxCallback(void *pUserData, int fSuccess); void mac_decode(const uint8_t cmd[], const uint8_t cmdlen, const mac_t table[], const uint8_t tablesize); uint8_t getBattLevel(void); diff --git a/include/ota.h b/include/ota.h index 6a92720d..cec28750 100644 --- a/include/ota.h +++ b/include/ota.h @@ -17,7 +17,7 @@ void start_ota_update(); int version_compare(const String v1, const String v2); void ota_display(const uint8_t row, const std::string status, const std::string msg); -static void show_progress(unsigned long current, unsigned long size); +void show_progress(unsigned long current, unsigned long size); #endif // USE_OTA diff --git a/include/wifiscan.h b/include/wifiscan.h index 340208cb..2e093cf8 100644 --- a/include/wifiscan.h +++ b/include/wifiscan.h @@ -9,7 +9,7 @@ void wifi_sniffer_init(void); void switch_wifi_sniffer (uint8_t state); -static void IRAM_ATTR wifi_sniffer_packet_handler(void *buff, wifi_promiscuous_pkt_type_t type); +void IRAM_ATTR wifi_sniffer_packet_handler(void *buff, wifi_promiscuous_pkt_type_t type); void switchWifiChannel(TimerHandle_t xTimer); #endif \ No newline at end of file diff --git a/src/lorawan.cpp b/src/lorawan.cpp index ff8ecfe7..36c42b35 100644 --- a/src/lorawan.cpp +++ b/src/lorawan.cpp @@ -452,7 +452,7 @@ void lmictask(void *pvParameters) { } // lmictask // lmic event handler -static void myEventCallback(void *pUserData, ev_t ev) { +void myEventCallback(void *pUserData, ev_t ev) { // using message descriptors from LMIC library static const char *const evNames[] = {LMIC_EVENT_NAME_TABLE__INIT}; @@ -502,7 +502,7 @@ static void myEventCallback(void *pUserData, ev_t ev) { } // receive message handler -static void myRxCallback(void *pUserData, uint8_t port, const uint8_t *pMsg, +void myRxCallback(void *pUserData, uint8_t port, const uint8_t *pMsg, size_t nMsg) { // display type of received data @@ -557,7 +557,7 @@ static void myRxCallback(void *pUserData, uint8_t port, const uint8_t *pMsg, } // transmit complete message handler -static void myTxCallback(void *pUserData, int fSuccess) { +void myTxCallback(void *pUserData, int fSuccess) { #if (TIME_SYNC_LORASERVER) // if last packet sent was a timesync request, store TX timestamp diff --git a/src/ota.cpp b/src/ota.cpp index 10938b0d..10a9ed43 100644 --- a/src/ota.cpp +++ b/src/ota.cpp @@ -318,7 +318,7 @@ void ota_display(const uint8_t row, const std::string status, } // callback function to show download progress while streaming data -static void show_progress(unsigned long current, unsigned long size) { +void show_progress(unsigned long current, unsigned long size) { #ifdef HAS_DISPLAY char buf[17]; snprintf(buf, 17, "%-9lu (%3lu%%)", current, current * 100 / size); diff --git a/src/wifiscan.cpp b/src/wifiscan.cpp index dc2fd29d..13e03e2b 100644 --- a/src/wifiscan.cpp +++ b/src/wifiscan.cpp @@ -29,8 +29,8 @@ typedef struct { } wifi_ieee80211_packet_t; // using IRAM_:ATTR here to speed up callback function -static IRAM_ATTR void -wifi_sniffer_packet_handler(void *buff, wifi_promiscuous_pkt_type_t type) { +IRAM_ATTR void wifi_sniffer_packet_handler(void *buff, + wifi_promiscuous_pkt_type_t type) { const wifi_promiscuous_pkt_t *ppkt = (wifi_promiscuous_pkt_t *)buff; const wifi_ieee80211_packet_t *ipkt = @@ -75,7 +75,7 @@ void wifi_sniffer_init(void) { ESP_ERROR_CHECK(esp_wifi_set_ps(WIFI_PS_NONE)); // no modem power saving ESP_ERROR_CHECK(esp_wifi_set_promiscuous_filter(&filter)); // set frame filter ESP_ERROR_CHECK(esp_wifi_set_promiscuous_rx_cb(&wifi_sniffer_packet_handler)); - ESP_ERROR_CHECK(esp_wifi_start()); //for esp_wifi v3.3 + ESP_ERROR_CHECK(esp_wifi_start()); // for esp_wifi v3.3 ESP_ERROR_CHECK(esp_wifi_set_promiscuous(true)); // now switch on monitor mode // setup wifi channel rotation timer