ARM的GPIO无法拉高
时间:10-02
整理:3721RD
点击:
使用的是ARM7 LPC2220,
设置 USB_REST对应P0.27;
代码如下:
IO0DIR |= (1 << USB_REST);
IO0SET |= (1 << USB_REST);
IO0DIR |= (1 << USB_A0);
IO0SET |= (1 << USB_A0);
IO0CLR |= (1 << USB_REST);
DelayNS(10);
IO0SET |= (1 << USB_REST);
但是实际运行,P0.27一直是低电平。请问这段代码是否有问题?
谢谢。
设置 USB_REST对应P0.27;
代码如下:
IO0DIR |= (1 << USB_REST);
IO0SET |= (1 << USB_REST);
IO0DIR |= (1 << USB_A0);
IO0SET |= (1 << USB_A0);
IO0CLR |= (1 << USB_REST);
DelayNS(10);
IO0SET |= (1 << USB_REST);
但是实际运行,P0.27一直是低电平。请问这段代码是否有问题?
谢谢。