xref: /btstack/port/stm32-f4discovery-usb/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Inc/usbh_hid_parser.h (revision a8f7f3fcbcd51f8d2e92aca076b6a9f812db358c)
1 /**
2   ******************************************************************************
3   * @file    usbh_hid_parser.c
4   * @author  MCD Application Team
5   * @brief   This file is the header file of the usbh_hid_parser.c
6   ******************************************************************************
7   * @attention
8   *
9   * <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
10   * All rights reserved.</center></h2>
11   *
12   * This software component is licensed by ST under Ultimate Liberty license
13   * SLA0044, the "License"; You may not use this file except in compliance with
14   * the License. You may obtain a copy of the License at:
15   *                      www.st.com/SLA0044
16   *
17   ******************************************************************************
18   */
19 
20 /* Define to prevent recursive -----------------------------------------------*/
21 #ifndef __USBH_HID_PARSER_H
22 #define __USBH_HID_PARSER_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "usbh_hid.h"
30 #include "usbh_hid_usage.h"
31 
32 /** @addtogroup USBH_LIB
33   * @{
34   */
35 
36 /** @addtogroup USBH_CLASS
37   * @{
38   */
39 
40 /** @addtogroup USBH_HID_CLASS
41   * @{
42   */
43 
44 /** @defgroup USBH_HID_PARSER
45   * @brief This file is the Header file for usbh_hid_parser.c
46   * @{
47   */
48 
49 
50 /** @defgroup USBH_HID_PARSER_Exported_Types
51   * @{
52   */
53 typedef struct
54 {
55   uint8_t  *data;
56   uint32_t size;
57   uint8_t  shift;
58   uint8_t  count;
59   uint8_t  sign;
60   uint32_t logical_min;  /*min value device can return*/
61   uint32_t logical_max;  /*max value device can return*/
62   uint32_t physical_min; /*min vale read can report*/
63   uint32_t physical_max; /*max value read can report*/
64   uint32_t resolution;
65 }
66 HID_Report_ItemTypedef;
67 
68 
69 uint32_t HID_ReadItem(HID_Report_ItemTypedef *ri, uint8_t ndx);
70 uint32_t HID_WriteItem(HID_Report_ItemTypedef *ri, uint32_t value, uint8_t ndx);
71 
72 
73 /**
74   * @}
75   */
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif /* __USBH_HID_PARSER_H */
82 
83 /**
84   * @}
85   */
86 
87 /**
88   * @}
89   */
90 
91 /**
92   * @}
93   */
94 
95 /**
96   * @}
97   */
98 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
99