Hi,
I am using UART for CSR board to PC communication. I need to send a command to PC and receive its response in AppProcessLmEvent. Basically I need to wait in a while loop in AppProcessLmEvent and wait for command to be recived over UART. But it seems UART is disabled in AppProcessLmEvent.
Is there any way to receive UART data in such situation..
Thanks for help..
Thanks,
Nidhin MS
never use endless look with CSR1010
UART RX generates an event on incoming UART message.
save that message until seeing CR
on CR send all message to RF part.
Have a look at UartInit() where you can specify a callback function whenever a character is received on the UART. Note that this function is called from an interrupt so don't loop in there: either store the character for later or forward to wherever it needs to go.
The SDK is event driven, so you should never loop waiting for something to happen (that's the uEnergy stack's job)
Chris