Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 03, 2016, 02:35:21 14:35


Login with username, password and session length


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

Posts: 53

Thank You
-Given: 11
-Receive: 12


« on: June 02, 2014, 04:52:21 04: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: 2018

Thank You
-Given: 514
-Receive: 477


Top Topic Starter


« Reply #1 on: June 02, 2014, 10:18:34 10: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, 10:32:44 10:32 by metal » Logged

nothing to say..
XxMohannadxX
Newbie
*
Offline Offline

Posts: 28

Thank You
-Given: 16
-Receive: 75


« Reply #2 on: June 02, 2014, 11:13:37 11: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