What is the buffer length in USB HID in kl82z?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

What is the buffer length in USB HID in kl82z?

955 Views
rysardsuboc
Contributor II

In usb_device_descriptor.h file is defined buffers and packets sizes.

Why buffer size is 8 Bytes?

Can increase the buffer? 

How many possible increase the buffer? What is maximum size of buffers?

#define USB_HID_GENERIC_IN_BUFFER_LENGTH (8U)
#define USB_HID_GENERIC_OUT_BUFFER_LENGTH (8U)
...

#define HS_HID_GENERIC_INTERRUPT_OUT_PACKET_SIZE (8U)
#define FS_HID_GENERIC_INTERRUPT_OUT_PACKET_SIZE (8U)
#define HS_HID_GENERIC_INTERRUPT_OUT_INTERVAL (0x4U) /* 2^(4-1) = 1ms */
#define FS_HID_GENERIC_INTERRUPT_OUT_INTERVAL (0x01U)

#define HS_HID_GENERIC_INTERRUPT_IN_PACKET_SIZE (8U)
#define FS_HID_GENERIC_INTERRUPT_IN_PACKET_SIZE (8U)
#define HS_HID_GENERIC_INTERRUPT_IN_INTERVAL (0x4U) /* 2^(4-1) = 1ms */
#define FS_HID_GENERIC_INTERRUPT_IN_INTERVAL (0x01U)

0 Kudos
Reply
1 Reply

697 Views
bobpaddock
Senior Contributor III

The maximum buffer size of a HID packet is 64 bytes for USB 2.0 and up.

USB.org - HID Tools 

Jan Axelson's Lakeview Research book "USB Complete" is a thorough introduction to USB.

0 Kudos
Reply