RZT Flexible Software Package Documentation  Release v2.2.0

 
USB HHID Interface

Detailed Description

Interface for USB HHID functions.

Summary

The USB HHID interface provides USB HHID functionality.

Data Structures

struct  usb_hhid_api_t
 
struct  usb_hhid_instance_t
 

Macros

#define USB_HID_OTHER
 Other.
 
#define USB_HID_KEYBOARD
 Keyboard.
 
#define USB_HID_MOUSE
 Mouse.
 
#define USB_HID_IN
 In Transfer.
 
#define USB_HID_OUT
 Out Transfer.
 

Data Structure Documentation

◆ usb_hhid_api_t

struct usb_hhid_api_t

USB HHID functions implemented at the HAL layer will follow this API.

Data Fields

fsp_err_t(* typeGet )(usb_ctrl_t *const p_ctrl, uint8_t *p_type, uint8_t device_address)
 
fsp_err_t(* maxPacketSizeGet )(usb_ctrl_t *const p_ctrl, uint16_t *p_size, uint8_t direction, uint8_t device_address)
 

Field Documentation

◆ typeGet

fsp_err_t(* usb_hhid_api_t::typeGet) (usb_ctrl_t *const p_ctrl, uint8_t *p_type, uint8_t device_address)

Get HID protocol.(USB Mouse/USB Keyboard/Other Type.)

Parameters
[in]p_ctrlPointer to control structure.
[in]p_typePointer to store HID protocol value.
[in]device_addressDevice Address.

◆ maxPacketSizeGet

fsp_err_t(* usb_hhid_api_t::maxPacketSizeGet) (usb_ctrl_t *const p_ctrl, uint16_t *p_size, uint8_t direction, uint8_t device_address)

Obtains max packet size for the connected HID device. The max packet size is set to the area. Set the direction (USB_HID_IN/USB_HID_OUT).

Parameters
[in]p_ctrlPointer to control structure.
[in]p_sizePointer to the area to store the max package size.
[in]directionTransfer direction.
[in]device_addressDevice Address.

◆ usb_hhid_instance_t

struct usb_hhid_instance_t

This structure encompasses everything that is needed to use an instance of this interface.

Data Fields
usb_ctrl_t * p_ctrl Pointer to the control structure for this instance.
usb_cfg_t const * p_cfg Pointer to the configuration structure for this instance.
usb_hhid_api_t const * p_api Pointer to the API structure for this instance.