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

This commit is contained in:
gdisirio 2009-11-09 20:47:08 +00:00
parent 85cf8d37b5
commit 727ba84c9b
3 changed files with 14 additions and 3 deletions

View File

@ -156,7 +156,9 @@
ready -> stop [label="spiStop()"];
stop -> stop [label="spiStop()"];
ready -> active [label="spiSelect()"];
active -> active [label="spiSelect()"];
active -> ready [label="spiUnselect()"];
ready -> ready [label="spiUnselect()"];
active -> active [label="spiExchange()\nspiSend()\nspiReceive()"];
}
* @enddot

View File

@ -184,7 +184,14 @@ void mmcInit(void) {
/**
* @brief Initializes an instance.
*
* @param[in] mmcp pointer to the @p MMCDriver object
* @param[in] mmcp pointer to the @p MMCDriver object
* @param[in] spip pointer to the SPI driver to be used as interface
* @param[in] lscfg low speed configuration for the SPI driver
* @param[in] hscfg high speed configuration for the SPI driver
* @param[in] is_protected function that returns the card write protection
* setting
* @param[in] is_inserted function that returns the card insertion sensor
* status
*/
void mmcObjectInit(MMCDriver *mmcp, SPIDriver *spip,
const SPIConfig *lscfg, const SPIConfig *hscfg,

View File

@ -99,7 +99,8 @@ void spiSelect(SPIDriver *spip) {
chDbgCheck(spip != NULL, "spiSelect");
chSysLock();
chDbgAssert(spip->spd_state == SPI_READY,
chDbgAssert((spip->spd_state == SPI_READY) ||
(spip->spd_state == SPI_ACTIVE),
"spiSelect(), #1",
"not idle");
spi_lld_select(spip);
@ -118,7 +119,8 @@ void spiUnselect(SPIDriver *spip) {
chDbgCheck(spip != NULL, "spiUnselect");
chSysLock();
chDbgAssert(spip->spd_state == SPI_ACTIVE,
chDbgAssert((spip->spd_state == SPI_READY) ||
(spip->spd_state == SPI_ACTIVE),
"spiUnselect(), #1",
"not locked");
spi_lld_unselect(spip);