diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-06-27 18:15:59 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-06-27 18:15:59 +0000 |
commit | d2e24645e8fb436c24781c154d12ebeec6791b7a (patch) | |
tree | d3cecd265d3213b8d36e1ad453469aa04f801432 | |
parent | 5520d226097bb9b49f7cdc25ee71457fb020629a (diff) | |
download | ChibiOS-d2e24645e8fb436c24781c154d12ebeec6791b7a.tar.gz ChibiOS-d2e24645e8fb436c24781c154d12ebeec6791b7a.tar.bz2 ChibiOS-d2e24645e8fb436c24781c154d12ebeec6791b7a.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4352 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/platforms/STM32/USBv1/usb_lld.h | 9 | ||||
-rw-r--r-- | os/hal/src/usb.c | 6 |
2 files changed, 3 insertions, 12 deletions
diff --git a/os/hal/platforms/STM32/USBv1/usb_lld.h b/os/hal/platforms/STM32/USBv1/usb_lld.h index 82181b2f4..7e7253abd 100644 --- a/os/hal/platforms/STM32/USBv1/usb_lld.h +++ b/os/hal/platforms/STM32/USBv1/usb_lld.h @@ -347,15 +347,6 @@ struct USBDriver { /*===========================================================================*/
/**
- * @brief Fetches a 16 bits word value from an USB message.
- *
- * @param[in] p pointer to the 16 bits word
- *
- * @notapi
- */
-#define usb_lld_fetch_word(p) (*(uint16_t *)(p))
-
-/**
* @brief Returns the current frame number.
*
* @param[in] usbp pointer to the @p USBDriver object
diff --git a/os/hal/src/usb.c b/os/hal/src/usb.c index 7f9d0456d..afe6f471c 100644 --- a/os/hal/src/usb.c +++ b/os/hal/src/usb.c @@ -125,7 +125,7 @@ static bool_t default_handler(USBDriver *usbp) { /* Handling descriptor requests from the host.*/
dp = usbp->config->get_descriptor_cb(
usbp, usbp->setup[3], usbp->setup[2],
- usb_lld_fetch_word(&usbp->setup[4]));
+ usbFetchWord(&usbp->setup[4]));
if (dp == NULL)
return FALSE;
usbSetupTransfer(usbp, (uint8_t *)dp->ud_string, dp->ud_size, NULL);
@@ -633,7 +633,7 @@ void _usb_ep0setup(USBDriver *usbp, usbep_t ep) { /* Transfer preparation. The request handler must have populated
correctly the fields ep0next, ep0n and ep0endcb using the macro
usbSetupTransfer().*/
- max = usb_lld_fetch_word(&usbp->setup[6]);
+ max = usbFetchWord(&usbp->setup[6]);
/* The transfer size cannot exceed the specified amount.*/
if (usbp->ep0n > max)
usbp->ep0n = max;
@@ -695,7 +695,7 @@ void _usb_ep0in(USBDriver *usbp, usbep_t ep) { (void)ep;
switch (usbp->ep0state) {
case USB_EP0_TX:
- max = usb_lld_fetch_word(&usbp->setup[6]);
+ max = usbFetchWord(&usbp->setup[6]);
/* If the transmitted size is less than the requested size and it is a
multiple of the maximum packet size then a zero size packet must be
transmitted.*/
|