Tool/software:
Hi,
I'm trying to use the lm8330 to have a keypad (6x6) and set the other pins as standard GPIO.
The keypad part works. The GPIOs are not working.
Here is the overall config of the lm8330 :
lm8330_write8(lm8330, LM8330_CLKEN_REG, (uint8_t)(0x01));
lm8330_write8(lm8330, LM8330_KBDSETTLE_REG, active_time);
lm8330_write8(lm8330, LM8330_KBDBOUNCE_REG, debounce_time);
lm8330_write8(lm8330, LM8330_KBDSIZE_REG, ((keypad_rows<<4) | keypad_columns));
lm8330_write16(lm8330, LM8330_KBDDEDCFG_REG, keypad_selector);
lm8330_write8(lm8330, LM8330_IOCGF_REG, (uint8_t)(0x10));
lm8330_write8(lm8330, LM8330_KBDIC_REG, (uint8_t)(0x83));
lm8330_write8(lm8330, LM8330_KBDMSK_REG, (uint8_t)(0x03));
lm8330_write8(lm8330, LM8330_RSTINTCLR_REG, (uint8_t)(0x1));
lm8330_write8(lm8330, LM8330_CLKMODE_REG, (uint8_t)(0x1));
This is the config of the GPIOs. I'm trying to configure KPY9 as output :
lm8330_write8(lm8330, LM8330_GPIOOME2_REG, (uint8_t)(0x0));
lm8330_write8(lm8330, LM8330_GPIODIR2_REG, (uint8_t)(0x4));
And the command to change state :
lm8330_write16(lm8330, LM8330_GPIOPDATA2_REG, (gpio_state) ? 0x404 : 0x400);
What i've forgotten ? Is it possible to have Linux driver or example about this part ?
Best regards,
Jerome
