Hello everyone, I'm looking for a document specifying the possible USB requests (class and vendor requests, apart from the standard ones) that I can send to my AT MEGA 2560 controller (from what I understand it's the generic version of the Arduino Mega 2560).
I am currently trying to establish a basic communication between the generic Arduino and my PC through USB because I'm developing a project with the WebUSB API. I've already gone through it a couple of times now but I can't seem to understand why, during the control transfer stage, is it that they provide the function with the following parameters:
{
requestType: 'vendor',
recipient: 'interface',
request: 0x01, // vendor-specific request: enable channels
value: 0x0013, // 0b00010011 (channels 1, 2 and 5)
index: 0x0001 // Interface 1 is the recipient
}
I assume it's just some specific request for a specific device that the writers used as an example. I do know what the parameters are for a control transfer communication through USB. I just don't know where to find the available vendor and class request parameters for my device so that I can send the request I want to send to establish connection with a specific peripheral (specifically the HC-SR04 proximity sensor).
I've already searched for the AT MEGA 2560 datasheet, but all I could find were some documents that were more focused on specifying the internals of the controller and the electronic communication with peripherals. What I'm looking for is the information regarding the USB communication of the controller. I've also read the Google developers' post on accessing USB devices through the web, that's how I got to the WebUSB API in the first place.
I need to use the WebUSB API because the project is supposed to be a SPA webapp.