Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added back write_raw
  • Loading branch information
delta-G committed May 6, 2024
commit 6c5eac41fc478c864384a1710ded888030e48b1b
14 changes: 4 additions & 10 deletions cores/arduino/Serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,7 @@ void UART::flush() {
}

/* -------------------------------------------------------------------------- */
//size_t UART::write_raw(uint8_t* c, size_t len) {
///* -------------------------------------------------------------------------- */
// size_t i = 0;
// while (i < len) {
// uart_ctrl.p_reg->TDR = *(c+i);
// while (uart_ctrl.p_reg->SSR_b.TEND == 0) {}
// i++;
// }
// return len;
//}
size_t UART::write_raw(uint8_t* c, size_t len) {
/* -------------------------------------------------------------------------- */
return write(c, len);
}
2 changes: 1 addition & 1 deletion cores/arduino/Serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class UART : public arduino::HardwareSerial {
void flush(void);
size_t write(uint8_t c);
size_t write(uint8_t* c, size_t len);
// size_t write_raw(uint8_t* c, size_t len);
size_t write_raw(uint8_t* c, size_t len);
using Print::write;
operator bool(); // { return true; }

Expand Down