Fixed LowLevel PrinterHost demo not sending control requests to the attached printer with the correct printer interface wIndex value.

This commit is contained in:
Dean Camera 2010-08-24 13:16:16 +00:00
parent 092f82e06f
commit b7b8a9edfa
6 changed files with 18 additions and 12 deletions

View file

@ -153,7 +153,7 @@ void EVENT_USB_Device_ConfigurationChanged(void)
void EVENT_USB_Device_UnhandledControlRequest(void)
{
/* Determine which interface's Line Coding data is being set from the wIndex parameter */
uint8_t* LineEncodingData = (USB_ControlRequest.wIndex == 0) ? (uint8_t*)&LineEncoding1 : (uint8_t*)&LineEncoding2;
void* LineEncodingData = (USB_ControlRequest.wIndex == 0) ? &LineEncoding1 : &LineEncoding2;
/* Process CDC specific control requests */
switch (USB_ControlRequest.bRequest)