never tried it as hid kb but for a hid cdc anyway the data you need to send must be chunked into usb-tx buffer sized lumps
then sent a multiple usb transmissions.
what have you tried ?
never tried it as hid kb but for a hid cdc anyway the data you need to send must be chunked into usb-tx buffer sized lumps
then sent a multiple usb transmissions.
what have you tried ?
Warning I'm not a teacher
It is not so easy to change buffer. You must change descriptor file, not just length(If I understand usb correctly).
You can send one letter and modifier key at time.
Use this
You can use arrayCode:For i = 0 To 20 lookup i,[KEY_V, KEY_A, KEY_L, KEY_U, KEY_E, KEY_ENTER, 0], USBBufferOut[2] call DoUsbOut IF USBBufferOut[2]=0 THEN EXIT Next i
Code:For i = 0 To 20 USBBufferOut[2]= MyArray[i] call DoUsbOut IF USBBufferOut[2]=0 THEN EXIT Next i
If you follow the HID descriptor fields, you will notice you need to change the report count for the report which has to carry more data. The endpoint buffer is just a holding place for the in/out data that is handled by the USB interrupt. I am not very conversant with HID at the moment, but can look it up as I have worked on HID keyboards with PSoC
Last edited by Jerson; - 19th December 2021 at 03:43. Reason: removed signature
I think every variable or constant I could find in the program and the descriptor file. One at a time or combination of them. The result was sending the 8 wide buffer all the time.
Yes, I found the hard way...
I guess for now, your approach is the only way to do it. I thought I could escape with just a number change from 8 to 16!
Jerson, as I noted above, I did change all those variables related to the buffer size (all where at 8 bytes) within descriptor file, but nothing really worked.
Ioannis
Along buffer size, you need to change in hid_desc.bas:
If I understand correctly. But I never had any luck with changing descriptor files.Code:ReportDescriptor1 retlw 0x05 retlw 0x01 ; usage page (generic desktop) retlw 0x09 retlw 0x06 ; usage (keyboard) retlw 0xA1 retlw 0x01 ; collection (application) retlw 0x05 retlw 0x07 ; usage (Key codes) retlw 0x19 retlw 0xE0 ; usage minimum (224) retlw 0x29 retlw 0xE7 ; usage minimum (231) retlw 0x15 retlw 0x00 ; logical minimum (0) retlw 0x25 retlw 0x01 ; logical maximum (1) retlw 0x75 retlw 0x01 ; report size (1) retlw 0x95 retlw 0x08 ; report count (8) retlw 0x81 retlw 0x02 ; Input (data,variable,absolute) retlw 0x95 retlw 0x01 ; report count (1) retlw 0x75 retlw 0x08 ; report size (8) retlw 0x81 retlw 0x01 ; Input (constant) retlw 0x95 retlw 0x05 ; report count (5) retlw 0x75 retlw 0x01 ; report size (1) retlw 0x05 retlw 0x08 ; usage page (page# for leds) retlw 0x19 retlw 0x01 ; Usage minimum (1) retlw 0x29 retlw 0x05 ; Usage maximum (5) retlw 0x91 retlw 0x02 ; output (data,variable,absolute) retlw 0x95 retlw 0x01 ; report count (1) retlw 0x75 retlw 0x03 ; report size (3) retlw 0x91 retlw 0x01 ; output (constant) retlw 0x95 retlw 0x06 ; report count (6) retlw 0x75 retlw 0x08 ; report size (8) retlw 0x15 retlw 0x00 ; logical minimum (0) retlw 0x25 retlw 0x65 ; logical maximum (101) retlw 0x05 retlw 0x07 ; usage page (keycodes) retlw 0x19 retlw 0x00 ; usage minimum (0) retlw 0x29 retlw 0x65 ; usage maximum (101) retlw 0x81 retlw 0x00 ; input (data, array) retlw 0xC0 ; end collection EndReportDescriptor1
I think you can find some info in this series:
Look for nkey roll over descriptor...
if i watch that first video again i could fool myself into believing that one day i might understand usb enough to actually get somewhere with it
great info pedja089
Warning I'm not a teacher
Bookmarks