From 87b87631a635d16d6a0742d70d1182eb95edab97 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Wed, 23 Jan 2019 10:28:51 +0100 Subject: [PATCH] cpu/esp8266: functions that have to run in IRAM Due to performance reasons _esp_wifi_recv_cb and _send have to be executed in IRAM. --- cpu/esp8266/esp-wifi/esp_wifi_netdev.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cpu/esp8266/esp-wifi/esp_wifi_netdev.c b/cpu/esp8266/esp-wifi/esp_wifi_netdev.c index dd511bf767..9ab58aef2b 100644 --- a/cpu/esp8266/esp-wifi/esp_wifi_netdev.c +++ b/cpu/esp8266/esp-wifi/esp_wifi_netdev.c @@ -97,7 +97,7 @@ static bool _in_esp_wifi_recv_cb = false; /** * @brief Callback when ethernet frame is received. Has to run in IRAM. */ -void _esp_wifi_recv_cb(struct pbuf *pb, struct netif *netif) +void IRAM _esp_wifi_recv_cb(struct pbuf *pb, struct netif *netif) { assert(pb != NULL); assert(netif != NULL); @@ -244,8 +244,7 @@ uint8_t _send_pkt_buf[ETHERNET_MAX_LEN]; /** function used to send an ethernet frame over WiFi */ extern err_t ieee80211_output_pbuf(struct netif *netif, struct pbuf *p); -/** guard variable to avoid reentrance to _send */ -static int _send(netdev_t *netdev, const iolist_t *iolist) +static int IRAM _send(netdev_t *netdev, const iolist_t *iolist) { ESP_WIFI_DEBUG("%p %p", netdev, iolist);