diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-02-12 09:45:06 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-02-12 09:45:06 +0000 |
commit | cf5dfef7a8e220f8d4d85edba664c526995ef8f6 (patch) | |
tree | 8b5db8b1b5c4cd72280fd415c89aadd4dd415cf6 | |
parent | aab3b75fc1a7db54dff630b74158a673b88f8fa1 (diff) | |
download | ChibiOS-cf5dfef7a8e220f8d4d85edba664c526995ef8f6.tar.gz ChibiOS-cf5dfef7a8e220f8d4d85edba664c526995ef8f6.tar.bz2 ChibiOS-cf5dfef7a8e220f8d4d85edba664c526995ef8f6.zip |
Optimization in write operations of the MMC_SPI driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3953 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/src/mmc_spi.c | 8 | ||||
-rw-r--r-- | todo.txt | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/os/hal/src/mmc_spi.c b/os/hal/src/mmc_spi.c index 06f2594bf..079dcf3c0 100644 --- a/os/hal/src/mmc_spi.c +++ b/os/hal/src/mmc_spi.c @@ -665,10 +665,8 @@ bool_t mmcSequentialWrite(MMCDriver *mmcp, const uint8_t *buffer) { spiSend(mmcp->spip, MMC_SECTOR_SIZE, buffer); /* Data. */
spiIgnore(mmcp->spip, 2); /* CRC ignored. */
spiReceive(mmcp->spip, 1, b);
- if ((b[0] & 0x1F) == 0x05) {
- wait(mmcp);
+ if ((b[0] & 0x1F) == 0x05)
return FALSE;
- }
/* Error.*/
spiUnselect(mmcp->spip);
@@ -701,6 +699,10 @@ bool_t mmcStopSequentialWrite(MMCDriver *mmcp) { }
chSysUnlock();
+ /* Wait completion of the last write operation.*/
+ wait(mmcp);
+
+ /* Semd stop command.*/
spiSend(mmcp->spip, sizeof(stop), stop);
spiUnselect(mmcp->spip);
@@ -15,6 +15,7 @@ Within 2.5.x: * Revision of scheduling strategy for threads at equal priority.
* Handling of Virtual Timer callbacks out of critical zone.
* Add normal API (not iclass) variants of the VT functions.
+* MMC_SPI driver speedup.
- Add the RTC service inside the kernel and port, remove from HAL.
- Add option to use the RTC counter instead of the systick counter into the
trace buffer.
@@ -27,7 +28,6 @@ Within 2.5.x: - Runtime errors manager in HAL.
- Critical errors manager in HAL (to replace or complement assertions).
- Streaming DAC/I2S driver model and STM32 implementation.
-- MMC_SPI driver speedup.
- USB driver model revision.
- MAC driver for STM32F107, STM32F2xx, STM32F4xx.
- STM32 OTG USB cell support for CL, F2, F4 devices.
|