Arduino DUE 串口缓冲区在IDE1.6.1下修改不成功
以前用IDE1.05下修改\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial.cpp里面的缓冲区大小可以,现在换用IDE1.6.1之后HardwareSerial.cpp里面没有修改缓冲区的位置,在HardwareSerial.h里有一段关于缓冲区的代码:#if !(defined(SERIAL_TX_BUFFER_SIZE) && defined(SERIAL_RX_BUFFER_SIZE))
#if (RAMEND < 1000)
#define SERIAL_TX_BUFFER_SIZE 16
#define SERIAL_RX_BUFFER_SIZE 16
#else
#define SERIAL_TX_BUFFER_SIZE 64
#define SERIAL_RX_BUFFER_SIZE 64
#endif
#endif
#if (SERIAL_TX_BUFFER_SIZE>256)
typedef uint16_t tx_buffer_index_t;
#else
typedef uint8_t tx_buffer_index_t;
#endif
#if(SERIAL_RX_BUFFER_SIZE>256)
typedef uint16_t rx_buffer_index_t;
#else
typedef uint8_t rx_buffer_index_t;
#endif
反复修改也不成功,缓冲区一直是128字节。求助,谢谢。 没人理我?顶一下. xiangzi23456 发表于 2015-4-6 23:34 static/image/common/back.gif
没人理我?顶一下.
IDE 1.6.1 之后 不用去改啦 !
直接在你的 sketch 程序码的第一句写:
#define SERIAL_TX_BUFFER_SIZE 256
#define SERIAL_RX_BUFFER_SIZE 256
这样就可改为 256
不过记住, 这是使用你的 RAM
别忘了, 你的 RAM 只有 2KB 喔 !
DUE有96K,MEGA2560有8K mc.six 发表于 2015-4-7 19:11 static/image/common/back.gif
DUE有96K,MEGA2560有8K
对喔
没注意到楼主标题写着 Arduino DUE
有钱人用的 .. 像我没钱的都用 UNO :-)
tsaiwn 发表于 2015-4-8 02:40 static/image/common/back.gif
对喔
没注意到楼主标题写着 Arduino DUE
有钱人用的 .. 像我没钱的都用 UNO :-)
淘宝上DUE也不贵呀,100元以内很多呀。不过UNO大部分20元以内,o(∩_∩)o...哈哈!!!
页:
[1]