diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-09-19 18:00:51 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-09-19 18:00:51 +0000 |
commit | 9eef4917a71115fb38adcaa8bc11d00884055917 (patch) | |
tree | 230481aa39aeb3b960f26f8942626d9c8fb84adc | |
parent | ff207a92df56d751c994691286acea57ab65fbed (diff) | |
download | ChibiOS-9eef4917a71115fb38adcaa8bc11d00884055917.tar.gz ChibiOS-9eef4917a71115fb38adcaa8bc11d00884055917.tar.bz2 ChibiOS-9eef4917a71115fb38adcaa8bc11d00884055917.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4699 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/platforms/STM32/OTGv1/usb_lld.c | 4 | ||||
-rw-r--r-- | os/hal/src/mmc_spi.c | 2 | ||||
-rw-r--r-- | os/hal/src/sdc.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/os/hal/platforms/STM32/OTGv1/usb_lld.c b/os/hal/platforms/STM32/OTGv1/usb_lld.c index 98d0f6d03..1dd7e1b8f 100644 --- a/os/hal/platforms/STM32/OTGv1/usb_lld.c +++ b/os/hal/platforms/STM32/OTGv1/usb_lld.c @@ -705,6 +705,8 @@ static msg_t usb_lld_pump(void *p) { epmask = (1 << ep);
if (usbp->txpending & epmask) {
+ bool_t done;
+
chSysLock();
/* USB interrupts are globally *suspended* because the peripheral
does not allow any interference during the TX FIFO filling
@@ -717,7 +719,7 @@ static msg_t usb_lld_pump(void *p) { usbp->txpending &= ~epmask;
chSysUnlock();
- bool_t done = otg_txfifo_handler(usbp, ep);
+ done = otg_txfifo_handler(usbp, ep);
chSysLock();
otgp->GAHBCFG |= GAHBCFG_GINTMSK;
diff --git a/os/hal/src/mmc_spi.c b/os/hal/src/mmc_spi.c index f8056f392..65d655212 100644 --- a/os/hal/src/mmc_spi.c +++ b/os/hal/src/mmc_spi.c @@ -439,6 +439,7 @@ void mmcStop(MMCDriver *mmcp) { */
bool_t mmcConnect(MMCDriver *mmcp) {
unsigned i;
+ uint8_t r3[4];
chDbgCheck(mmcp != NULL, "mmcConnect");
@@ -466,7 +467,6 @@ bool_t mmcConnect(MMCDriver *mmcp) { addresses if possible.
This method is based on "How to support SDC Ver2 and high capacity cards"
by ElmChan.*/
- uint8_t r3[4];
if (send_command_R3(mmcp, MMCSD_CMD_SEND_IF_COND,
MMCSD_CMD8_PATTERN, r3) != 0x05) {
diff --git a/os/hal/src/sdc.c b/os/hal/src/sdc.c index cee9049fd..c8dcbf18f 100644 --- a/os/hal/src/sdc.c +++ b/os/hal/src/sdc.c @@ -443,13 +443,14 @@ bool_t sdcWrite(SDCDriver *sdcp, uint32_t startblk, * @api
*/
sdcflags_t sdcGetAndClearErrors(SDCDriver *sdcp) {
+ sdcflags_t flags;
chDbgCheck(sdcp != NULL, "sdcGetAndClearErrors");
chDbgAssert(sdcp->state == BLK_READY,
"sdcGetAndClearErrors(), #1", "invalid state");
chSysLock();
- sdcflags_t flags = sdcp->errors;
+ flags = sdcp->errors;
sdcp->errors = SDC_NO_ERROR;
chSysUnlock();
return flags;
|