update layout
This commit is contained in:
@@ -36,12 +36,6 @@ void uart_tx(char c) {
|
||||
UDR0 = (unsigned char) c; // 20.11.1 : Put data into buffer, UDRn – USART I/O Data Register (read and write)
|
||||
}
|
||||
|
||||
ISR(USART_RX_vect) { // Table 12-7 : we select the code for USART Receive
|
||||
// char received_char = uart_rx();
|
||||
char received_char = UDR0; // Read received character
|
||||
uart_tx(SWITCH_CASE(received_char)); // Toggle case and send back
|
||||
}
|
||||
|
||||
// send back caracters received on serial port with case toggling, using interupt and empty infinite loop
|
||||
// `screen /dev/ttyUSB0 115200`
|
||||
int main() {
|
||||
@@ -51,3 +45,9 @@ int main() {
|
||||
|
||||
while(1);
|
||||
}
|
||||
|
||||
ISR(USART_RX_vect) { // Table 12-7 : we select the code for USART Receive
|
||||
// char received_char = uart_rx();
|
||||
char received_char = UDR0; // Read received character
|
||||
uart_tx(SWITCH_CASE(received_char)); // Toggle case and send back
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user