|
TTK4155 Lab Node 1
Term project in the NTNU course TTK4155 Embedded and Industrial Computer Systems Design
|
Data Structures | |
| struct | USART_config |
| USART configuration structure. More... | |
Functions | |
| int | USART_init (struct USART_config *config) |
| Initialize USART0 with the given configuration. | |
| int | USART_endl (void) |
| Transmit CRLF as end-of-line. | |
| int | USART_Transmit (unsigned char data) |
| Transmit a single byte via USART0. | |
| int | USART_SendString (char data[]) |
| Send a zero-terminated string over USART0. | |
| int | USART_Receive (void) |
| Receive one byte from USART0. (Minimal implementation.). | |
| int | USART_ReceiveHandler (void) |
| Handle incoming received bytes and simple command echoing. | |
| int USART_endl | ( | void | ) |
| int USART_init | ( | struct USART_config * | config | ) |
#include <uart.h>
Initialize USART0 with the given configuration.
Enables TX and RX with frame format 8N1. TODO: Verify...
| [in] | config | Pointer to configuration containing baud rate and clock. |
Definition at line 15 of file uart.c.
Referenced by main().
| int USART_Receive | ( | void | ) |
#include <uart.h>
Receive one byte from USART0. (Minimal implementation.).
Stores the received byte into a global buffer.
| int USART_ReceiveHandler | ( | void | ) |
#include <uart.h>
Handle incoming received bytes and simple command echoing.
Echoes characters and echos back the full command line when CR is received.
Definition at line 73 of file uart.c.
| int USART_SendString | ( | char | data[] | ) |
#include <uart.h>
Send a zero-terminated string over USART0.
Newlines ('\n') are converted to CRLF.
| [in] | data | Pointer to zero-terminated string. |
Referenced by utils_joystick_print_pos(), and utils_joystick_print_raw().
| int USART_Transmit | ( | unsigned char | data | ) |
#include <uart.h>
Transmit a single byte via USART0.
Blocks until the transmit buffer is ready.
| [in] | data | Byte to send. |
Definition at line 39 of file uart.c.
Referenced by _log_print_P(), USART_endl(), USART_ReceiveHandler(), and USART_SendString().