AP_HAL_Empty: add HAL_UART_STATS_ENABLED to disable stats gathering

This commit is contained in:
Peter Barker 2022-01-08 21:56:52 +11:00 committed by Andrew Tridgell
parent 875f9a9497
commit cea57f51c1
2 changed files with 4 additions and 0 deletions

View File

@ -30,7 +30,9 @@ size_t Empty::UARTDriver::write(const uint8_t *buffer, size_t size)
return n;
}
#if HAL_UART_STATS_ENABLED
void Empty::UARTDriver::uart_info(ExpandingString &str)
{
str.printf("EMPTY\n");
}
#endif

View File

@ -24,6 +24,8 @@ public:
size_t write(uint8_t c) override;
size_t write(const uint8_t *buffer, size_t size) override;
#if HAL_UART_STATS_ENABLED
// request information on uart I/O for one uart
void uart_info(ExpandingString &str) override;
#endif
};