|
|
|
|
526
|
while (length < BUFSIZE && !card_eof) {
|
526
|
while (length < BUFSIZE && !card_eof) {
|
527
|
const int16_t n = card.get();
|
527
|
const int16_t n = card.get();
|
528
|
card_eof = card.eof();
|
528
|
card_eof = card.eof();
|
529
|
- if (n < 0) { SERIAL_ERROR_MSG(MSG_SD_ERR_READ); continue; }
|
|
|
|
|
529
|
+ if (n < 0 && !card_eof) { SERIAL_ERROR_MSG(MSG_SD_ERR_READ); continue; }
|
530
|
const char sd_char = (char)n;
|
530
|
const char sd_char = (char)n;
|
531
|
if (sd_char == '\n' || sd_char == '\r' || card_eof) {
|
531
|
if (sd_char == '\n' || sd_char == '\r' || card_eof) {
|
532
|
|
532
|
|