njh / EtherCard

EtherCard is an IPv4 driver for the ENC28J60 chip, compatible with Arduino IDE
https://www.aelius.com/njh/ethercard/
GNU General Public License v2.0
1.03k stars 455 forks source link

Added to stash prepare and extract #403

Open iFortunateSon opened 4 years ago

iFortunateSon commented 4 years ago

if you try the following code (@ it is D or S or F): static char command[6] = {1, 0, 0, 0 , 0, 1}; Stash::prepare(PSTR($@), command); session = tcpSend(); then this data will be broken. I suggest entering "$R" example: uint8_t command_len = 6 static char command[6] = {1, 0, 0, 0 , 0, 1}; Stash::prepare(PSTR($R), command_len, command); session = tcpSend(); In this case, the data will be sent successfully.