Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 30, 2024, 01:55:31 01:55


Login with username, password and session length


Pages: [1]
Print
Author Topic: MkroC HID Maximum Report Size  (Read 4342 times)
0 Members and 1 Guest are viewing this topic.
odsk
Junior Member
**
Offline Offline

Posts: 53

Thank You
-Given: 13
-Receive: 12


« on: June 02, 2014, 03:52:21 03:52 »

Hello;
I am using MkroC for PIC and while creating a descriptor using HID terminal I need to select the size of the transfer report size. The size by default is 64 for in and out reports. what is the maximum report length I can use? MikroC won't let enter 255 for example.
PIC used is 18f4550.

Thanks,
ODSK
Logged
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2420

Thank You
-Given: 862
-Receive: 678


Top Topic Starter


« Reply #1 on: June 02, 2014, 09:18:34 09:18 »

in usb standard for hid, size can be changed and is not limited, but be aware that a maximum of 64 bytes can be sent at one time, the report length should be equal or less than the endpoint size, so the endpoint size is the problem as HW guarantees sending/receiving 64 bytes in one packet, if the report is bigger than the endpoint size you must send the report in several times, usually people use a for loop to accomplish sending arrays larger than 64 byes.

the following lines in your usbdsc.c

const char HID_INPUT_REPORT_BYTES = 64;
const char HID_OUTPUT_REPORT_BYTES = 64;

« Last Edit: June 02, 2014, 09:32:44 09:32 by metal » Logged
XxMohannadxX
Newbie
*
Offline Offline

Posts: 32

Thank You
-Given: 23
-Receive: 78


« Reply #2 on: June 02, 2014, 10:13:37 10:13 »

Hello;
I am using MkroC for PIC and while creating a descriptor using HID terminal I need to select the size of the transfer report size. The size by default is 64 for in and out reports. what is the maximum report length I can use? MikroC won't let enter 255 for example.
PIC used is 18f4550.

Thanks,
ODSK


you can use CDC it has a max of 128 bytes and it is also available in mikroc
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC