Skip to content

Commit

Permalink
Adding "setDebugOutput()" Methode to SerialFake
Browse files Browse the repository at this point in the history
  • Loading branch information
JoJos1220 committed Nov 12, 2024
1 parent fb13f19 commit 774fc86
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/SerialFake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ bool Serial_::rts()
return ArduinoFakeInstance(Serial, this)->rts();
}

void Serial_::setDebugOutput(bool _value){
return ArduinoFakeInstance(Serial, this) -> setDebugOutput(_value);
}

int32_t Serial_::readBreak()
{
return ArduinoFakeInstance(Serial, this)->readBreak();
Expand Down
2 changes: 2 additions & 0 deletions src/SerialFake.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ struct SerialFake : public StreamFake
virtual uint8_t numbits() = 0;
virtual bool dtr() = 0;
virtual bool rts() = 0;

virtual void setDebugOutput(bool) = 0;
};

class SerialFakeProxy : public StreamFakeProxy, public Serial_
Expand Down
2 changes: 2 additions & 0 deletions src/arduino/USBAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ class Serial_ : public Stream
volatile uint8_t _rx_buffer_tail;
unsigned char _rx_buffer[SERIAL_BUFFER_SIZE];

virtual void setDebugOutput(bool);

// This method allows processing "SEND_BREAK" requests sent by
// the USB host. Those requests indicate that the host wants to
// send a BREAK signal and are accompanied by a single uint16_t
Expand Down

0 comments on commit 774fc86

Please sign in to comment.