Skip to content

Instantly share code, notes, and snippets.

@dagon666
Created October 8, 2013 20:50
Show Gist options
  • Save dagon666/6891421 to your computer and use it in GitHub Desktop.
Save dagon666/6891421 to your computer and use it in GitHub Desktop.
Serial stdio example with libpca
#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