From 3282a756679019fd723346cc3bc584cc582eb669 Mon Sep 17 00:00:00 2001 From: Oxore Date: Tue, 7 Mar 2023 19:10:25 +0300 Subject: Begin implementing serial descriptors --- app/platform/stm32f0-gcc/uart.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 app/platform/stm32f0-gcc/uart.h (limited to 'app/platform/stm32f0-gcc/uart.h') diff --git a/app/platform/stm32f0-gcc/uart.h b/app/platform/stm32f0-gcc/uart.h new file mode 100644 index 0000000..176f847 --- /dev/null +++ b/app/platform/stm32f0-gcc/uart.h @@ -0,0 +1,12 @@ +#pragma once +#include +#include "stm32f0xx.h" + +// Non-blocking buffered write +size_t UARTWrite(USART_TypeDef*, const void *data, size_t nbytes); +// Blocking write directly into data register +size_t UARTWriteDirect(USART_TypeDef*, const void *data, size_t nbytes); +// Non-blocking buffered read +size_t UARTRead(USART_TypeDef*, void *data, size_t nbytes); +// Blocking read directly from data register +size_t UARTReadDirect(USART_TypeDef*, void *data, size_t nbytes); -- cgit v1.2.3