void main(){
//将P3.25 P3.28 P3.26 P3.29配置成输出模式,默认为上拉输出
//初始化
PINSEL7&=(~(3<<18)); FIO3DIR |= 1<<25; //P3.25/OUT DIR
PINSEL7&=(~(3<<24)); FIO3DIR |= 1<<28; //P3.28/OUT DIR
PINSEL7&=(~(3<<20)); FIO3DIR |= 1<<26; //P3.26/OUT ENA
PINSEL7&=(~(3<<26)); FIO3DIR |= 1<<29; //P3.29/OUT ENA
//输出高低电平
FIO3CLR |= 1<<26;
FIO3SET |= 1<<26;
FIO3CLR |= 1<<29;
FIO3SET |= 1<<29;
}
LPC2478 GPIO 输出控制
最新推荐文章于 2021-06-01 08:59:13 发布