diff options
author | Fabien Poussin <fabien.poussin@gmail.com> | 2017-01-04 10:47:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-04 10:47:39 +0100 |
commit | 0135ff7dd3de59991ff7bbfb20e329537019fb4b (patch) | |
tree | 05e61fc91a4c13d83a95b381e6b56bf78cd7aa21 /os/hal/src | |
parent | 52f82fb9cc13779146016ca993c80f7b82ea65bd (diff) | |
parent | 546ac1d584b7b43cb05954164ea05431d2f00796 (diff) | |
download | ChibiOS-Contrib-0135ff7dd3de59991ff7bbfb20e329537019fb4b.tar.gz ChibiOS-Contrib-0135ff7dd3de59991ff7bbfb20e329537019fb4b.tar.bz2 ChibiOS-Contrib-0135ff7dd3de59991ff7bbfb20e329537019fb4b.zip |
Merge pull request #107 from pl4nkton/stm32_fixes
Stm32 fixes
Diffstat (limited to 'os/hal/src')
-rw-r--r-- | os/hal/src/hal_qei.c | 2 | ||||
-rw-r--r-- | os/hal/src/hal_usbh.c | 24 | ||||
-rw-r--r-- | os/hal/src/usbh/hal_usbh_msd.c | 8 |
3 files changed, 17 insertions, 17 deletions
diff --git a/os/hal/src/hal_qei.c b/os/hal/src/hal_qei.c index eb6223e..9b084f7 100644 --- a/os/hal/src/hal_qei.c +++ b/os/hal/src/hal_qei.c @@ -364,7 +364,7 @@ qeidelta_t qeiUpdateI(QEIDriver *qeip) { "invalid state");
cnt = qei_lld_get_count(qeip);
- delta = cnt - qeip->last;
+ delta = (qeicnt_t)(cnt - qeip->last);
qeip->last = cnt;
return delta;
diff --git a/os/hal/src/hal_usbh.c b/os/hal/src/hal_usbh.c index 1caa183..befe17f 100644 --- a/os/hal/src/hal_usbh.c +++ b/os/hal/src/hal_usbh.c @@ -69,7 +69,7 @@ static bool _classdriver_load(usbh_device_t *dev, uint8_t class, /*===========================================================================*/ -/* Checks. */ +/* Checks. */ /*===========================================================================*/ static inline void _check_dev(usbh_device_t *dev) { @@ -92,7 +92,7 @@ static inline void _check_urb(usbh_urb_t *urb) { } /*===========================================================================*/ -/* Main driver API. */ +/* Main driver API. */ /*===========================================================================*/ void usbhObjectInit(USBHDriver *usbh) { @@ -143,7 +143,7 @@ void usbhResume(USBHDriver *usbh) { } /*===========================================================================*/ -/* Endpoint API. */ +/* Endpoint API. */ /*===========================================================================*/ void usbhEPObjectInit(usbh_ep_t *ep, usbh_device_t *dev, const usbh_endpoint_descriptor_t *desc) { @@ -183,7 +183,7 @@ static void _ep0_object_init(usbh_device_t *dev, uint16_t wMaxPacketSize) { /*===========================================================================*/ -/* URB API. */ +/* URB API. */ /*===========================================================================*/ void usbhURBObjectInit(usbh_urb_t *urb, usbh_ep_t *ep, usbh_completion_cb callback, @@ -350,7 +350,7 @@ void _usbh_urb_completeI(usbh_urb_t *urb, usbh_urbstatus_t status) { } /*===========================================================================*/ -/* Synchronous API. */ +/* Synchronous API. */ /*===========================================================================*/ usbh_urbstatus_t usbhBulkTransfer(usbh_ep_t *ep, @@ -419,7 +419,7 @@ usbh_urbstatus_t usbhControlRequest(usbh_device_t *dev, } /*===========================================================================*/ -/* Standard request helpers. */ +/* Standard request helpers. */ /*===========================================================================*/ #define USBH_GET_DESCRIPTOR(type, value, index) \ @@ -523,7 +523,7 @@ bool usbhStdReqGetInterface(usbh_device_t *dev, /*===========================================================================*/ -/* Device-related functions. */ +/* Device-related functions. */ /*===========================================================================*/ static uint8_t _find_address(USBHDriver *host) { @@ -846,7 +846,7 @@ bool usbhDeviceReadString(usbh_device_t *dev, char *dest, uint8_t size, /*===========================================================================*/ -/* Port processing functions. */ +/* Port processing functions. */ /*===========================================================================*/ static void _port_connected(usbh_port_t *port); @@ -1078,7 +1078,7 @@ void _usbh_port_disconnected(usbh_port_t *port) { /*===========================================================================*/ -/* Hub processing functions. */ +/* Hub processing functions. */ /*===========================================================================*/ #if HAL_USBH_USE_HUB @@ -1176,7 +1176,7 @@ static void _hub_process(USBHDriver *host) { #endif /*===========================================================================*/ -/* Main processing loop (enumeration, loading/unloading drivers, etc). */ +/* Main processing loop (enumeration, loading/unloading drivers, etc). */ /*===========================================================================*/ void usbhMainLoop(USBHDriver *usbh) { @@ -1200,7 +1200,7 @@ void usbhMainLoop(USBHDriver *usbh) { /*===========================================================================*/ -/* IAD class driver. */ +/* IAD class driver. */ /*===========================================================================*/ #if HAL_USBH_USE_IAD static usbh_baseclassdriver_t *iad_load(usbh_device_t *dev, const uint8_t *descriptor, uint16_t rem); @@ -1258,7 +1258,7 @@ static void iad_unload(usbh_baseclassdriver_t *drv) { /*===========================================================================*/ -/* Class driver loader. */ +/* Class driver loader. */ /*===========================================================================*/ static const usbh_classdriverinfo_t *usbh_classdrivers_lookup[] = { diff --git a/os/hal/src/usbh/hal_usbh_msd.c b/os/hal/src/usbh/hal_usbh_msd.c index 6869a74..7a4f826 100644 --- a/os/hal/src/usbh/hal_usbh_msd.c +++ b/os/hal/src/usbh/hal_usbh_msd.c @@ -68,7 +68,7 @@ /*===========================================================================*/ -/* USB Class driver loader for MSD */ +/* USB Class driver loader for MSD */ /*===========================================================================*/ USBHMassStorageDriver USBHMSD[HAL_USBHMSD_MAX_INSTANCES]; @@ -234,7 +234,7 @@ static void _msd_unload(usbh_baseclassdriver_t *drv) { /*===========================================================================*/ -/* MSD Class driver operations (Bulk-Only transport) */ +/* MSD Class driver operations (Bulk-Only transport) */ /*===========================================================================*/ @@ -290,7 +290,7 @@ typedef struct { /* ----------------------------------------------------- */ -/* SCSI Commands */ +/* SCSI Commands */ /* ----------------------------------------------------- */ /* Read 10 and Write 10 */ @@ -584,7 +584,7 @@ static msd_result_t scsi_write10(USBHMassStorageLUNDriver *lunp, uint32_t lba, u /*===========================================================================*/ -/* Block driver data/functions */ +/* Block driver data/functions */ /*===========================================================================*/ USBHMassStorageLUNDriver MSBLKD[HAL_USBHMSD_MAX_LUNS]; |