diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-06-26 18:18:14 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-06-26 18:18:14 +0000 |
commit | 9492ff4976cb9e8af40c9a6715b7d9f7ef5f9428 (patch) | |
tree | 1f6a61a57f6502c1c072cc1f0834da6d006919df /os/hal/platforms/STM32 | |
parent | 853b0fd51c80d9b8640639321a950f16800d57d4 (diff) | |
download | ChibiOS-9492ff4976cb9e8af40c9a6715b7d9f7ef5f9428.tar.gz ChibiOS-9492ff4976cb9e8af40c9a6715b7d9f7ef5f9428.tar.bz2 ChibiOS-9492ff4976cb9e8af40c9a6715b7d9f7ef5f9428.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4349 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32')
-rw-r--r-- | os/hal/platforms/STM32/sdc_lld.c | 10 | ||||
-rw-r--r-- | os/hal/platforms/STM32/sdc_lld.h | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/os/hal/platforms/STM32/sdc_lld.c b/os/hal/platforms/STM32/sdc_lld.c index 84eb66b0b..77b20d242 100644 --- a/os/hal/platforms/STM32/sdc_lld.c +++ b/os/hal/platforms/STM32/sdc_lld.c @@ -41,8 +41,8 @@ /* Driver local definitions. */
/*===========================================================================*/
-#define DMA_CHANNEL \
- STM32_DMA_GETCHANNEL(STM32_SDC_SDIO_DMA_STREAM, \
+#define DMA_CHANNEL \
+ STM32_DMA_GETCHANNEL(STM32_SDC_SDIO_DMA_STREAM, \
STM32_SDC_SDIO_DMA_CHN)
/*===========================================================================*/
@@ -346,7 +346,7 @@ void sdc_lld_start(SDCDriver *sdcp) { STM32_DMA_CR_MBURST_INCR4;
#endif
- if (sdcp->state == SDC_STOP) {
+ if (sdcp->state == BLK_STOP) {
/* Note, the DMA must be enabled before the IRQs.*/
bool_t b;
b = dmaStreamAllocate(sdcp->dma, STM32_SDC_SDIO_IRQ_PRIORITY, NULL, NULL);
@@ -376,7 +376,9 @@ void sdc_lld_start(SDCDriver *sdcp) { */
void sdc_lld_stop(SDCDriver *sdcp) {
- if ((sdcp->state == SDC_READY) || (sdcp->state == SDC_ACTIVE)) {
+ if (sdcp->state != BLK_STOP) {
+
+ /* SDIO deactivation.*/
SDIO->POWER = 0;
SDIO->CLKCR = 0;
SDIO->DCTRL = 0;
diff --git a/os/hal/platforms/STM32/sdc_lld.h b/os/hal/platforms/STM32/sdc_lld.h index 79eac638a..0312b011d 100644 --- a/os/hal/platforms/STM32/sdc_lld.h +++ b/os/hal/platforms/STM32/sdc_lld.h @@ -230,10 +230,6 @@ struct SDCDriver { const struct SDCDriverVMT *vmt;
_mmcsd_block_device_data
/**
- * @brief Driver state.
- */
- sdcstate_t state;
- /**
* @brief Current configuration data.
*/
const SDCConfig *config;
|