This commit is contained in:
2021-09-19 19:19:04 -04:00
parent c3e43fcc9c
commit 6c907068a8
3 changed files with 1063 additions and 61 deletions

View File

@@ -8,6 +8,10 @@ void USART0_init(void) {
USART0.BAUD = (uint16_t) USART0_BAUD_RATE(9600);
USART0.CTRLB |= USART_TXEN_bm;
USART0.CTRLB |= USART_RXEN_bm;
// USART0.CTRLB |= USART_SFDEN_bm;
// USART0.CTRLA |= USART_RXSIE_bm;
USART0.CTRLA |= USART_RXCIE_bm;
}
void USART0_sendChar(char c) {
@@ -20,6 +24,7 @@ void USART0_sendChar(char c) {
void USART0_sendString(const char *str) {
for (size_t i = 0; i < strlen(str); i++) {
USART0_sendChar(str[i]);