Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 9:98edda6ea79e, committed 2016-07-29
- Comitter:
- Issus
- Date:
- Fri Jul 29 17:36:33 2016 +0000
- Parent:
- 8:10f8dbd8dfff
- Commit message:
- Removed auto attached serial, not reliable enough.
Changed in this revision
| LsrModule.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/LsrModule.cpp Mon Jul 25 23:40:29 2016 +0000
+++ b/LsrModule.cpp Fri Jul 29 17:36:33 2016 +0000
@@ -132,7 +132,7 @@
ptrHostState = &LsrModule::HostRxWaitForMsgStartByteState;
- attach(this, &LsrModule::RunHostRxStateMachine);
+ //attach(this, &LsrModule::RunHostRxStateMachine);
} /*** End LsrModule ***/
@@ -915,7 +915,7 @@
*/
void LsrModule::HostRxWaitForMsgStartByteState(void)
{
- if (SerialAvailable() && (SerialRead() == LSR_MODULE_SERIAL_MSG_START_BYTE))
+ while (readable() && (SerialRead() == LSR_MODULE_SERIAL_MSG_START_BYTE))
{
au8UartRxBuffer[u8UartRxBufferIndex++] = LSR_MODULE_SERIAL_MSG_START_BYTE;
ptrHostState = &LsrModule::HostRxGetMsgLengthState;
@@ -929,7 +929,7 @@
*/
void LsrModule::HostRxGetMsgLengthState(void)
{
- if (SerialAvailable())
+ while (readable())
{
u8RxReadByte = SerialRead();
@@ -953,7 +953,7 @@
*/
void LsrModule::HostRxGetMsgTypeState(void)
{
- if (SerialAvailable())
+ while (readable())
{
u8RxReadByte = SerialRead();
@@ -977,7 +977,7 @@
*/
void LsrModule::HostRxWaitToGetRestOfMsgState(void)
{
- if (SerialAvailable())
+ while (readable())
{
u8RxReadByte = SerialRead();
au8UartRxBuffer[u8UartRxBufferIndex++] = u8RxReadByte;