/** * Test of pfodParserStream methods */ #include "mcc_generated_files/mcc.h" #include "pfodParserStream.h" #include "pfodMenu.h" /* Main application */ void main(void) { // Initialize the device SYSTEM_Initialize(); // Enable the Global Interrupts INTERRUPT_GlobalInterruptEnable(); // Enable the Peripheral Interrupts INTERRUPT_PeripheralInterruptEnable(); pfodParser_connected = 1; // pretend we are connected to pfodApp unsigned long counter = 0; while (1) { counter++; pfodParser_printLong(counter); pfodParser_println(); if (pfodParser_RXavailable()) { while (pfodParser_RXavailable()) { // if there is a char read it and echo it. uint8_t c = pfodParser_read(); pfodParser_printCh(c); } pfodParser_println(); // wait 2 sec so you can see the echo for (int i = 0; i < 200; i++) { __delay_ms(10); } } } } /** End of File */