removed static at some functions

This commit is contained in:
Verkehrsrot 2019-12-25 23:21:31 +01:00
parent 2208d23669
commit 04aa7e1d60
6 changed files with 12 additions and 12 deletions

View File

@ -43,10 +43,10 @@ void showLoraKeys(void);
void lora_send(void *pvParameters); void lora_send(void *pvParameters);
void lora_enqueuedata(MessageBuffer_t *message); void lora_enqueuedata(MessageBuffer_t *message);
void lora_queuereset(void); void lora_queuereset(void);
static void IRAM_ATTR myEventCallback(void *pUserData, ev_t ev); void IRAM_ATTR myEventCallback(void *pUserData, ev_t ev);
static void IRAM_ATTR myRxCallback(void *pUserData, uint8_t port, void IRAM_ATTR myRxCallback(void *pUserData, uint8_t port,
const uint8_t *pMsg, size_t nMsg); 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[], void mac_decode(const uint8_t cmd[], const uint8_t cmdlen, const mac_t table[],
const uint8_t tablesize); const uint8_t tablesize);
uint8_t getBattLevel(void); uint8_t getBattLevel(void);

View File

@ -17,7 +17,7 @@ void start_ota_update();
int version_compare(const String v1, const String v2); int version_compare(const String v1, const String v2);
void ota_display(const uint8_t row, const std::string status, void ota_display(const uint8_t row, const std::string status,
const std::string msg); 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 #endif // USE_OTA

View File

@ -9,7 +9,7 @@
void wifi_sniffer_init(void); void wifi_sniffer_init(void);
void switch_wifi_sniffer (uint8_t state); 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); void switchWifiChannel(TimerHandle_t xTimer);
#endif #endif

View File

@ -452,7 +452,7 @@ void lmictask(void *pvParameters) {
} // lmictask } // lmictask
// lmic event handler // lmic event handler
static void myEventCallback(void *pUserData, ev_t ev) { void myEventCallback(void *pUserData, ev_t ev) {
// using message descriptors from LMIC library // using message descriptors from LMIC library
static const char *const evNames[] = {LMIC_EVENT_NAME_TABLE__INIT}; 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 // 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) { size_t nMsg) {
// display type of received data // 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 // transmit complete message handler
static void myTxCallback(void *pUserData, int fSuccess) { void myTxCallback(void *pUserData, int fSuccess) {
#if (TIME_SYNC_LORASERVER) #if (TIME_SYNC_LORASERVER)
// if last packet sent was a timesync request, store TX timestamp // if last packet sent was a timesync request, store TX timestamp

View File

@ -318,7 +318,7 @@ void ota_display(const uint8_t row, const std::string status,
} }
// callback function to show download progress while streaming data // 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 #ifdef HAS_DISPLAY
char buf[17]; char buf[17];
snprintf(buf, 17, "%-9lu (%3lu%%)", current, current * 100 / size); snprintf(buf, 17, "%-9lu (%3lu%%)", current, current * 100 / size);

View File

@ -29,8 +29,8 @@ typedef struct {
} wifi_ieee80211_packet_t; } wifi_ieee80211_packet_t;
// using IRAM_:ATTR here to speed up callback function // using IRAM_:ATTR here to speed up callback function
static IRAM_ATTR void IRAM_ATTR void wifi_sniffer_packet_handler(void *buff,
wifi_sniffer_packet_handler(void *buff, wifi_promiscuous_pkt_type_t type) { wifi_promiscuous_pkt_type_t type) {
const wifi_promiscuous_pkt_t *ppkt = (wifi_promiscuous_pkt_t *)buff; const wifi_promiscuous_pkt_t *ppkt = (wifi_promiscuous_pkt_t *)buff;
const wifi_ieee80211_packet_t *ipkt = 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_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_filter(&filter)); // set frame filter
ESP_ERROR_CHECK(esp_wifi_set_promiscuous_rx_cb(&wifi_sniffer_packet_handler)); 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 ESP_ERROR_CHECK(esp_wifi_set_promiscuous(true)); // now switch on monitor mode
// setup wifi channel rotation timer // setup wifi channel rotation timer