Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Code generated from Atmel Start. |
| 3 | * |
| 4 | * This file will be overwritten when reconfiguring your Atmel Start project. |
| 5 | * Please copy examples or other code you want to keep to a separate file |
| 6 | * to avoid losing it when reconfiguring. |
| 7 | */ |
| 8 | |
| 9 | #include "driver_examples.h" |
| 10 | #include "driver_init.h" |
| 11 | #include "utils.h" |
Kévin Redon | 4cd3f7d | 2019-01-24 17:57:13 +0100 | [diff] [blame^] | 12 | |
| 13 | /** |
| 14 | * Example of using UART_debug to write "Hello World" using the IO abstraction. |
| 15 | */ |
| 16 | void UART_debug_example(void) |
| 17 | { |
| 18 | struct io_descriptor *io; |
| 19 | usart_sync_get_io_descriptor(&UART_debug, &io); |
| 20 | usart_sync_enable(&UART_debug); |
| 21 | |
| 22 | io_write(io, (uint8_t *)"Hello World!", 12); |
| 23 | } |