https://e2e.ti.com/support/interface-group/interface/f/interface-forum/1259153/tca8418-tca8418
器件型号:TCA8418您好 :
如何配置初始化寄存器、以便所有16个端口都配置为 GPIO 输出模式并且输出为高电平
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
https://e2e.ti.com/support/interface-group/interface/f/interface-forum/1259153/tca8418-tca8418
器件型号:TCA8418您好 :
如何配置初始化寄存器、以便所有16个端口都配置为 GPIO 输出模式并且输出为高电平
读取 GPIO 状态 REG_GPIO_DAT_STAT1 REG_GPIO_DAT_STAT2 REG_GPIO_DAT_STAT3代码如何转换为状态值0或1
静态 int TCA8418_GPIO_get (struct gpiochip *gpiochip、无符号 int 偏移)
{
结构 TCA8418_KEYPAD *键盘_DATA
= container_of (gpiochip、结构 TCA8418_keypad、GC);
int byte_offset =偏移/8;
U8值= 0;
TCA8418_READ_BYTE (KEYPACK_DATA、
REG_GPIO_DAT_STAT1+BYTE_OFFSET、
值(&V);
返回(int)值<<(byte_offset*8);
}
我们目前正在使用这个、但没有获得正确的状态。