void com0UntilEvent()
void com1UntilEvent()
void com2UntilEvent()
The event handler called when a data configured with the startComxUntilEvent is received on channel x.
#include "moacon500.h" void cmain(void) { openCom(0,115200,C8N1); // Open serial channel 0 startCom0UntilEvent(0x30); // Begin receiving events when data 0x30 is received while(1) { } // Run forever } void com0UntilEvent(void) // This function is called when data 0x30 { // is received on channel 0 while (comLen(0) > 0) // Continue until all data is processed { comPut(0, comGet(0)); // Echo data back to sender } }