Files
tactility/components/nanobake/src/nb_touch.h
T
Ken Van Hoeylandt 1cafa1ec1a renamed struct types
2023-12-28 13:07:01 +01:00

31 lines
597 B
C

#pragma once
#include "esp_lcd_panel_io.h"
#include "esp_lcd_touch.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef bool (*CreateTouch)(esp_lcd_panel_io_handle_t* io_handle, esp_lcd_touch_handle_t* touch_handle);
typedef struct {
char name[32];
CreateTouch create_touch;
} TouchDriver;
typedef struct {
esp_lcd_panel_io_handle_t _Nonnull io_handle;
esp_lcd_touch_handle_t _Nonnull touch_handle;
} TouchDevice;
/**
* @param[in] driver
* @return a newly allocated instance
*/
TouchDevice _Nonnull* nb_touch_alloc(TouchDriver _Nonnull* driver);
#ifdef __cplusplus
}
#endif