For example you could do this. Remember: "setupData" needs to be at least 8 bytes.
On the host side you again could decode the single bytes together to an int.
Best regards
On the host side you again could decode the single bytes together to an int.
- usbMsgPtr = (usbMsgPtr_t)setupData;
switch (rq->bRequest) {
[...]
case PSCMD_CALL_GETBUFFERSIZE: {
setupData[0] = rq->bRequest;
setupData[1] = PSCMD_RETN_OKAY;
setupData[2] = (singlebuffersize)&0xff;
setupData[3] = (singlebuffersize)>>8;
cli();
[...]
Best regards