18#ifndef __VSF_INPUT_HID_H__
19#define __VSF_INPUT_HID_H__
23#include "../../vsf_input_cfg.h"
25#if VSF_USE_INPUT == ENABLED && VSF_INPUT_USE_HID == ENABLED
27#include "../../vsf_input_get_type.h"
36#define HID_USAGE_PAGE_GENERIC 0x01
37#define HID_USAGE_PAGE_KEYBOARD 0x07
38#define HID_USAGE_PAGE_BUTTON 0x09
39#define HID_USAGE_PAGE_DIGITIZERS 0x0D
42#define HID_USAGE_ID_X 0x30
43#define HID_USAGE_ID_Y 0x31
44#define HID_USAGE_ID_Z 0x32
45#define HID_USAGE_ID_Rx 0x33
46#define HID_USAGE_ID_Ry 0x34
47#define HID_USAGE_ID_Rz 0x35
48#define HID_USAGE_ID_Slider 0x36
49#define HID_USAGE_ID_Dial 0x37
50#define HID_USAGE_ID_Wheel 0x38
51#define HID_USAGE_ID_Hat 0x39
54#define HID_USAGE_ID_TOUCH_SCREEN 0x04
55#define HID_USAGE_ID_TIP_PRESSURE 0x30
56#define HID_USAGE_ID_TIP_SWITCH 0x42
57#define HID_USAGE_ID_TIP_ID 0x51
59#define HID_USAGE_ID_GENERIC_MIN HID_USAGE_ID_X
60#define HID_USAGE_ID_GENERIC_MAX HID_USAGE_ID_Hat
62#define HID_USAGE_ID_KEYBOARD_MIN 0
63#define HID_USAGE_ID_KEYBOARD_BITS 224
64#define HID_USAGE_ID_KEYBOARD_MAX 255
66#define HID_USAGE_ID_BUTTON_MIN 1
67#define HID_USAGE_ID_BUTTON_MAX 32
69#define HID_GENERIC_DESKTOP_UNDEFINEED 0
70#define HID_GENERIC_DESKTOP_POINTER 1
71#define HID_GENERIC_DESKTOP_MOUSE 2
72#define HID_GENERIC_DESKTOP_JOYSTICK 4
73#define HID_GENERIC_DESKTOP_GAMEPAD 5
74#define HID_GENERIC_DESKTOP_KEYBOARD 6
75#define HID_GENERIC_DESKTOP_KEYPAD 7
76#define HID_GENERIC_DESKTOP_MULTIAXIS_CONTROLLER 8
80#define hid_usage_is_const(__usage) ((__usage)->data_flag & 1)
81#define hid_usage_is_data(__usage) !hid_usage_is_const(__usage)
82#define hid_usage_is_var(__usage) ((__usage)->data_flag & 2)
83#define hid_usage_is_array(__usage) !hid_usage_is_var(__usage)
84#define hid_usage_is_rel(__usage) ((__usage)->data_flag & 4)
85#define hid_usage_is_abs(__usage) !hid_usage_is_rel(__usage)
87#define hid_get_generic_usage_id(__evt) ((uint8_t)((__evt)->id >> 0))
88#define hid_get_generic_usage_page(__evt) ((uint8_t)((__evt)->id >> 8))
89#define hid_get_usage_id(__evt) ((uint8_t)((__evt)->id >> 16))
90#define hid_get_usage_page(__evt) ((uint8_t)((__evt)->id >> 24))
signed short int16_t
Definition lvgl.h:42
unsigned short uint16_t
Definition lvgl.h:41
signed int int32_t
Definition lvgl.h:44
unsigned char uint8_t
Definition lvgl.h:40
unsigned char uint_fast8_t
Definition stdint.h:23
unsigned int uint_fast32_t
Definition stdint.h:27
Definition vsf_input_hid.h:115
vk_input_evt_t vk_hid_usage_t * usage
Definition vsf_input_hid.h:117
Definition vsf_input_hid.h:120
implement_ex(vsf_slist_node_t, report_node) uint8_t type
vsf_slist_t usage_list
Definition vsf_input_hid.h:128
int16_t id
Definition vsf_input_hid.h:124
uint16_t bitlen
Definition vsf_input_hid.h:125
uint8_t * value
Definition vsf_input_hid.h:127
Definition vsf_input_hid.h:98
int32_t report_size
Definition vsf_input_hid.h:111
uint8_t usage_min
Definition vsf_input_hid.h:105
int32_t report_count
Definition vsf_input_hid.h:112
uint8_t data_flag
Definition vsf_input_hid.h:103
uint8_t usage_max
Definition vsf_input_hid.h:106
int32_t logical_min
Definition vsf_input_hid.h:107
uint8_t generic_usage_id
Definition vsf_input_hid.h:102
int32_t logical_max
Definition vsf_input_hid.h:108
implement_ex(vsf_slist_node_t, usage_node) uint8_t generic_usage_page
uint8_t usage_page
Definition vsf_input_hid.h:104
int32_t bit_offset
Definition vsf_input_hid.h:109
int32_t bit_length
Definition vsf_input_hid.h:110
Definition vsf_list.h:876
Definition vsf_list.h:872
vk_av_control_type_t type
Definition vsf_audio.h:170