Skip to content

Commit 67fca2b

Browse files
committed
esp8266/uart: Move a few functions from iRAM to iROM.
They call functions in iROM so do not need to be in iRAM.
1 parent f2218c2 commit 67fca2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ports/esp8266/uart.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ static void uart0_rx_intr_handler(void *para) {
200200

201201
// Waits at most timeout microseconds for at least 1 char to become ready for reading.
202202
// Returns true if something available, false if not.
203-
bool uart_rx_wait(uint32_t timeout_us) {
203+
bool ICACHE_FLASH_ATTR uart_rx_wait(uint32_t timeout_us) {
204204
uint32_t start = system_get_time();
205205
for (;;) {
206206
if (uart_ringbuf.iget != uart_ringbuf.iput) {
@@ -288,7 +288,7 @@ void ICACHE_FLASH_ATTR uart0_set_rxbuf(uint8 *buf, int len) {
288288
#include "lib/utils/pyexec.h"
289289

290290
#if MICROPY_REPL_EVENT_DRIVEN
291-
void uart_task_handler(os_event_t *evt) {
291+
void ICACHE_FLASH_ATTR uart_task_handler(os_event_t *evt) {
292292
if (pyexec_repl_active) {
293293
// TODO: Just returning here isn't exactly right.
294294
// What really should be done is something like

0 commit comments

Comments
 (0)