本帖最后由 devisalce01 于 2015-8-14 20:38 编辑
類似這種
但是會出現..\main.c(121): error: #42: operand types are incompatible ("GPIO_T *" and "int")
while(1)
{
if(PA==0x01)
{
PC->DOUT=PC->DOUT&0xaa;
}
else
{
PC->DOUT=PC->DOUT&0xFF;
}
}
或是可以一次讀取PB0-PB15的值
uint32_t gpio_data;
gpio_data=PB;
|