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.

tca8418 做GPIO扩展的问题

只做GPIO扩展不做键盘的话,应该怎么配置寄存器初始化。主要是CFG不知道该怎么配置。现在的配置如下

    error = tca8418_write_byte(chip,REG_CFG,CFG_OVR_FLOW_IEN);
    if (error < 0)
		return -ENODEV;

    error = tca8418_write_byte(chip,REG_KP_GPIO1,0);
    error = tca8418_write_byte(chip,REG_KP_GPIO2,0);
    error = tca8418_write_byte(chip,REG_KP_GPIO3,0);

    error = tca8418_write_byte(chip,REG_GPIO_DIR1,0);
    error = tca8418_write_byte(chip,REG_GPIO_DIR2,0);
    error = tca8418_write_byte(chip,REG_GPIO_DIR3,0);

,然后去读取寄存器GPIO_DATA_STAT1,GPIO_DATA_STAT2,GPIO_DATA_STAT3。读出来的分别一直是ff,ff,03,在外围电路改变引脚点平,读到的值依旧没有变化