David Buck
/
voltmeter
Diff: mbed_functions.cpp
- Revision:
- 0:d322a5241da8
diff -r 000000000000 -r d322a5241da8 mbed_functions.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed_functions.cpp Wed Dec 16 12:04:23 2009 +0000 @@ -0,0 +1,23 @@ +// mbed_functions.cpp + +#include "header.h" +/***************************************************** + subroutines - commonly used functions +*****************************************************/ + +/*** short delay */ +void delay_s(void){ + int j; /* loop variable */ + + for(j=0;j<2000;j++){ + asm("NOP"); + } +} +/*** long delay */ +void delay_l(void){ + int i; /* loop variable */ + + for(i=0;i<500;i++){ + delay_s(); + } +} \ No newline at end of file