aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src/usb.c
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-01-04 15:11:17 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-01-04 15:11:17 +0000
commit788175c0883ca8b9aa5c46918c98cd906efdeb9b (patch)
tree7cc13ab262a83f3c2140e10231e4694c4e565ea1 /os/hal/src/usb.c
parent5c2d43e6912254b2a51c01e6bb6e285d1dfc40ca (diff)
downloadChibiOS-788175c0883ca8b9aa5c46918c98cd906efdeb9b.tar.gz
ChibiOS-788175c0883ca8b9aa5c46918c98cd906efdeb9b.tar.bz2
ChibiOS-788175c0883ca8b9aa5c46918c98cd906efdeb9b.zip
HAL MISRA-related fixes.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8687 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src/usb.c')
-rw-r--r--os/hal/src/usb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/os/hal/src/usb.c b/os/hal/src/usb.c
index 4f52424fb..1b4993e49 100644
--- a/os/hal/src/usb.c
+++ b/os/hal/src/usb.c
@@ -419,14 +419,16 @@ void usbStartReceiveI(USBDriver *usbp, usbep_t ep,
USBOutEndpointState *osp;
osalDbgCheckClassI();
- osalDbgCheck((usbp != NULL) && (ep <= USB_MAX_ENDPOINTS));
+ osalDbgCheck((usbp != NULL) && (ep <= (usbep_t)USB_MAX_ENDPOINTS));
osalDbgAssert(!usbGetReceiveStatusI(usbp, ep), "already receiving");
/* Marking the endpoint as active.*/
usbp->receiving |= (uint16_t)((unsigned)1U << (unsigned)ep);
/* Setting up the transfer.*/
+ /*lint -save -e661 [18.1] pclint is confused by the check on ep.*/
osp = usbp->epc[ep]->out_state;
+ /*lint -restore*/
osp->rxbuf = buf;
osp->rxsize = n;
osp->rxcnt = 0;
@@ -456,14 +458,16 @@ void usbStartTransmitI(USBDriver *usbp, usbep_t ep,
USBInEndpointState *isp;
osalDbgCheckClassI();
- osalDbgCheck((usbp != NULL) && (ep <= USB_MAX_ENDPOINTS));
+ osalDbgCheck((usbp != NULL) && (ep <= (usbep_t)USB_MAX_ENDPOINTS));
osalDbgAssert(!usbGetTransmitStatusI(usbp, ep), "already transmitting");
/* Marking the endpoint as active.*/
usbp->transmitting |= (uint16_t)((unsigned)1U << (unsigned)ep);
/* Setting up the transfer.*/
+ /*lint -save -e661 [18.1] pclint is confused by the check on ep.*/
isp = usbp->epc[ep]->in_state;
+ /*lint -restore*/
isp->txbuf = buf;
isp->txsize = n;
isp->txcnt = 0;