1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- #ifndef _NRF_DELAY_H
- #define _NRF_DELAY_H
- #include <nrfx.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define nrf_delay_us(us_time) NRFX_DELAY_US(us_time)
- __STATIC_INLINE void nrf_delay_ms(uint32_t ms_time)
- {
- if (ms_time == 0)
- {
- return;
- }
- do {
- nrf_delay_us(1000);
- } while (--ms_time);
- }
- #ifdef __cplusplus
- }
- #endif
- #endif
|