Import code from old repository from 2018
Old repository: https://github.com/binaryDiv/z80_computer
This commit is contained in:
parent
536e557eea
commit
8c7b62dc2d
19 changed files with 3076 additions and 0 deletions
22
firmware_src/uart.h
Normal file
22
firmware_src/uart.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#ifndef UART_H_
|
||||
#define UART_H_
|
||||
|
||||
#include "config.h"
|
||||
#include <avr/io.h>
|
||||
|
||||
// Initialize UART
|
||||
void uartInit();
|
||||
|
||||
// Transmit a single character
|
||||
void uartPutChar(unsigned char data);
|
||||
|
||||
// Transmit a string
|
||||
void uartPutString(char* data);
|
||||
|
||||
// Read a single character (blocking)
|
||||
unsigned char uartGetChar();
|
||||
|
||||
// Read a string until \n (blocking)
|
||||
uint8_t uartGetLine(char* buffer, uint8_t maxLength);
|
||||
|
||||
#endif /* UART_H_ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue