xmos控制一组GPIO

来源:互联网 发布:蜂窝网络和移动网络 编辑:程序博客网 时间:2024/04/29 14:29
#define LED0 0X01
#define LED1 0x02

#define LED2 0x04

#define LED3 0x08

static unsigned LedState = 0;

out port LEDPORT;


#define TURNON(p) {LedState |= p;\

LEDPORT  <: LedState ; }

#define TURNOFF(p) {LedState &= ~p;\

LEDPORT  <: LedState ; }

0 0
原创粉丝点击