AP_HAL_Empty: add discard_input method on UARTDriver

This commit is contained in:
Peter Barker 2020-05-23 10:22:28 +10:00 committed by Andrew Tridgell
parent 8f54de4184
commit b16c1ea647
2 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,7 @@ bool Empty::UARTDriver::tx_pending() { return false; }
uint32_t Empty::UARTDriver::available() { return 0; }
uint32_t Empty::UARTDriver::txspace() { return 1; }
int16_t Empty::UARTDriver::read() { return -1; }
bool Empty::UARTDriver::discard_input() { return false; }
/* Empty implementations of Print virtual methods */
size_t Empty::UARTDriver::write(uint8_t c) { return 0; }

View File

@ -18,6 +18,7 @@ public:
uint32_t available() override;
uint32_t txspace() override;
int16_t read() override;
bool discard_input() override;
/* Empty implementations of Print virtual methods */
size_t write(uint8_t c) override;