Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 0b10100010: // get endpoint
- {
- if ( SetupPkt.wIndex != 0x0002 ) // endpoint id
- return; // don't know what to do with this
- switch( SetupPkt.wValue )
- {
- case 0x0100: // sampling rate
- {
- /*********************************************************************/
- /******************* to do *******************************************/
- // you have to get information about the sample rate configuration.
- // This case is for getting RAM value and with 'SetupPkt.bRequest' you
- // can select sampling rate case.
- //
- // case 0x81: // sampling rate
- //
- // these requests are not supported
- // case 0x82: // GET_MIN
- // case 0x83: // GET_MAX
- // case 0x84: // GET_RES
- //
- //NOTE: You have to use 'USBSetCtrfINData' function (see usbdrv.h)
- // for getting information about sample rate configuration. You have to
- // read from the _RAM and write in SampleFreq variable.
- /*****************************************************************/
- // SampleRate
- if (SetupPkt.bRequest == 0x81)
- USBSetCtrfINData(SampleFreq, sizeof(SampleFreq), _RAM);
- /*****************************************************************/
- }
- default:
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement