https://e2e.ti.com/support/interface-group/interface/f/interface-forum/1259174/tca8418-tca8418
器件型号:TCA8418您好
如果要读取 GPIO 状态、如何在 GPIO 模式下配置这三个寄存器
0x29 0x30 0x2B
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/1259174/tca8418-tca8418
器件型号:TCA8418您好
如果要读取 GPIO 状态、如何在 GPIO 模式下配置这三个寄存器
0x29 0x30 0x2B
您好!:
设置模式、如何修改代码、我们现在发送数据、仅在一种情况下电压都很高、而在另一种情况下电压很低
静态空 TCA8418_GPIO_set (struct GPIO_chip *gpiochip、unsigned int offset、
Int 值)
{
结构 TCA8418_KEYPAD *键盘_DATA
= container_of (gpiochip、结构 TCA8418_keypad、GC);
int byte_offset =偏移/8; //2
互斥锁(&keepad_data->lock);
/*if (值){
keyboard_data->GPIO_out |=(值<<偏移);
其他(else)
keyboard_data->GPIO_out &=~(值<<偏移);
}*/
keyboard_data->GPIO_out &=~(1<<偏移);
keyboard_data->GPIO_out |=(值<<偏移);
TCA8418_WRITE_BYTE (keepad_data、
REG_GPIO_DAT_OUT1+BYTE_OFFSET、
keypad_data->GPIO_out>>(byte_offset*8 );
互斥锁(&keepad_data->lock);
}