MCPcopy Create free account
hub / github.com/Santroller/Santroller / read_uart

Method read_uart

lib/peripherals/uart.cpp:171–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171bool UARTInterface::read_uart(uint8_t header, uint8_t size, uint8_t *dest)
172{
173 if (!uart_is_readable(uart))
174 {
175 return false;
176 }
177 while (uart_getc(uart) != header)
178 {
179 if (!uart_is_readable(uart))
180 {
181 return false;
182 }
183 }
184 uart_read_blocking(uart, dest, size);
185 return true;
186}
187
188bool UARTInterface::readable()
189{

Callers 1

check_replyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected