gpio_mapping.h 928 B

123456789101112131415161718192021222324252627
  1. #ifndef _GPIO_MAPPING_H_
  2. #define _GPIO_MAPPING_H_
  3. /****************************************************************
  4. * Includes
  5. ****************************************************************/
  6. #include "gpio-utils.h"
  7. #include "uinput.h"
  8. #include "read_conf_file.h"
  9. /****************************************************************
  10. * Defines
  11. ****************************************************************/
  12. #define GPIO_PIN_I2C_EXPANDER_INTERRUPT 35 //PB3
  13. #define GPIO_PIN_AXP209_INTERRUPT 37 //PB5
  14. /****************************************************************
  15. * Public functions
  16. ****************************************************************/
  17. int init_mapping_gpios(int * gpio_pins_to_declare,
  18. bool * gpios_pins_active_high_declared,
  19. int nb_gpios_to_declare,
  20. STRUCT_MAPPED_GPIO * chained_list_mapping_gpios);
  21. int deinit_mapping_gpios(void);
  22. int listen_gpios_interrupts(void);
  23. #endif //_GPIO_MAPPING_H_