diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-05-27 07:33:58 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-05-27 07:33:58 +0000 |
| commit | 0304f3303a645127ffe29038850edd1bde110008 (patch) | |
| tree | 8623481832f9a5a53eec5f49f712ca383732cba7 /Demos/Host | |
| parent | 0ad10530ec6eedf2b852e2c32d40283244f1c2ec (diff) | |
Add new USB_Host_SetInterfaceAltSetting() convenience function.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1770 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/Host')
| -rw-r--r-- | Demos/Host/LowLevel/PrinterHost/PrinterHost.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Demos/Host/LowLevel/PrinterHost/PrinterHost.c b/Demos/Host/LowLevel/PrinterHost/PrinterHost.c index 045ecd9f..6265eeeb 100644 --- a/Demos/Host/LowLevel/PrinterHost/PrinterHost.c +++ b/Demos/Host/LowLevel/PrinterHost/PrinterHost.c @@ -177,16 +177,7 @@ void USB_Printer_Host(void) * request to switch to the interface alternate setting with the Bidirectional protocol */ if (PrinterAltSetting) { - USB_ControlRequest = (USB_Request_Header_t) - { - .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_INTERFACE), - .bRequest = REQ_SetInterface, - .wValue = PrinterAltSetting, - .wIndex = PrinterInterfaceNumber, - .wLength = 0, - }; - - if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful) + if ((ErrorCode = USB_Host_SetInterfaceAltSetting(PrinterInterfaceNumber, PrinterAltSetting)) != HOST_SENDCONTROL_Successful) { printf_P(PSTR(ESC_FG_RED "Control Error (Set Interface).\r\n" " -- Error Code: %d\r\n" ESC_FG_WHITE), ErrorCode); |
