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.
Fork of d7a_1x by
Diff: src/d7a_alp.cpp
- Revision:
- 70:07b378285c95
- Parent:
- 69:18852c154df9
- Child:
- 71:f03727ff0f99
--- a/src/d7a_alp.cpp Thu Nov 03 09:45:18 2016 +0000 +++ b/src/d7a_alp.cpp Thu Nov 03 10:56:17 2016 +0000 @@ -358,11 +358,18 @@ int i = 0; d7a_alp_rsp_t* pl = NULL; d7a_com_rx_msg_t* pkt = NULL; + int32_t time; + Timer timeout; + + timeout.start(); // Parse responses do { - pkt = d7a_alp_wait_pl(D7A_ALP_RESP_TO); + time = D7A_ALP_RESP_TO - timeout.read_ms(); + if (time < 0) time = 0; + + pkt = d7a_alp_wait_pl(time); if (pkt == NULL) {