UART refactored (#236)
`Uart` is now an abstract class with a `UartEsp` and a `UartPosix` implementation.
This commit is contained in:
committed by
GitHub
parent
de46401d85
commit
b85ef7a2e7
@@ -17,11 +17,11 @@ template<size_t DataSize>
|
||||
inline void sendPacket(uart_port_t port, uint8_t type, uint8_t id, uint8_t data[DataSize], const char* errorMessage, TickType_t timeout) {
|
||||
static uint8_t buffer[250] = {0};
|
||||
size_t length = makePacket(type, id, data, DataSize, buffer);
|
||||
hal::uart::writeBytes(port, buffer, length);
|
||||
// hal::uart::writeBytes(port, buffer, length);
|
||||
}
|
||||
|
||||
GpsModel probe(uart_port_t port);
|
||||
GpsModel probe(uart::Uart& uart);
|
||||
|
||||
bool init(uart_port_t port, GpsModel model);
|
||||
bool init(uart::Uart& uart, GpsModel model);
|
||||
|
||||
} // namespace tt::service::gps
|
||||
|
||||
Reference in New Issue
Block a user