Prototype RF driver for STM Sub-1 GHz RF expansion board based on the SPSGRF-868 module for STM32 Nucleo.
Dependents: DISCO_IOT-wifi_client
Fork of stm-spirit1-rf-driver by
Revision 71:4a7772415d9c, committed 2017-07-18
- Comitter:
- Wolfgang Betz
- Date:
- Tue Jul 18 09:53:41 2017 +0200
- Parent:
- 70:19b5f9b9ba80
- Child:
- 72:413cb97ac077
- Commit message:
- Optimize `BUSYWAIT_UNTIL()`
Changed in this revision
| source/SimpleSpirit1.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/source/SimpleSpirit1.cpp Thu Jul 13 09:21:06 2017 +0200
+++ b/source/SimpleSpirit1.cpp Tue Jul 18 09:53:41 2017 +0200
@@ -13,15 +13,9 @@
do { \
uint32_t start = us_ticker_read(); \
uint32_t limit = (uint32_t)millisecs*1000U; \
- \
while (!(cond)) { \
uint32_t now = us_ticker_read(); \
- \
- if(now >= start) { \
- if((now - start) > limit) break; \
- } else { \
- if((now + ~start) > limit) break; \
- } \
+ if((now - start) > limit) break; \
} \
} while(0)
