class HardwareSerial has no member named addMemoryForRead

theCM

New member
ArduinoIDE v2.3.2
teensyduino v1.59.0

Why does this code generate the compile error:
Compilation error: 'class HardwareSerial' has no member named 'addMemoryForRead'

Thanks,
Charlie

C++:
void setup() {
  HardwareSerial& _serial(Serial7);
  _serial.begin(9600);
  static uint8_t buf[300];
  _serial.addMemoryForRead(buf, sizeof(buf));
}

void loop() {
}
 
Teensyduino 1.59 moved non-standard member functions (like addMemoryForRead) out of the HardwareSerial class, if you want to use those you need to expliclty use HardwareSerialIMXRT instead.
 
Back
Top