22 lines
No EOL
223 B
C
22 lines
No EOL
223 B
C
#include "delay.h"
|
|
#include <intrins.h>
|
|
void delay100us()
|
|
{
|
|
unsigned char i, j;
|
|
|
|
_nop_();
|
|
_nop_();
|
|
i = 2;
|
|
j = 15;
|
|
do
|
|
{
|
|
while (--j);
|
|
} while (--i);
|
|
}
|
|
|
|
void delay(int i)
|
|
{
|
|
int j = i;
|
|
for(;j>0;j--)
|
|
delay100us();
|
|
} |