- Timestamp:
- Apr 5, 2019, 9:26:53 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_arm/trunk/asp3_dcre/mbed/platform/mbed_wait_api_no_rtos.c
r352 r374 22 22 #include "hal/us_ticker_api.h" 23 23 24 void wait(float s) { 24 void wait(float s) 25 { 25 26 wait_us(s * 1000000.0f); 26 27 } 27 28 28 void wait_ms(int ms) { 29 void wait_ms(int ms) 30 { 29 31 wait_us(ms * 1000); 30 32 } 31 33 32 void wait_us(int us) { 33 uint32_t start = us_ticker_read(); 34 while ((us_ticker_read() - start) < (uint32_t)us); 34 void wait_us(int us) 35 { 36 const ticker_data_t *const ticker = get_us_ticker_data(); 37 uint32_t start = ticker_read(ticker); 38 while ((ticker_read(ticker) - start) < (uint32_t)us); 35 39 } 36 40
Note:
See TracChangeset
for help on using the changeset viewer.