Created
October 8, 2013 20:50
-
-
Save dagon666/6891421 to your computer and use it in GitHub Desktop.
Serial stdio example with libpca
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "pca.h" | |
| #include <util/delay.h> | |
| int main(void) | |
| { | |
| int cnt = 0; | |
| serial_init(E_BAUD_9600); | |
| serial_install_interrupts(E_FLAGS_SERIAL_RX_INTERRUPT); | |
| serial_flush(); | |
| serial_install_stdio(); | |
| while(1) { | |
| printf("STDIO Serial Hello. Line: [%d]\n", cnt++); | |
| _delay_ms(1000); | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment