//1us延时函数
void delay_1us(void) {
asm("nop");
}
//N us延时函数
void delay_nus(unsigned int n) {
unsigned int i;
for (i = 0; i < n; i++)
delay_1us();
}
//1ms延时函数
void delay_1ms(void) {
unsigned int i;
for (i = 0; i < 1140; i++)
;
}
//N ms延时函数
void delay_nms(unsigned int n) {
unsigned int i = 0;
for (i = 0; i < n; i++)
delay_1ms();
}