Jared's DAC Code
Dependencies: mbed
Fork of Chemical_Sensor_DMA by
pause.cpp
- Committer:
- DeWayneDennis
- Date:
- 2015-12-19
- Revision:
- 7:af255a90505e
- Parent:
- 2:3771b3195c7b
File content as of revision 7:af255a90505e:
#ifndef PAUSE_CPP #define PAUSE_CPP #include "mbed.h" // these are various delays inline void pause(uint32_t seconds) { for(seconds; seconds > 0; seconds--) for(uint32_t i = 0x1ffffff; i > 0; i--) asm("nop"); } inline void pause_ms(uint32_t milliseconds) { for(milliseconds; milliseconds > 0; milliseconds--) for(uint32_t i = 0x8312; i > 0; i--) asm("nop"); } inline void pause_us(uint32_t microseconds) { for(microseconds; microseconds > 0; microseconds--) for(uint32_t i = 0x21; i > 0; i--) asm("nop"); } #endif