STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
usbh_hid.h File Reference

This file contains all the prototypes for the usbh_hid.c. More...

#include "usbh_core.h"
#include "usbh_hid_mouse.h"
#include "usbh_hid_keybd.h"

Go to the source code of this file.

Data Structures

struct  _HID_ReportData
 
struct  _HID_ReportIDTypeDef
 
struct  _HID_CollectionTypeDef
 
struct  _HID_AppCollectionTypeDef
 
struct  _HIDDescriptor
 
struct  FIFO_TypeDef
 
struct  _HID_Process
 

Macros

#define HID_MIN_POLL   10
 
#define HID_REPORT_SIZE   16
 
#define HID_MAX_USAGE   10
 
#define HID_MAX_NBR_REPORT_FMT   10
 
#define HID_QUEUE_SIZE   10
 
#define HID_ITEM_LONG   0xFE
 
#define HID_ITEM_TYPE_MAIN   0x00
 
#define HID_ITEM_TYPE_GLOBAL   0x01
 
#define HID_ITEM_TYPE_LOCAL   0x02
 
#define HID_ITEM_TYPE_RESERVED   0x03
 
#define HID_MAIN_ITEM_TAG_INPUT   0x08
 
#define HID_MAIN_ITEM_TAG_OUTPUT   0x09
 
#define HID_MAIN_ITEM_TAG_COLLECTION   0x0A
 
#define HID_MAIN_ITEM_TAG_FEATURE   0x0B
 
#define HID_MAIN_ITEM_TAG_ENDCOLLECTION   0x0C
 
#define HID_GLOBAL_ITEM_TAG_USAGE_PAGE   0x00
 
#define HID_GLOBAL_ITEM_TAG_LOG_MIN   0x01
 
#define HID_GLOBAL_ITEM_TAG_LOG_MAX   0x02
 
#define HID_GLOBAL_ITEM_TAG_PHY_MIN   0x03
 
#define HID_GLOBAL_ITEM_TAG_PHY_MAX   0x04
 
#define HID_GLOBAL_ITEM_TAG_UNIT_EXPONENT   0x05
 
#define HID_GLOBAL_ITEM_TAG_UNIT   0x06
 
#define HID_GLOBAL_ITEM_TAG_REPORT_SIZE   0x07
 
#define HID_GLOBAL_ITEM_TAG_REPORT_ID   0x08
 
#define HID_GLOBAL_ITEM_TAG_REPORT_COUNT   0x09
 
#define HID_GLOBAL_ITEM_TAG_PUSH   0x0A
 
#define HID_GLOBAL_ITEM_TAG_POP   0x0B
 
#define HID_LOCAL_ITEM_TAG_USAGE   0x00
 
#define HID_LOCAL_ITEM_TAG_USAGE_MIN   0x01
 
#define HID_LOCAL_ITEM_TAG_USAGE_MAX   0x02
 
#define HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX   0x03
 
#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MIN   0x04
 
#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MAX   0x05
 
#define HID_LOCAL_ITEM_TAG_STRING_INDEX   0x07
 
#define HID_LOCAL_ITEM_TAG_STRING_MIN   0x08
 
#define HID_LOCAL_ITEM_TAG_STRING_MAX   0x09
 
#define HID_LOCAL_ITEM_TAG_DELIMITER   0x0A
 
#define USB_HID_GET_REPORT   0x01
 
#define USB_HID_GET_IDLE   0x02
 
#define USB_HID_GET_PROTOCOL   0x03
 
#define USB_HID_SET_REPORT   0x09
 
#define USB_HID_SET_IDLE   0x0A
 
#define USB_HID_SET_PROTOCOL   0x0B
 
#define USB_HID_CLASS   0x03
 
#define HID_BOOT_CODE   0x01
 
#define HID_KEYBRD_BOOT_CODE   0x01
 
#define HID_MOUSE_BOOT_CODE   0x02
 
#define USBH_HID_CLASS   &HID_Class
 

Typedefs

typedef struct _HID_ReportData HID_ReportDataTypeDef
 
typedef struct _HID_ReportIDTypeDef HID_ReportIDTypeDef
 
typedef struct _HID_CollectionTypeDef HID_CollectionTypeDef
 
typedef struct _HID_AppCollectionTypeDef HID_AppCollectionTypeDef
 
typedef struct _HIDDescriptor HID_DescTypeDef
 
typedef struct _HID_Process HID_HandleTypeDef
 

Enumerations

enum  HID_StateTypeDef {
  HID_IDLE = 0, HID_BUSY, HID_INIT = 0, HID_IDLE,
  HID_SEND_DATA, HID_BUSY, HID_GET_DATA, HID_SYNC,
  HID_POLL, HID_ERROR
}
 
enum  HID_CtlStateTypeDef {
  HID_REQ_INIT = 0, HID_REQ_IDLE, HID_REQ_GET_REPORT_DESC, HID_REQ_GET_HID_DESC,
  HID_REQ_SET_IDLE, HID_REQ_SET_PROTOCOL, HID_REQ_SET_REPORT
}
 
enum  HID_TypeTypeDef { HID_MOUSE = 0x01, HID_KEYBOARD = 0x02, HID_UNKNOWN = 0xFF }
 

Functions

USBH_StatusTypeDef USBH_HID_SetReport (USBH_HandleTypeDef *phost, uint8_t reportType, uint8_t reportId, uint8_t *reportBuff, uint8_t reportLen)
 USBH_HID_Set_Report Issues Set Report. More...
 
USBH_StatusTypeDef USBH_HID_GetReport (USBH_HandleTypeDef *phost, uint8_t reportType, uint8_t reportId, uint8_t *reportBuff, uint8_t reportLen)
 USBH_HID_GetReport retreive Set Report. More...
 
USBH_StatusTypeDef USBH_HID_GetHIDReportDescriptor (USBH_HandleTypeDef *phost, uint16_t length)
 USBH_Get_HID_ReportDescriptor Issue report Descriptor command to the device. Once the response received, parse the report descriptor and update the status. More...
 
USBH_StatusTypeDef USBH_HID_GetHIDDescriptor (USBH_HandleTypeDef *phost, uint16_t length)
 USBH_Get_HID_Descriptor Issue HID Descriptor command to the device. Once the response received, parse the report descriptor and update the status. More...
 
USBH_StatusTypeDef USBH_HID_SetIdle (USBH_HandleTypeDef *phost, uint8_t duration, uint8_t reportId)
 USBH_Set_Idle Set Idle State. More...
 
USBH_StatusTypeDef USBH_HID_SetProtocol (USBH_HandleTypeDef *phost, uint8_t protocol)
 USBH_Set_Protocol Set protocol State. More...
 
void USBH_HID_EventCallback (USBH_HandleTypeDef *phost)
 The function is a callback about HID Data events. More...
 
HID_TypeTypeDef USBH_HID_GetDeviceType (USBH_HandleTypeDef *phost)
 USBH_HID_GetDeviceType Return Device function. More...
 
uint8_t USBH_HID_GetPollInterval (USBH_HandleTypeDef *phost)
 USBH_HID_GetPollInterval Return HID device poll time. More...
 
void fifo_init (FIFO_TypeDef *f, uint8_t *buf, uint16_t size)
 fifo_init Initialize FIFO. More...
 
uint16_t fifo_read (FIFO_TypeDef *f, void *buf, uint16_t nbytes)
 fifo_read Read from FIFO. More...
 
uint16_t fifo_write (FIFO_TypeDef *f, const void *buf, uint16_t nbytes)
 fifo_write Read from FIFO. More...
 

Variables

USBH_ClassTypeDef HID_Class
 

Detailed Description

This file contains all the prototypes for the usbh_hid.c.

Author
MCD Application Team
Version
V3.2.2
Date
07-July-2015
Attention

© COPYRIGHT 2015 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file usbh_hid.h.