Download homework/zuoye.c from Beifengdo/Microcontrollers: direct link, hf CLI and curl.
- Browser
- Download file 283 Bytes
-
https://huggingface.co/datasets/Beifengdo/Microcontrollers/resolve/main/homework/zuoye.c
- Command line
-
hf download hf://datasets/Beifengdo/Microcontrollers/homework/zuoye.c
-
curl -L -o zuoye.c https://huggingface.co/datasets/Beifengdo/Microcontrollers/resolve/main/homework/zuoye.c
283 Bytes
| sbit K1 = P3^2; | |
| sbit led1 = P0^5; | |
| sbit led2 = P0^6; | |
| typedef unsigned int u16; | |
| unsigned char x; | |
| void delay_10us(u16 n) | |
| { | |
| while(n--); | |
| } | |
| void main(){ | |
| IT0 = 1; | |
| EX0 = 1; | |
| EA = 1; | |
| while (1); | |
| } | |
| void exit0()interrupt 0{ | |
| delay_10us(100); | |
| if (K1 == 0) | |
| led1 = ~led1; | |
| } |