From eb77b08caa834c4b1d2db9b28684e6c22729c027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=B6schle?= Date: Sun, 3 Nov 2013 08:47:08 +0000 Subject: [PATCH] fixed swpw() usage --- sources/usb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/usb.c b/sources/usb.c index 9b5049a..65e5e35 100644 --- a/sources/usb.c +++ b/sources/usb.c @@ -495,7 +495,7 @@ int usb_parse_config(struct usb_device *dev, unsigned char *buffer, int cfgno) /* found an endpoint */ dev->config.if_desc[ifno].no_of_ep++; memcpy(&dev->config.if_desc[ifno].ep_desc[epno], &buffer[index], buffer[index]); - swpw(&(dev->config.if_desc[ifno].ep_desc[epno].wMaxPacketSize)); + dev->config.if_desc[devno].ep_desc.wMaxPacketSize = swpw(&(dev->config.if_desc[ifno].ep_desc[epno].wMaxPacketSize)); USB_PRINTF("if %d, ep %d\r\n", ifno, epno); break; default: @@ -1025,10 +1025,10 @@ int usb_new_device(struct usb_device *dev) return 1; } /* correct le values */ - swpw(&dev->descriptor.bcdUSB); - swpw(&dev->descriptor.idVendor); - swpw(&dev->descriptor.idProduct); - swpw(&dev->descriptor.bcdDevice); + dev->descriptor.bcdUSB = swpw(dev->descriptor.bcdUSB); + dev->descriptor.idVendor = swpw(dev->descriptor.idVendor); + dev->descriptor.idProduct = swpw(dev->descriptor.idProduct); + dev->descriptor.bcdDevice = swpw(dev->descriptor.bcdDevice); /* only support for one config for now */ usb_get_configuration_no(dev, &tmpbuf[0], 0); usb_parse_config(dev, &tmpbuf[0], 0);