© 1999-2048 dssz.net 粤ICP备11031372号
[C] 五线键盘 led显示
说明: nt keyscan() { P2DIR = 0xff; RL1S; RL0S; SL2C; SL1C; SL0C; P2DIR = 0x00; if (RL0 == 0 || RL1 == 0) { delaynms(5); if (RL0 == 0) { key = 0; RL0S; return 0; } else if (RL1 == 0) { key = 8; RL 1S; return 0; } } P2DIR |= BIT2 + BIT3 + BIT4; SL2C; SL1C;<ltizhao> 上传 | 大小:6kb