git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1316 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2009-11-20 15:51:19 +00:00
parent 2ab27d3c01
commit 5f84b30ea1
4 changed files with 14 additions and 4 deletions

View File

@ -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;
}

View File

@ -66,15 +66,20 @@
*/
#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"

View File

@ -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.*/
};

View File

@ -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