libyggdrasil  v1.0.0
uart.h
Go to the documentation of this file.
1  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * _____.___. .___ .__.__ *
3  * \__ | | ____ ____ __| _/___________ _____|__| | *
4  * / | |/ ___\ / ___\ / __ |\_ __ \__ \ / ___/ | | *
5  * \____ / /_/ > /_/ > /_/ | | | \// __ \_\___ \| | |__ *
6  * / ______\___ /\___ /\____ | |__| (____ /____ >__|____/ *
7  * \/ /_____//_____/ \/ \/ \/ *
8  * - Midgard - *
9  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
10  * This software can be used by students and other personal of the *
11  * Bern University of Applied Sciences under the terms of the MIT *
12  * license. *
13  * For other persons this software is under the terms of the GNU *
14  * General Public License version 2. *
15  * *
16  * Copyright © 2021, Bern University of Applied Sciences. *
17  * All rights reserved. *
18  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
26 #include <c/common/types.h>
27 
28 #include <stm32f7xx_hal.h>
29 
33 typedef struct {
34  UART_HandleTypeDef *interface;
35 } uart_t;
36 
44 
52 
60 C_LINKAGE void yggdrasil_UART_Transmit(uart_t uart, void *data, size_t size);
61 
69 C_LINKAGE void yggdrasil_UART_Receive(uart_t uart, void *data, size_t size);
yggdrasil_UART_Receive
C_LINKAGE void yggdrasil_UART_Receive(uart_t uart, void *data, size_t size)
UART receive.
Definition: uart.cpp:52
yggdrasil_UART_Init
C_LINKAGE bool yggdrasil_UART_Init(uart_t uart)
UART initialization.
Definition: uart.cpp:39
types.h
Commonly used type definitions and helper templates.
yggdrasil_UART_Deinit
C_LINKAGE bool yggdrasil_UART_Deinit(uart_t uart)
UART deinitialization.
Definition: uart.cpp:43
uart_t
UART handle type.
Definition: uart.h:33
yggdrasil_UART_Transmit
C_LINKAGE void yggdrasil_UART_Transmit(uart_t uart, void *data, size_t size)
UART transmit.
Definition: uart.cpp:48
C_LINKAGE
#define C_LINKAGE
Definition: attributes.h:43
uart_t::interface
UART_HandleTypeDef * interface
Definition: uart.h:34