El_Andry Posted July 19, 2018 Report Posted July 19, 2018 How connect I2C expander (example: MCP23017 ) to GINPUT module with IRQ ??? thx:)
Joel Bodenmann Posted July 19, 2018 Report Posted July 19, 2018 You have to write what's called a Toggle driver for the GINPUT module. There's no way to register an IRQ in the upper levels. You'll find information about this on this forum. It's still possible to hack it into the GINPUT driver though.
Joel Bodenmann Posted July 19, 2018 Report Posted July 19, 2018 You'll handle the I2C stuff in the driver's board file just like with GDISP or any other driver stuff in µGFX.
El_Andry Posted July 20, 2018 Author Report Posted July 20, 2018 You mean this ???? : example of ginput_lld_toggle_board.h #ifndef _GDISP_LLD_TOGGLE_BOARD_H #define _GDISP_LLD_TOGGLE_BOARD_H static bool_t init_board(GToggle* t, unsigned instance) { } static GFXINLINE void aquire_bus(GToggle* m) { (void)m; } static GFXINLINE void release_bus(GToggle* m) { (void)m; } static void write_reg(GToggle* m, uint8_t reg, uint8_t val) { (void)m; } static uint8_t read_byte(GToggle* m, uint8_t reg) { (void)m; return 0; } static uint16_t read_word(GToggle* m, uint8_t reg) { (void)m; return 0; } #endif /* _GDISP_LLD_TOGGLE_BOARD_H */ this work ???
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now