diff --git a/include/public.h b/include/public.h index 395bbd3..6035300 100644 --- a/include/public.h +++ b/include/public.h @@ -13,6 +13,7 @@ __sfr __at (0xE7) ISP_CONTR; extern char __xdata reset_password[RESET_PASSWORD_LENGTH]; extern char __xdata receice_password[RESET_PASSWORD_LENGTH]; +#define BEEP P2_5 void delay_10us(u16 ten_us); void delay_ms(u16 ms); diff --git a/src/main.c b/src/main.c index 690465c..380fa93 100644 --- a/src/main.c +++ b/src/main.c @@ -33,11 +33,14 @@ void main(void) // led_all_off(); // delay_ms(1000); // 实验二:流水灯 - LED = ~i; - i = rotate_left(i,1); - delay_ms(1000); + // LED = ~i; + // i = rotate_left(i,1); + // delay_ms(1000); + // 实验三:蜂鸣器 + BEEP=!BEEP; + delay_10us(100); - printf("Hello,world!\r\n"); + // printf("Hello,world!\r\n"); } }