1 /** 2 * @file key.h 3 * 4 */ 5 6 #ifndef KEY_H 7 #define KEY_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /*------------------------------------------------- 14 * Mouse or touchpad as evdev interface (for Linux based systems) 15 *------------------------------------------------*/ 16 #define USE_KEY 0 17 18 #if USE_KEY 19 # define KEY_NAME "/dev/input/event2" 20 21 #include "lvgl.h" 22 23 /********************* 24 * DEFINES 25 *********************/ 26 27 /********************** 28 * TYPEDEFS 29 **********************/ 30 31 /********************** 32 * GLOBAL PROTOTYPES 33 **********************/ 34 35 /** 36 * Initialize the evdev 37 */ 38 void key_init(void); 39 40 /** 41 * Get the current position and state of the evdev 42 * @param data store the evdev data here 43 * @return false: because the points are not buffered, so no more data to be read 44 */ 45 void key_read(lv_indev_drv_t * drv, lv_indev_data_t * data); 46 47 48 /********************** 49 * MACROS 50 **********************/ 51 52 #endif /* USE_KEY */ 53 54 #ifdef __cplusplus 55 } /* extern "C" */ 56 #endif 57 58 #endif /* KEY_H */ 59