aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-11-20 15:51:19 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-11-20 15:51:19 +0000
commit5f84b30ea1f8bfc4351c0784782075ae806dbf1c (patch)
tree95834c3650270b2f272e085f785c9ff5ccd18c36
parent2ab27d3c01ce51a26587e6aaafcef23b2dda4afe (diff)
downloadChibiOS-5f84b30ea1f8bfc4351c0784782075ae806dbf1c.tar.gz
ChibiOS-5f84b30ea1f8bfc4351c0784782075ae806dbf1c.tar.bz2
ChibiOS-5f84b30ea1f8bfc4351c0784782075ae806dbf1c.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1316 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/io/mmc_spi.c7
-rw-r--r--os/io/pal.h9
-rw-r--r--os/io/platforms/STM32/pal_lld.c1
-rw-r--r--readme.txt1
4 files changed, 14 insertions, 4 deletions
diff --git a/os/io/mmc_spi.c b/os/io/mmc_spi.c
index 4013f45f5..4f6adaf7d 100644
--- a/os/io/mmc_spi.c
+++ b/os/io/mmc_spi.c
@@ -488,7 +488,7 @@ bool_t mmcStartSequentialWrite(MMCDriver *mmcp, uint32_t startblk) {
if (recvr1(mmcp) != 0x00) {
spiUnselect(mmcp->mmc_spip);
chSysLock();
- if (mmcp->mmc_state == MMC_READING)
+ if (mmcp->mmc_state == MMC_WRITING)
mmcp->mmc_state = MMC_READY;
chSysUnlock();
return TRUE;
@@ -560,8 +560,11 @@ bool_t mmcStopSequentialWrite(MMCDriver *mmcp) {
spiUnselect(mmcp->mmc_spip);
chSysLock();
- if (mmcp->mmc_state == MMC_WRITING)
+ if (mmcp->mmc_state == MMC_WRITING) {
mmcp->mmc_state = MMC_READY;
+ chSysUnlock();
+ return FALSE;
+ }
chSysUnlock();
return TRUE;
}
diff --git a/os/io/pal.h b/os/io/pal.h
index 2a1cbaf63..67bc424b1 100644
--- a/os/io/pal.h
+++ b/os/io/pal.h
@@ -67,14 +67,19 @@
#define PAL_MODE_INPUT_PULLDOWN 4
/**
+ * @brief Analog input mode.
+ */
+#define PAL_MODE_INPUT_ANALOG 5
+
+/**
* @brief Push-pull output pad.
*/
-#define PAL_MODE_OUTPUT_PUSHPULL 5
+#define PAL_MODE_OUTPUT_PUSHPULL 6
/**
* @brief Open-drain output pad.
*/
-#define PAL_MODE_OUTPUT_OPENDRAIN 6
+#define PAL_MODE_OUTPUT_OPENDRAIN 7
#ifndef _PAL_LLD_H_
#include "pal_lld.h"
diff --git a/os/io/platforms/STM32/pal_lld.c b/os/io/platforms/STM32/pal_lld.c
index 83428e8e1..83b51f014 100644
--- a/os/io/platforms/STM32/pal_lld.c
+++ b/os/io/platforms/STM32/pal_lld.c
@@ -124,6 +124,7 @@ void _pal_lld_setgroupmode(ioportid_t port,
4, /* PAL_MODE_INPUT */
8, /* PAL_MODE_INPUT_PULLUP */
8, /* PAL_MODE_INPUT_PULLDOWN */
+ 0, /* PAL_MODE_INPUT_ANALOG */
3, /* PAL_MODE_OUTPUT_PUSHPULL, 50MHz.*/
7, /* PAL_MODE_OUTPUT_OPENDRAIN, 50MHz.*/
};
diff --git a/readme.txt b/readme.txt
index 9342e152f..825150e6d 100644
--- a/readme.txt
+++ b/readme.txt
@@ -3,6 +3,7 @@
*****************************************************************************
*** 1.3.5 ***
+- FIX: Fixed some problems in the MMC_SPI driver (bugs 2901084 and 2901172).
- NEW: STM32 ADC driver implementation with DMA support.
- CHANGE: In the STM32 drivers now the DMA errors are handled by hook macros
rather than by events. The default action is to halt the system but users