Skip to content

Commit

Permalink
Got rid of the ICACHE_RAM_ATTR. The ICACHE_RAM_ATTR in most of the ca…
Browse files Browse the repository at this point in the history
…ses was causing device resets.

The code is tested and proven to work on ESP8266-EVB with esp-open-sdk.
  • Loading branch information
Slavey Karadzhov committed Mar 19, 2015
1 parent 72d77a4 commit c173d4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arduino_style/arduino/arduino_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@
#include "arduino_serial.h"

#define UART0 0
#define ICACHE_RAM_ATTR __attribute__((section(".iram0.text")))

// UartDev is defined and initialized in rom code.
extern UartDevice UartDev;

LOCAL void ICACHE_RAM_ATTR uart0_rx_intr_handler(void *para);
LOCAL void uart0_rx_intr_handler(void *para);

serial_t Serial =
{
Expand Down Expand Up @@ -239,6 +238,7 @@ int uart_read(void)

// ETS_UART_INTR_DISABLE();
ETS_INTR_LOCK();

firstByte = (int)(*pRxBuff->pReadPos);
if (pRxBuff->pReadPos == (pRxBuff->pRcvMsgBuff + RX_BUFF_SIZE)) {
pRxBuff->pReadPos = pRxBuff->pRcvMsgBuff ;
Expand Down

0 comments on commit c173d4e

Please sign in to comment.