P0 = table[bw];
seg2=0;
delay_ms(3);
seg2=1;
P0 = table[sw];
seg3=0;
delay_ms(3);
seg3=1;
P0 = table[gw];
seg4=0;
delay_ms(3);
seg4=1;
}
}
void task_2(void) {
unsigned char i;
while(1) {
i++;
P3 = 0x01<<(i%8);
os_delay(200);
}
}
void task_3(void) {
unsigned char i;
while(1) {
i++;
//P2 = 0x01<<(i%8);
os_delay(7);
}
}
void task_4(void) {
unsigned char i;
while(1) {
i++;
P1 = 0x01<<(i%8);
os_delay(10);
}
}
void main(void) {
os_init();
os_task_create(4,(unsigned int)&task_0,(unsigned char)os_task_stack[4]);
os_task_create(3,(unsigned int)&task_1,(unsigned char)os_task_stack[3]);
os_task_create(2,(unsigned int)&task_2,(unsigned char)os_task_stack[2]);
os_task_create(1,(unsigned int)&task_3,(unsigned char)os_task_stack[1]);
os_task_create(0,(unsigned int)&task_4,(unsigned char)os_task_stack[0]);
os_start();
}
原文链接:
- 笔记本电脑有显卡吗
- 笔记本独显是什么意思
- 笔记本适配器很烫会不会烧坏
- 孩子不同时期阅读书籍怎么选择
- huwi是什么牌子
- mechrevo笔记本是什么牌子
- 笔记本电脑可以插网线吗
- 笔记本电脑能租吗
- 笔记本oled屏幕多久会烧屏
- 什么时候开始培养宝宝读书