TTK4155 Lab Node 1
Term project in the NTNU course TTK4155 Embedded and Industrial Computer Systems Design
Loading...
Searching...
No Matches
uart.h
Go to the documentation of this file.
1
9
10#ifndef INCLUDE_INCLUDE_UART_H_
11#define INCLUDE_INCLUDE_UART_H_
12
13#include <stdint.h>
14
23 int16_t baud;
24 long fosc;
26};
27
36int USART_init(struct USART_config *config);
37
43int USART_endl(void);
44
53int USART_Transmit(unsigned char data);
54
63int USART_SendString(char data[]);
64
72int USART_Receive(void);
73
81int USART_ReceiveHandler(void);
82
83#endif // INCLUDE_INCLUDE_UART_H_
84
int USART_endl(void)
Transmit CRLF as end-of-line.
Definition uart.c:32
int USART_Transmit(unsigned char data)
Transmit a single byte via USART0.
Definition uart.c:39
int USART_SendString(char data[])
Send a zero-terminated string over USART0.
int USART_init(struct USART_config *config)
Initialize USART0 with the given configuration.
Definition uart.c:15
int USART_Receive(void)
Receive one byte from USART0. (Minimal implementation.).
Definition uart.c:66
int USART_ReceiveHandler(void)
Handle incoming received bytes and simple command echoing.
Definition uart.c:73
struct USART_config config
Definition main.c:49
USART configuration structure.
Definition uart.h:22
long fosc
Definition uart.h:24
int16_t baud
Definition uart.h:23
char recieve_buffer
Definition uart.h:25