1 /* 2 * Copyright (c) 2024 Hubert Miś 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /** 8 * @file 9 * @brief FT8XX device driver data structure 10 */ 11 12 #ifndef ZEPHYR_DRIVERS_MISC_FT8XX_FT8XX_DEV_DATA_H_ 13 #define ZEPHYR_DRIVERS_MISC_FT8XX_FT8XX_DEV_DATA_H_ 14 15 #include <stdint.h> 16 17 #include <zephyr/drivers/gpio.h> 18 #include <zephyr/drivers/spi.h> 19 #include <zephyr/drivers/misc/ft8xx/ft8xx.h> 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 struct ft8xx_data { 26 const struct device *ft8xx_dev; /* Required for GPIO IRQ handling */ 27 ft8xx_int_callback irq_callback; 28 void *irq_callback_ud; 29 30 const struct spi_dt_spec spi; 31 const struct gpio_dt_spec irq_gpio; 32 struct gpio_callback irq_cb_data; 33 34 uint16_t reg_cmd_read; 35 uint16_t reg_cmd_write; 36 }; 37 38 #ifdef __cplusplus 39 } 40 #endif 41 42 #endif /* ZEPHYR_DRIVERS_MISC_FT8XX_FT8XX_DEV_DATA_H_ */ 43