2012-12-14 21:55:38 -04:00
|
|
|
|
|
|
|
#include "UARTDriver.h"
|
2021-06-05 00:50:28 -03:00
|
|
|
#include <AP_Common/ExpandingString.h>
|
2012-12-14 21:55:38 -04:00
|
|
|
|
2018-05-02 09:56:11 -03:00
|
|
|
Empty::UARTDriver::UARTDriver() {}
|
2012-12-14 21:55:38 -04:00
|
|
|
|
2023-07-07 05:46:52 -03:00
|
|
|
/* Empty implementations of virtual methods */
|
|
|
|
void Empty::UARTDriver::_begin(uint32_t b, uint16_t rxS, uint16_t txS) {}
|
|
|
|
void Empty::UARTDriver::_end() {}
|
|
|
|
void Empty::UARTDriver::_flush() {}
|
2018-05-02 09:56:11 -03:00
|
|
|
bool Empty::UARTDriver::is_initialized() { return false; }
|
|
|
|
bool Empty::UARTDriver::tx_pending() { return false; }
|
2012-12-14 21:55:38 -04:00
|
|
|
|
2023-07-07 05:46:52 -03:00
|
|
|
uint32_t Empty::UARTDriver::_available() { return 0; }
|
2018-05-02 09:56:11 -03:00
|
|
|
uint32_t Empty::UARTDriver::txspace() { return 1; }
|
2023-07-07 05:46:52 -03:00
|
|
|
bool Empty::UARTDriver::_discard_input() { return false; }
|
|
|
|
size_t Empty::UARTDriver::_write(const uint8_t *buffer, size_t size)
|
|
|
|
{
|
|
|
|
return size;
|
|
|
|
}
|
|
|
|
ssize_t Empty::UARTDriver::_read(uint8_t *buffer, uint16_t size)
|
2013-10-02 04:37:11 -03:00
|
|
|
{
|
2023-07-07 05:46:52 -03:00
|
|
|
return 0;
|
2013-10-02 04:37:11 -03:00
|
|
|
}
|
2021-06-05 00:50:28 -03:00
|
|
|
|
2022-01-08 06:56:52 -04:00
|
|
|
#if HAL_UART_STATS_ENABLED
|
2021-06-05 00:50:28 -03:00
|
|
|
void Empty::UARTDriver::uart_info(ExpandingString &str)
|
|
|
|
{
|
|
|
|
str.printf("EMPTY\n");
|
|
|
|
}
|
2022-01-08 06:56:52 -04:00
|
|
|
#endif
|