From 4ee993795012eb169a6e4f6c37d5aff239452d61 Mon Sep 17 00:00:00 2001 From: fvanroie <15969459+fvanroie@users.noreply.github.com> Date: Mon, 8 Feb 2021 00:36:41 +0100 Subject: [PATCH] Remove IRAM_ATTR to save some space --- src/drv/hasp_drv_ft5206.cpp | 2 +- src/drv/hasp_drv_ft5206.h | 2 +- src/drv/hasp_drv_ft6336u.cpp | 2 +- src/drv/hasp_drv_ft6336u.h | 2 +- src/drv/hasp_drv_gt911.cpp | 6 +++--- src/drv/hasp_drv_gt911.h | 4 ++-- src/drv/hasp_drv_touch.cpp | 2 +- src/hasp/hasp.cpp | 2 +- src/hasp/hasp.h | 2 +- src/hasp_config.h | 2 +- src/hasp_debug.cpp | 2 +- src/hasp_debug.h | 2 +- src/hasp_eeprom.cpp | 2 +- src/hasp_eeprom.h | 2 +- src/hasp_gpio.cpp | 2 +- src/hasp_gpio.h | 2 +- src/hasp_gui.h | 2 +- src/net/hasp_ethernet_esp32.cpp | 2 +- src/net/hasp_ethernet_esp32.h | 2 +- src/net/hasp_network.cpp | 2 +- src/net/hasp_network.h | 2 +- src/svc/hasp_http.h | 2 +- src/svc/hasp_mdns.h | 2 +- src/svc/hasp_mqtt.h | 4 ++-- src/svc/hasp_ota.cpp | 2 +- src/svc/hasp_ota.h | 2 +- src/svc/hasp_slave.cpp | 2 +- src/svc/hasp_slave.h | 2 +- src/svc/hasp_telnet.cpp | 2 +- src/svc/hasp_telnet.h | 2 +- 30 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/drv/hasp_drv_ft5206.cpp b/src/drv/hasp_drv_ft5206.cpp index 6b869be0..2c89b4b5 100644 --- a/src/drv/hasp_drv_ft5206.cpp +++ b/src/drv/hasp_drv_ft5206.cpp @@ -11,7 +11,7 @@ FT5206_Class * touchpanel; // Read touch points -bool IRAM_ATTR FT5206_getXY(int16_t * touchX, int16_t * touchY, bool debug) +bool FT5206_getXY(int16_t * touchX, int16_t * touchY, bool debug) { if(!touchpanel->touched()) return false; diff --git a/src/drv/hasp_drv_ft5206.h b/src/drv/hasp_drv_ft5206.h index 56420dcb..e53c1c07 100644 --- a/src/drv/hasp_drv_ft5206.h +++ b/src/drv/hasp_drv_ft5206.h @@ -10,7 +10,7 @@ #include "hasp_debug.h" // for TAG_DRVR -bool IRAM_ATTR FT5206_getXY(int16_t * touchX, int16_t * touchY, bool debug); +bool FT5206_getXY(int16_t * touchX, int16_t * touchY, bool debug); void FT5206_init(); #endif diff --git a/src/drv/hasp_drv_ft6336u.cpp b/src/drv/hasp_drv_ft6336u.cpp index ff7c6f0c..54aaa74b 100644 --- a/src/drv/hasp_drv_ft6336u.cpp +++ b/src/drv/hasp_drv_ft6336u.cpp @@ -11,7 +11,7 @@ FT6336U * touchpanel; // Read touch points -bool IRAM_ATTR FT6336U_getXY(int16_t * touchX, int16_t * touchY, bool debug) +bool FT6336U_getXY(int16_t * touchX, int16_t * touchY, bool debug) { if(touchpanel->read_touch_number() != 1) return false; diff --git a/src/drv/hasp_drv_ft6336u.h b/src/drv/hasp_drv_ft6336u.h index dfb4b698..f8e0e1e3 100644 --- a/src/drv/hasp_drv_ft6336u.h +++ b/src/drv/hasp_drv_ft6336u.h @@ -8,7 +8,7 @@ #include "hasp_debug.h" // for TAG_DRVR -bool IRAM_ATTR FT6336U_getXY(int16_t * touchX, int16_t * touchY, bool debug); +bool FT6336U_getXY(int16_t * touchX, int16_t * touchY, bool debug); void FT6336U_init(); #endif diff --git a/src/drv/hasp_drv_gt911.cpp b/src/drv/hasp_drv_gt911.cpp index 1a898ede..70046c15 100644 --- a/src/drv/hasp_drv_gt911.cpp +++ b/src/drv/hasp_drv_gt911.cpp @@ -14,7 +14,7 @@ static int8_t GT911_num_touches; static GTPoint * GT911_points; // Store touch points into global variable -void IRAM_ATTR GT911_setXY(int8_t contacts, GTPoint * points) +void GT911_setXY(int8_t contacts, GTPoint * points) { GT911_num_touches = contacts; GT911_points = points; @@ -27,7 +27,7 @@ void IRAM_ATTR GT911_setXY(int8_t contacts, GTPoint * points) } // Read touch points from global variable -bool IRAM_ATTR GT911_getXY(int16_t * touchX, int16_t * touchY, bool debug) +bool GT911_getXY(int16_t * touchX, int16_t * touchY, bool debug) { static GTPoint points[5]; int16_t contacts = touch.readInput((uint8_t *)&points); @@ -101,7 +101,7 @@ void GT911_init() Log.trace(TAG_DRVR, F("Goodix GT911x touch driver started")); } -void IRAM_ATTR GT911_loop() +void GT911_loop() { touch.loop(); } diff --git a/src/drv/hasp_drv_gt911.h b/src/drv/hasp_drv_gt911.h index d1c4e8cb..d72627a0 100644 --- a/src/drv/hasp_drv_gt911.h +++ b/src/drv/hasp_drv_gt911.h @@ -8,9 +8,9 @@ #include "hasp_debug.h" // for TAG_DRVR -bool IRAM_ATTR GT911_getXY(int16_t * touchX, int16_t * touchY, bool debug); +bool GT911_getXY(int16_t * touchX, int16_t * touchY, bool debug); void GT911_init(); -void IRAM_ATTR GT911_loop(); +void GT911_loop(); #endif #endif \ No newline at end of file diff --git a/src/drv/hasp_drv_touch.cpp b/src/drv/hasp_drv_touch.cpp index 1d36fae9..bb311480 100644 --- a/src/drv/hasp_drv_touch.cpp +++ b/src/drv/hasp_drv_touch.cpp @@ -151,7 +151,7 @@ bool touch_rotate = false; bool touch_invert_x = false; bool touch_invert_y = false; -bool IRAM_ATTR drv_touch_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data) +bool drv_touch_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data) { #if TOUCH_DRIVER > 0 int16_t touchX = 0; diff --git a/src/hasp/hasp.cpp b/src/hasp/hasp.cpp index 34fae42e..75c5faef 100644 --- a/src/hasp/hasp.cpp +++ b/src/hasp/hasp.cpp @@ -459,7 +459,7 @@ void haspSetup(void) * STATIC FUNCTIONS **********************/ -void IRAM_ATTR haspLoop(void) +void haspLoop(void) {} /* diff --git a/src/hasp/hasp.h b/src/hasp/hasp.h index 1836dcbe..ee7c13c1 100644 --- a/src/hasp/hasp.h +++ b/src/hasp/hasp.h @@ -43,7 +43,7 @@ extern "C" { * Create a hasp application */ void haspSetup(void); -void IRAM_ATTR haspLoop(void); +void haspLoop(void); // void haspEverySecond(void); // See MACROS void haspReconnect(void); diff --git a/src/hasp_config.h b/src/hasp_config.h index cd556da5..6451fdba 100644 --- a/src/hasp_config.h +++ b/src/hasp_config.h @@ -12,7 +12,7 @@ /* ===== Default Event Processors ===== */ void configSetup(void); -void IRAM_ATTR configLoop(void); +void configLoop(void); void configEverySecond(void); void configStart(void); void configStop(void); diff --git a/src/hasp_debug.cpp b/src/hasp_debug.cpp index 09236cbb..5764134d 100644 --- a/src/hasp_debug.cpp +++ b/src/hasp_debug.cpp @@ -685,7 +685,7 @@ void debugLvglLogEvent(lv_log_level_t level, const char * file, uint32_t line, c } #endif -void IRAM_ATTR debugLoop(void) +void debugLoop(void) { int16_t keypress; do { diff --git a/src/hasp_debug.h b/src/hasp_debug.h index 6851281d..ffaf314a 100644 --- a/src/hasp_debug.h +++ b/src/hasp_debug.h @@ -13,7 +13,7 @@ /* ===== Default Event Processors ===== */ void debugPreSetup(JsonObject settings); void debugSetup(); -void IRAM_ATTR debugLoop(void); +void debugLoop(void); void debugEverySecond(void); void debugStart(void); void debugStop(void); diff --git a/src/hasp_eeprom.cpp b/src/hasp_eeprom.cpp index 02a31e72..7faa5527 100644 --- a/src/hasp_eeprom.cpp +++ b/src/hasp_eeprom.cpp @@ -22,5 +22,5 @@ void eepromSetup() // debugPrintln("EEPROM: Started Eeprom"); } -void IRAM_ATTR eepromLoop() +void eepromLoop() {} \ No newline at end of file diff --git a/src/hasp_eeprom.h b/src/hasp_eeprom.h index 08fc877c..c2d83d22 100644 --- a/src/hasp_eeprom.h +++ b/src/hasp_eeprom.h @@ -7,7 +7,7 @@ #include void eepromSetup(void); -void IRAM_ATTR eepromLoop(void); +void eepromLoop(void); void eepromWrite(uint16_t addr, std::string & data); std::string eepromRead(uint16_t addr); diff --git a/src/hasp_gpio.cpp b/src/hasp_gpio.cpp index 4c1f2539..3575d1c0 100644 --- a/src/hasp_gpio.cpp +++ b/src/hasp_gpio.cpp @@ -113,7 +113,7 @@ void aceButtonSetup(void) buttonConfig->setRepeatPressInterval(LV_INDEV_DEF_LONG_PRESS_REP_TIME); } -void IRAM_ATTR gpioLoop(void) +void gpioLoop(void) { // Should be called every 4-5ms or faster, for the default debouncing time of ~20ms. for(uint8_t i = 0; i < gpioUsedInputCount; i++) { diff --git a/src/hasp_gpio.h b/src/hasp_gpio.h index d2ddaa1a..1ff8507c 100644 --- a/src/hasp_gpio.h +++ b/src/hasp_gpio.h @@ -20,7 +20,7 @@ struct hasp_gpio_config_t }; void gpioSetup(void); -void IRAM_ATTR gpioLoop(void); +void gpioLoop(void); void gpioEvery5Seconds(void); // void gpio_set_group_onoff(uint8_t groupid, bool ison); diff --git a/src/hasp_gui.h b/src/hasp_gui.h index ea2caa94..8db8e1f7 100644 --- a/src/hasp_gui.h +++ b/src/hasp_gui.h @@ -9,7 +9,7 @@ /* ===== Default Event Processors ===== */ void guiSetup(); -void IRAM_ATTR guiLoop(void); +void guiLoop(void); void guiEverySecond(void); void guiStart(void); void guiStop(void); diff --git a/src/net/hasp_ethernet_esp32.cpp b/src/net/hasp_ethernet_esp32.cpp index b5b61c21..72fc4f39 100644 --- a/src/net/hasp_ethernet_esp32.cpp +++ b/src/net/hasp_ethernet_esp32.cpp @@ -54,7 +54,7 @@ void ethernetSetup() ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLKMODE); } -void IRAM_ATTR ethernetLoop(void) +void ethernetLoop(void) {} bool ethernetEvery5Seconds() diff --git a/src/net/hasp_ethernet_esp32.h b/src/net/hasp_ethernet_esp32.h index 4b99113a..5e824a34 100644 --- a/src/net/hasp_ethernet_esp32.h +++ b/src/net/hasp_ethernet_esp32.h @@ -7,7 +7,7 @@ static bool eth_connected = false; void ethernetSetup(); -void IRAM_ATTR ethernetLoop(void); +void ethernetLoop(void); bool ethernetEvery5Seconds(); void ethernet_get_statusupdate(char * buffer, size_t len); diff --git a/src/net/hasp_network.cpp b/src/net/hasp_network.cpp index a70556a2..31ab26d2 100644 --- a/src/net/hasp_network.cpp +++ b/src/net/hasp_network.cpp @@ -50,7 +50,7 @@ void networkSetup() #endif } -void IRAM_ATTR networkLoop(void) +void networkLoop(void) { #if HASP_USE_ETHERNET > 0 ethernetLoop(); diff --git a/src/net/hasp_network.h b/src/net/hasp_network.h index 2bd61526..facd76e7 100644 --- a/src/net/hasp_network.h +++ b/src/net/hasp_network.h @@ -6,7 +6,7 @@ /* ===== Default Event Processors ===== */ void networkSetup(); -void IRAM_ATTR networkLoop(void); +void networkLoop(void); bool networkEvery5Seconds(void); // bool networkEverySecond(void); void networkStart(void); diff --git a/src/svc/hasp_http.h b/src/svc/hasp_http.h index a4dff868..34e2bd1d 100644 --- a/src/svc/hasp_http.h +++ b/src/svc/hasp_http.h @@ -16,7 +16,7 @@ struct hasp_http_config_t }; void httpSetup(); -void IRAM_ATTR httpLoop(void); +void httpLoop(void); void httpEvery5Seconds(void); // void httpReconnect(void); void httpStart(void); diff --git a/src/svc/hasp_mdns.h b/src/svc/hasp_mdns.h index 9749a0a5..9886b823 100644 --- a/src/svc/hasp_mdns.h +++ b/src/svc/hasp_mdns.h @@ -13,7 +13,7 @@ struct hasp_mdns_config_t /* ===== Default Event Processors ===== */ void mdnsSetup(); -void IRAM_ATTR mdnsLoop(void); +void mdnsLoop(void); void mdnsStart(void); void mdnsStop(void); diff --git a/src/svc/hasp_mqtt.h b/src/svc/hasp_mqtt.h index 07f92a33..c1343a3c 100644 --- a/src/svc/hasp_mqtt.h +++ b/src/svc/hasp_mqtt.h @@ -7,7 +7,7 @@ #include "ArduinoJson.h" void mqttSetup(); -void IRAM_ATTR mqttLoop(); +void mqttLoop(); void mqttEvery5Seconds(bool wifiIsConnected); void mqttStart(); void mqttStop(); @@ -15,7 +15,7 @@ void mqttStop(); void mqtt_send_object_state(uint8_t pageid, uint8_t btnid, char * payload); void mqtt_send_state(const __FlashStringHelper * subtopic, const char * payload); -bool IRAM_ATTR mqttIsConnected(); +bool mqttIsConnected(); #if HASP_USE_CONFIG > 0 bool mqttGetConfig(const JsonObject & settings); diff --git a/src/svc/hasp_ota.cpp b/src/svc/hasp_ota.cpp index 4c46cdc6..b111a114 100644 --- a/src/svc/hasp_ota.cpp +++ b/src/svc/hasp_ota.cpp @@ -170,7 +170,7 @@ void otaSetup(void) } } -void IRAM_ATTR otaLoop(void) +void otaLoop(void) { ArduinoOTA.handle(); } diff --git a/src/svc/hasp_ota.h b/src/svc/hasp_ota.h index 4086aada..9d023c1f 100644 --- a/src/svc/hasp_ota.h +++ b/src/svc/hasp_ota.h @@ -10,7 +10,7 @@ /* ===== Default Event Processors ===== */ void otaSetup(void); -void IRAM_ATTR otaLoop(void); +void otaLoop(void); void otaEverySecond(void); /* ===== Special Event Processors ===== */ diff --git a/src/svc/hasp_slave.cpp b/src/svc/hasp_slave.cpp index dd7ea9be..15629993 100644 --- a/src/svc/hasp_slave.cpp +++ b/src/svc/hasp_slave.cpp @@ -153,7 +153,7 @@ void slaveSetup() Log.notice(TAG_TASM, F("HASP SLAVE LOADED")); } -void IRAM_ATTR slaveLoop(void) +void slaveLoop(void) { slave.loop(); // demo code to run the led without tasmota diff --git a/src/svc/hasp_slave.h b/src/svc/hasp_slave.h index d6d15a39..a97e132d 100644 --- a/src/svc/hasp_slave.h +++ b/src/svc/hasp_slave.h @@ -16,7 +16,7 @@ void slave_send_input(uint8_t id, const char * payload); void slave_send_statusupdate(); void slaveSetup(); -void IRAM_ATTR slaveLoop(void); +void slaveLoop(void); #endif \ No newline at end of file diff --git a/src/svc/hasp_telnet.cpp b/src/svc/hasp_telnet.cpp index 8605663b..798c411d 100644 --- a/src/svc/hasp_telnet.cpp +++ b/src/svc/hasp_telnet.cpp @@ -258,7 +258,7 @@ void telnetSetup() } } -void IRAM_ATTR telnetLoop() +void telnetLoop() { // Basic telnet client handling code from: https://gist.github.com/tablatronix/4793677ca748f5f584c95ec4a2b10303 diff --git a/src/svc/hasp_telnet.h b/src/svc/hasp_telnet.h index 143e5059..98a958ee 100644 --- a/src/svc/hasp_telnet.h +++ b/src/svc/hasp_telnet.h @@ -11,7 +11,7 @@ /* ===== Default Event Processors ===== */ void telnetSetup(); -void IRAM_ATTR telnetLoop(void); +void telnetLoop(void); void telnetEvery5Seconds(void); void telnetEverySecond(void); void telnetStart(void);