aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/LowLevel/PrinterHost/PrinterHost.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-05-27 07:33:58 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-05-27 07:33:58 +0000
commitcc9b190919abbc567cd179b31afeef565efb1f17 (patch)
tree8623481832f9a5a53eec5f49f712ca383732cba7 /Demos/Host/LowLevel/PrinterHost/PrinterHost.c
parent348bf33b189b6dfa2d62170331ed6402b986ee59 (diff)
downloadlufa-cc9b190919abbc567cd179b31afeef565efb1f17.tar.gz
lufa-cc9b190919abbc567cd179b31afeef565efb1f17.tar.bz2
lufa-cc9b190919abbc567cd179b31afeef565efb1f17.zip
Add new USB_Host_SetInterfaceAltSetting() convenience function.
Diffstat (limited to 'Demos/Host/LowLevel/PrinterHost/PrinterHost.c')
-rw-r--r--Demos/Host/LowLevel/PrinterHost/PrinterHost.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/Demos/Host/LowLevel/PrinterHost/PrinterHost.c b/Demos/Host/LowLevel/PrinterHost/PrinterHost.c
index 045ecd9fb..6265eeeb9 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);