mirror of
https://github.com/ptrks/avr-usart-printf.git
synced 2025-07-08 03:11:02 +03:00
Update example.c
This commit is contained in:
@ -3,24 +3,14 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "usart_printf/usart_printf.h"
|
#include "usart_printf/usart_printf.h"
|
||||||
|
|
||||||
#define FAULT_VCC_SHORT 3
|
|
||||||
#define FAULT_GND_SHORT 2
|
|
||||||
#define FAULT_OPEN_CONN 1
|
|
||||||
#define NO_FAULT 0
|
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
|
usart_initialize();
|
||||||
usart_initialize();
|
|
||||||
stdout = &uart_output;
|
stdout = &uart_output;
|
||||||
_delay_ms(10);
|
_delay_ms(10);
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
|
|
||||||
printf("Hello AVR printf");
|
printf("Hello AVR printf");
|
||||||
_delay_ms(1000);
|
_delay_ms(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user