From e82789253b7c915270cfdc126e8e000924d90444 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Fri, 4 May 2018 20:47:39 +0200 Subject: Implement TX read(n) and readline() (not working yet) --- hal/uart.hpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'hal/uart.hpp') diff --git a/hal/uart.hpp b/hal/uart.hpp index 0be5835..60dd5bb 100644 --- a/hal/uart.hpp +++ b/hal/uart.hpp @@ -13,10 +13,10 @@ #include extern "C" { -void usart_1_isr(); -void usart_2_isr(); -void usart_3_isr(); -void usart_4_isr(); + void usart_1_isr(); + void usart_2_isr(); + void usart_3_isr(); + void usart_4_isr(); } namespace uart @@ -52,8 +52,16 @@ namespace uart template uint8_t read(); +#if 0 + template + std::string read(const unsigned len); + + template + std::string readline(const std::string &eol = "\n\r"); + template unsigned read(uint8_t *buffer, const unsigned numbytes); +#endif template void write(const uint8_t byte); -- cgit v1.2.1