这些GPIO操作是什么原理
时间:10-02
整理:3721RD
点击:
void SetData(u8 data)
{
u16 temp;
temp = GPIO_ReadOutputData(GPIO_LCD);
temp &= 0x00ff;
temp |= data<<8;
GPIO_Write(GPIO_LCD,temp);
}
在学LCD屏幕编程,发现有个例程这样写的,,它先把GPIO_LCD管脚的读出来,做了位操作后,再写进去后就实现了对应的屏幕操作。
在这个函数里面调用。
void LCD_Writ_Bus(u8 VH,u8 VL) //并行数据写入函数
{
SetData(VH);
_wr_low();
_wr_high();
SetData(VL);
_wr_low();
_wr_high();
}
问题是从GOIO_LCD读出来的是什么格式的数据?像素值吗?
{
u16 temp;
temp = GPIO_ReadOutputData(GPIO_LCD);
temp &= 0x00ff;
temp |= data<<8;
GPIO_Write(GPIO_LCD,temp);
}
在学LCD屏幕编程,发现有个例程这样写的,,它先把GPIO_LCD管脚的读出来,做了位操作后,再写进去后就实现了对应的屏幕操作。
在这个函数里面调用。
void LCD_Writ_Bus(u8 VH,u8 VL) //并行数据写入函数
{
SetData(VH);
_wr_low();
_wr_high();
SetData(VL);
_wr_low();
_wr_high();
}
问题是从GOIO_LCD读出来的是什么格式的数据?像素值吗?
0,1二进制数值
看你是什么接口 并口还是串口
支持单片机开发
基本输入输出。