2010-08-10 03:11:02 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
< html > < head > < meta http-equiv = "Content-Type" content = "text/html;charset=UTF-8" >
< title > ChibiOS/RT: mmc_spi.h Source File< / title >
< link href = "custom.css" rel = "stylesheet" type = "text/css" >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" >
< / head > < body >
< table style = "text-align: center; width: 100%;" border = "0"
cellpadding="2" cellspacing="2">
< tbody >
< tr >
< td style = "width: 80px;" > < img alt = "ChibiOS/RT Logo" src = "logo_small.png" > < / td >
< td > < big > < big > ChibiOS/RT< / big > < / big > < br > < br > Architecture - Reference Manual - Guides< / td >
< td style = "width: 80px;" > < / td >
< / tr >
< / tbody >
< / table >
< hr size = "1" >
2010-11-22 05:53:37 +00:00
<!-- Generated by Doxygen 1.7.1 -->
2010-08-10 03:11:02 +00:00
< div class = "navigation" id = "top" >
< div class = "tabs" >
2010-11-22 05:53:37 +00:00
< ul class = "tablist" >
2010-08-10 03:11:02 +00:00
< li > < a href = "main.html" > < span > Main Page< / span > < / a > < / li >
< li > < a href = "modules.html" > < span > Modules< / span > < / a > < / li >
< li > < a href = "annotated.html" > < span > Data Structures< / span > < / a > < / li >
< li class = "current" > < a href = "files.html" > < span > Files< / span > < / a > < / li >
< / ul >
< / div >
2010-11-22 05:53:37 +00:00
< div class = "tabs2" >
< ul class = "tablist" >
2010-08-10 03:11:02 +00:00
< li > < a href = "files.html" > < span > File List< / span > < / a > < / li >
< li > < a href = "globals.html" > < span > Globals< / span > < / a > < / li >
< / ul >
< / div >
2010-11-22 05:53:37 +00:00
< div class = "header" >
< div class = "headertitle" >
< h1 > mmc_spi.h< / h1 > < / div >
< / div >
< div class = "contents" >
< a href = "mmc__spi_8h.html" > Go to the documentation of this file.< / a > < div class = "fragment" > < pre class = "fragment" > < a name = "l00001" > < / a > 00001 < span class = "comment" > /*< / span >
2010-08-10 03:11:02 +00:00
< a name = "l00002" > < / a > 00002 < span class = "comment" > ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.< / span >
< a name = "l00003" > < / a > 00003 < span class = "comment" > < / span >
< a name = "l00004" > < / a > 00004 < span class = "comment" > This file is part of ChibiOS/RT.< / span >
< a name = "l00005" > < / a > 00005 < span class = "comment" > < / span >
< a name = "l00006" > < / a > 00006 < span class = "comment" > ChibiOS/RT is free software; you can redistribute it and/or modify< / span >
< a name = "l00007" > < / a > 00007 < span class = "comment" > it under the terms of the GNU General Public License as published by< / span >
< a name = "l00008" > < / a > 00008 < span class = "comment" > the Free Software Foundation; either version 3 of the License, or< / span >
< a name = "l00009" > < / a > 00009 < span class = "comment" > (at your option) any later version.< / span >
< a name = "l00010" > < / a > 00010 < span class = "comment" > < / span >
< a name = "l00011" > < / a > 00011 < span class = "comment" > ChibiOS/RT is distributed in the hope that it will be useful,< / span >
< a name = "l00012" > < / a > 00012 < span class = "comment" > but WITHOUT ANY WARRANTY; without even the implied warranty of< / span >
< a name = "l00013" > < / a > 00013 < span class = "comment" > MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the< / span >
< a name = "l00014" > < / a > 00014 < span class = "comment" > GNU General Public License for more details.< / span >
< a name = "l00015" > < / a > 00015 < span class = "comment" > < / span >
< a name = "l00016" > < / a > 00016 < span class = "comment" > You should have received a copy of the GNU General Public License< / span >
< a name = "l00017" > < / a > 00017 < span class = "comment" > along with this program. If not, see < http://www.gnu.org/licenses/> .< / span >
< a name = "l00018" > < / a > 00018 < span class = "comment" > < / span >
< a name = "l00019" > < / a > 00019 < span class = "comment" > ---< / span >
< a name = "l00020" > < / a > 00020 < span class = "comment" > < / span >
< a name = "l00021" > < / a > 00021 < span class = "comment" > A special exception to the GPL can be applied should you wish to distribute< / span >
< a name = "l00022" > < / a > 00022 < span class = "comment" > a combined work that includes ChibiOS/RT, without being obliged to provide< / span >
< a name = "l00023" > < / a > 00023 < span class = "comment" > the source code for any proprietary components. See the file exception.txt< / span >
< a name = "l00024" > < / a > 00024 < span class = "comment" > for full details of how and when the exception can be applied.< / span >
< a name = "l00025" > < / a > 00025 < span class = "comment" > */< / span >
< a name = "l00026" > < / a > 00026 < span class = "comment" > < / span >
< a name = "l00027" > < / a > 00027 < span class = "comment" > /**< / span >
< a name = "l00028" > < / a > 00028 < span class = "comment" > * @file mmc_spi.h< / span >
< a name = "l00029" > < / a > 00029 < span class = "comment" > * @brief MMC over SPI driver header.< / span >
< a name = "l00030" > < / a > 00030 < span class = "comment" > *< / span >
< a name = "l00031" > < / a > 00031 < span class = "comment" > * @addtogroup MMC_SPI< / span >
< a name = "l00032" > < / a > 00032 < span class = "comment" > * @{< / span >
< a name = "l00033" > < / a > 00033 < span class = "comment" > */< / span >
< a name = "l00034" > < / a > 00034
< a name = "l00035" > < / a > 00035 < span class = "preprocessor" > #ifndef _MMC_SPI_H_< / span >
< a name = "l00036" > < / a > 00036 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define _MMC_SPI_H_< / span >
< a name = "l00037" > < / a > 00037 < span class = "preprocessor" > < / span >
< a name = "l00038" > < / a > 00038 < span class = "preprocessor" > #if CH_HAL_USE_MMC_SPI || defined(__DOXYGEN__)< / span >
< a name = "l00039" > < / a > 00039 < span class = "preprocessor" > < / span >
< a name = "l00040" > < / a > 00040 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00041" > < / a > 00041 < span class = "comment" > /* Driver constants. */< / span >
< a name = "l00042" > < / a > 00042 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00043" > < / a > 00043
< a name = "l00044" > < / a > 00044 < span class = "preprocessor" > #define MMC_CMD0_RETRY 10< / span >
< a name = "l00045" > < / a > 00045 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define MMC_CMD1_RETRY 100< / span >
< a name = "l00046" > < / a > 00046 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define MMC_WAIT_DATA 10000< / span >
< a name = "l00047" > < / a > 00047 < span class = "preprocessor" > < / span >
< a name = "l00048" > < / a > 00048 < span class = "preprocessor" > #define MMC_CMDGOIDLE 0< / span >
< a name = "l00049" > < / a > 00049 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define MMC_CMDINIT 1< / span >
< a name = "l00050" > < / a > 00050 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define MMC_CMDREADCSD 9< / span >
< a name = "l00051" > < / a > 00051 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define MMC_CMDSTOP 12< / span >
< a name = "l00052" > < / a > 00052 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define MMC_CMDSETBLOCKLEN 16< / span >
< a name = "l00053" > < / a > 00053 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define MMC_CMDREAD 17< / span >
< a name = "l00054" > < / a > 00054 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define MMC_CMDREADMULTIPLE 18< / span >
< a name = "l00055" > < / a > 00055 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define MMC_CMDWRITE 24< / span >
< a name = "l00056" > < / a > 00056 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define MMC_CMDWRITEMULTIPLE 25< / span >
< a name = "l00057" > < / a > 00057 < span class = "preprocessor" > < / span >
< a name = "l00058" > < / a > 00058 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00059" > < / a > 00059 < span class = "comment" > /* Driver pre-compile time settings. */< / span >
< a name = "l00060" > < / a > 00060 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00061" > < / a > 00061 < span class = "comment" > < / span >
< a name = "l00062" > < / a > 00062 < span class = "comment" > /**< / span >
< a name = "l00063" > < / a > 00063 < span class = "comment" > * @brief Block size for MMC transfers.< / span >
< a name = "l00064" > < / a > 00064 < span class = "comment" > */< / span >
< a name = "l00065" > < / a > 00065 < span class = "preprocessor" > #if !defined(MMC_SECTOR_SIZE) || defined(__DOXYGEN__)< / span >
< a name = "l00066" > < / a > < a class = "code" href = "group___m_m_c___s_p_i.html#ga502a0143be4c303f3006c0888e1cec82" > 00066< / a > < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define MMC_SECTOR_SIZE 512< / span >
< a name = "l00067" > < / a > 00067 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #endif< / span >
< a name = "l00068" > < / a > 00068 < span class = "preprocessor" > < / span > < span class = "comment" > < / span >
< a name = "l00069" > < / a > 00069 < span class = "comment" > /**< / span >
< a name = "l00070" > < / a > 00070 < span class = "comment" > * @brief Delays insertions.< / span >
< a name = "l00071" > < / a > 00071 < span class = "comment" > * @details If enabled this options inserts delays into the MMC waiting< / span >
< a name = "l00072" > < / a > 00072 < span class = "comment" > * routines releasing some extra CPU time for the threads with< / span >
< a name = "l00073" > < / a > 00073 < span class = "comment" > * lower priority, this may slow down the driver a bit however.< / span >
< a name = "l00074" > < / a > 00074 < span class = "comment" > * This option is recommended also if the SPI driver does not< / span >
< a name = "l00075" > < / a > 00075 < span class = "comment" > * use a DMA channel and heavily loads the CPU.< / span >
< a name = "l00076" > < / a > 00076 < span class = "comment" > */< / span >
< a name = "l00077" > < / a > 00077 < span class = "preprocessor" > #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)< / span >
< a name = "l00078" > < / a > < a class = "code" href = "group___m_m_c___s_p_i.html#ga3087dfffa81dd8a0a80ee92746e65fe2" > 00078< / a > < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define MMC_NICE_WAITING TRUE< / span >
< a name = "l00079" > < / a > 00079 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #endif< / span >
< a name = "l00080" > < / a > 00080 < span class = "preprocessor" > < / span > < span class = "comment" > < / span >
< a name = "l00081" > < / a > 00081 < span class = "comment" > /**< / span >
< a name = "l00082" > < / a > 00082 < span class = "comment" > * @brief Number of positive insertion queries before generating the< / span >
< a name = "l00083" > < / a > 00083 < span class = "comment" > * insertion event.< / span >
< a name = "l00084" > < / a > 00084 < span class = "comment" > */< / span >
< a name = "l00085" > < / a > 00085 < span class = "preprocessor" > #if !defined(MMC_POLLING_INTERVAL) || defined(__DOXYGEN__)< / span >
< a name = "l00086" > < / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gac57e95210b57d6699c23bfb648e0904d" > 00086< / a > < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define MMC_POLLING_INTERVAL 10< / span >
< a name = "l00087" > < / a > 00087 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #endif< / span >
< a name = "l00088" > < / a > 00088 < span class = "preprocessor" > < / span > < span class = "comment" > < / span >
< a name = "l00089" > < / a > 00089 < span class = "comment" > /**< / span >
< a name = "l00090" > < / a > 00090 < span class = "comment" > * @brief Interval, in milliseconds, between insertion queries.< / span >
< a name = "l00091" > < / a > 00091 < span class = "comment" > */< / span >
< a name = "l00092" > < / a > 00092 < span class = "preprocessor" > #if !defined(MMC_POLLING_DELAY) || defined(__DOXYGEN__)< / span >
< a name = "l00093" > < / a > < a class = "code" href = "group___m_m_c___s_p_i.html#ga6d164ed93ae233b2dc0c35bd19f75224" > 00093< / a > < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define MMC_POLLING_DELAY 10< / span >
< a name = "l00094" > < / a > 00094 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #endif< / span >
< a name = "l00095" > < / a > 00095 < span class = "preprocessor" > < / span >
< a name = "l00096" > < / a > 00096 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00097" > < / a > 00097 < span class = "comment" > /* Derived constants and error checks. */< / span >
< a name = "l00098" > < / a > 00098 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00099" > < / a > 00099
< a name = "l00100" > < / a > 00100 < span class = "preprocessor" > #if !CH_HAL_USE_SPI || !CH_USE_EVENTS< / span >
< a name = "l00101" > < / a > 00101 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #error " MMC_SPI driver requires CH_HAL_USE_SPI and CH_USE_EVENTS" < / span >
< a name = "l00102" > < / a > 00102 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #endif< / span >
< a name = "l00103" > < / a > 00103 < span class = "preprocessor" > < / span >
< a name = "l00104" > < / a > 00104 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00105" > < / a > 00105 < span class = "comment" > /* Driver data structures and types. */< / span >
< a name = "l00106" > < / a > 00106 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00107" > < / a > 00107 < span class = "comment" > < / span >
< a name = "l00108" > < / a > 00108 < span class = "comment" > /**< / span >
< a name = "l00109" > < / a > 00109 < span class = "comment" > * @brief Driver state machine possible states.< / span >
< a name = "l00110" > < / a > 00110 < span class = "comment" > */< / span >
< a name = "l00111" > < / a > < a class = "code" href = "group___m_m_c___s_p_i.html#ga1e31b816b56d556a1ec664e8edf337e2" > 00111< / a > < span class = "keyword" > typedef< / span > < span class = "keyword" > enum< / span > {
< a name = "l00112" > < / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gga1e31b816b56d556a1ec664e8edf337e2a821452d1fa810c7e04db973f4b84b19e" > 00112< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gga1e31b816b56d556a1ec664e8edf337e2a821452d1fa810c7e04db973f4b84b19e" title = "Not initialized." > MMC_UNINIT< / a > = 0, < span class = "comment" > /**< @brief Not initialized. */< / span >
< a name = "l00113" > < / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gga1e31b816b56d556a1ec664e8edf337e2a529707805e8f215249b55f9ed7178adb" > 00113< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gga1e31b816b56d556a1ec664e8edf337e2a529707805e8f215249b55f9ed7178adb" title = "Stopped." > MMC_STOP< / a > = 1, < span class = "comment" > /**< @brief Stopped. */< / span >
< a name = "l00114" > < / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gga1e31b816b56d556a1ec664e8edf337e2a2b8fbb3f5c6f86872e6dc988ceb972f1" > 00114< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gga1e31b816b56d556a1ec664e8edf337e2a2b8fbb3f5c6f86872e6dc988ceb972f1" title = "Waiting card." > MMC_WAIT< / a > = 2, < span class = "comment" > /**< @brief Waiting card. */< / span >
< a name = "l00115" > < / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gga1e31b816b56d556a1ec664e8edf337e2a9d9f024996941451f3b45bf667620630" > 00115< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gga1e31b816b56d556a1ec664e8edf337e2a9d9f024996941451f3b45bf667620630" title = "Card inserted." > MMC_INSERTED< / a > = 3, < span class = "comment" > /**< @brief Card inserted. */< / span >
< a name = "l00116" > < / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gga1e31b816b56d556a1ec664e8edf337e2a47f89e40b37a17a6fa062b7c2349f5ca" > 00116< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gga1e31b816b56d556a1ec664e8edf337e2a47f89e40b37a17a6fa062b7c2349f5ca" title = "Card ready." > MMC_READY< / a > = 4, < span class = "comment" > /**< @brief Card ready. */< / span >
< a name = "l00117" > < / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gga1e31b816b56d556a1ec664e8edf337e2a6f5a49bec04454f10207a1cf654bdb86" > 00117< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gga1e31b816b56d556a1ec664e8edf337e2a6f5a49bec04454f10207a1cf654bdb86" title = "Reading." > MMC_READING< / a > = 5, < span class = "comment" > /**< @brief Reading. */< / span >
< a name = "l00118" > < / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gga1e31b816b56d556a1ec664e8edf337e2a06ee52028fd244138137e731f9d1c1d6" > 00118< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gga1e31b816b56d556a1ec664e8edf337e2a06ee52028fd244138137e731f9d1c1d6" title = "Writing." > MMC_WRITING< / a > = 6 < span class = "comment" > /**< @brief Writing. */< / span >
2010-11-22 05:53:37 +00:00
< a name = "l00119" > < / a > 00119 } mmcstate_t;
2010-08-10 03:11:02 +00:00
< a name = "l00120" > < / a > 00120 < span class = "comment" > < / span >
< a name = "l00121" > < / a > 00121 < span class = "comment" > /**< / span >
< a name = "l00122" > < / a > 00122 < span class = "comment" > * @brief Function used to query some hardware status bits.< / span >
< a name = "l00123" > < / a > 00123 < span class = "comment" > *< / span >
< a name = "l00124" > < / a > 00124 < span class = "comment" > * @return The status.< / span >
< a name = "l00125" > < / a > 00125 < span class = "comment" > */< / span >
< a name = "l00126" > < / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gaa7dbe27afa62f18e545ddea6a20bfa51" > 00126< / a > < span class = "keyword" > typedef< / span > < a class = "code" href = "group__types.html#ga7556af1cb61728b53228fa3af1c851de" title = "Boolean, recommended the fastest signed." > bool_t< / a > (*< a class = "code" href = "group___m_m_c___s_p_i.html#gaa7dbe27afa62f18e545ddea6a20bfa51" title = "Function used to query some hardware status bits." > mmcquery_t< / a > )(void);
< a name = "l00127" > < / a > 00127 < span class = "comment" > < / span >
< a name = "l00128" > < / a > 00128 < span class = "comment" > /**< / span >
< a name = "l00129" > < / a > 00129 < span class = "comment" > * @brief Driver configuration structure.< / span >
< a name = "l00130" > < / a > 00130 < span class = "comment" > */< / span >
< a name = "l00131" > < / a > < a class = "code" href = "struct_m_m_c_config.html" > 00131< / a > < span class = "keyword" > typedef< / span > < span class = "keyword" > struct < / span > {
< a name = "l00132" > < / a > 00132
< a name = "l00133" > < / a > 00133 } < a class = "code" href = "struct_m_m_c_config.html" title = "Driver configuration structure." > MMCConfig< / a > ;
< a name = "l00134" > < / a > 00134 < span class = "comment" > < / span >
< a name = "l00135" > < / a > 00135 < span class = "comment" > /**< / span >
< a name = "l00136" > < / a > 00136 < span class = "comment" > * @brief Structure representing a MMC driver.< / span >
< a name = "l00137" > < / a > 00137 < span class = "comment" > */< / span >
< a name = "l00138" > < / a > < a class = "code" href = "struct_m_m_c_driver.html" > 00138< / a > < span class = "keyword" > typedef< / span > < span class = "keyword" > struct < / span > {< span class = "comment" > < / span >
< a name = "l00139" > < / a > 00139 < span class = "comment" > /**< / span >
< a name = "l00140" > < / a > 00140 < span class = "comment" > * @brief Driver state.< / span >
< a name = "l00141" > < / a > 00141 < span class = "comment" > */< / span >
< a name = "l00142" > < / a > < a class = "code" href = "struct_m_m_c_driver.html#a98d97b335480672c1e12c71cb9e5223f" > 00142< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#ga1e31b816b56d556a1ec664e8edf337e2" title = "Driver state machine possible states." > mmcstate_t< / a > mmc_state;< span class = "comment" > < / span >
< a name = "l00143" > < / a > 00143 < span class = "comment" > /**< / span >
< a name = "l00144" > < / a > 00144 < span class = "comment" > * @brief Current configuration data.< / span >
< a name = "l00145" > < / a > 00145 < span class = "comment" > */< / span >
< a name = "l00146" > < / a > < a class = "code" href = "struct_m_m_c_driver.html#a8cfcb5d549a2f15075ac71ca00aac350" > 00146< / a > < span class = "keyword" > const< / span > < a class = "code" href = "struct_m_m_c_config.html" title = "Driver configuration structure." > MMCConfig< / a > *mmc_config;< span class = "comment" > < / span >
< a name = "l00147" > < / a > 00147 < span class = "comment" > /**< / span >
< a name = "l00148" > < / a > 00148 < span class = "comment" > * @brief SPI driver associated to this MMC driver.< / span >
< a name = "l00149" > < / a > 00149 < span class = "comment" > */< / span >
< a name = "l00150" > < / a > < a class = "code" href = "struct_m_m_c_driver.html#ac8850a0d2a6aaba7db684da46f67b666" > 00150< / a > < a class = "code" href = "struct_s_p_i_driver.html" title = "Structure representing a SPI driver." > SPIDriver< / a > *mmc_spip;< span class = "comment" > < / span >
< a name = "l00151" > < / a > 00151 < span class = "comment" > /**< / span >
< a name = "l00152" > < / a > 00152 < span class = "comment" > * @brief SPI low speed configuration used during initialization.< / span >
< a name = "l00153" > < / a > 00153 < span class = "comment" > */< / span >
< a name = "l00154" > < / a > < a class = "code" href = "struct_m_m_c_driver.html#aa0f4cfe46b06dbf1213c822b0ddeda98" > 00154< / a > < span class = "keyword" > const< / span > < a class = "code" href = "struct_s_p_i_config.html" title = "Driver configuration structure." > SPIConfig< / a > *mmc_lscfg;< span class = "comment" > < / span >
< a name = "l00155" > < / a > 00155 < span class = "comment" > /**< / span >
< a name = "l00156" > < / a > 00156 < span class = "comment" > * @brief SPI high speed configuration used during transfers.< / span >
< a name = "l00157" > < / a > 00157 < span class = "comment" > */< / span >
< a name = "l00158" > < / a > < a class = "code" href = "struct_m_m_c_driver.html#a417202c1ff282a504ecd07831381bf85" > 00158< / a > < span class = "keyword" > const< / span > < a class = "code" href = "struct_s_p_i_config.html" title = "Driver configuration structure." > SPIConfig< / a > *mmc_hscfg;< span class = "comment" > < / span >
< a name = "l00159" > < / a > 00159 < span class = "comment" > /**< / span >
< a name = "l00160" > < / a > 00160 < span class = "comment" > * @brief Write protect status query function.< / span >
< a name = "l00161" > < / a > 00161 < span class = "comment" > */< / span >
< a name = "l00162" > < / a > < a class = "code" href = "struct_m_m_c_driver.html#a255a9e9a7a46e261f0e8fcbd16233244" > 00162< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gaa7dbe27afa62f18e545ddea6a20bfa51" title = "Function used to query some hardware status bits." > mmcquery_t< / a > mmc_is_protected;< span class = "comment" > < / span >
< a name = "l00163" > < / a > 00163 < span class = "comment" > /**< / span >
< a name = "l00164" > < / a > 00164 < span class = "comment" > * @brief Insertion status query function.< / span >
< a name = "l00165" > < / a > 00165 < span class = "comment" > */< / span >
< a name = "l00166" > < / a > < a class = "code" href = "struct_m_m_c_driver.html#a64161fdd86af655c85885ba47e69fbc6" > 00166< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gaa7dbe27afa62f18e545ddea6a20bfa51" title = "Function used to query some hardware status bits." > mmcquery_t< / a > mmc_is_inserted;< span class = "comment" > < / span >
< a name = "l00167" > < / a > 00167 < span class = "comment" > /**< / span >
< a name = "l00168" > < / a > 00168 < span class = "comment" > * @brief Card insertion event source.< / span >
< a name = "l00169" > < / a > 00169 < span class = "comment" > */< / span >
< a name = "l00170" > < / a > < a class = "code" href = "struct_m_m_c_driver.html#a9bd7357704a5a8acce11338824d45a6a" > 00170< / a > < a class = "code" href = "struct_event_source.html" title = "Event Source structure." > EventSource< / a > mmc_inserted_event;< span class = "comment" > < / span >
< a name = "l00171" > < / a > 00171 < span class = "comment" > /**< / span >
< a name = "l00172" > < / a > 00172 < span class = "comment" > * @brief Card removal event source.< / span >
< a name = "l00173" > < / a > 00173 < span class = "comment" > */< / span >
< a name = "l00174" > < / a > < a class = "code" href = "struct_m_m_c_driver.html#a72e7032b9d94146980bbfcb5ec7b138c" > 00174< / a > < a class = "code" href = "struct_event_source.html" title = "Event Source structure." > EventSource< / a > mmc_removed_event;< span class = "comment" > < / span >
< a name = "l00175" > < / a > 00175 < span class = "comment" > /**< / span >
< a name = "l00176" > < / a > 00176 < span class = "comment" > * @brief MMC insertion polling timer.< / span >
< a name = "l00177" > < / a > 00177 < span class = "comment" > */< / span >
< a name = "l00178" > < / a > < a class = "code" href = "struct_m_m_c_driver.html#a715195b2cda407a47f2208f1fb701421" > 00178< / a > < a class = "code" href = "struct_virtual_timer.html" title = "Virtual Timer descriptor structure." > VirtualTimer< / a > mmc_vt;< span class = "comment" > < / span >
< a name = "l00179" > < / a > 00179 < span class = "comment" > /**< / span >
< a name = "l00180" > < / a > 00180 < span class = "comment" > * @brief Insertion counter.< / span >
< a name = "l00181" > < / a > 00181 < span class = "comment" > */< / span >
< a name = "l00182" > < / a > < a class = "code" href = "struct_m_m_c_driver.html#adb64bc1ed4ecc1f5a9602d4498e59b0d" > 00182< / a > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#gad0fca8b15c218d2c687f8c373a71d228" > uint_fast8_t< / a > mmc_cnt;
< a name = "l00183" > < / a > 00183 } < a class = "code" href = "struct_m_m_c_driver.html" title = "Structure representing a MMC driver." > MMCDriver< / a > ;
< a name = "l00184" > < / a > 00184
< a name = "l00185" > < / a > 00185 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00186" > < / a > 00186 < span class = "comment" > /* Driver macros. */< / span >
< a name = "l00187" > < / a > 00187 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00188" > < / a > 00188 < span class = "comment" > < / span >
< a name = "l00189" > < / a > 00189 < span class = "comment" > /**< / span >
< a name = "l00190" > < / a > 00190 < span class = "comment" > * @brief Returns the driver state.< / span >
< a name = "l00191" > < / a > 00191 < span class = "comment" > */< / span >
< a name = "l00192" > < / a > < a class = "code" href = "group___m_m_c___s_p_i.html#ga08e8051df6339895618dbbfada225952" > 00192< / a > < span class = "preprocessor" > #define mmcGetDriverState(mmcp) ((mmcp)-> mmc_state)< / span >
< a name = "l00193" > < / a > 00193 < span class = "preprocessor" > < / span > < span class = "comment" > < / span >
< a name = "l00194" > < / a > 00194 < span class = "comment" > /**< / span >
< a name = "l00195" > < / a > 00195 < span class = "comment" > * @brief Returns the write protect status.< / span >
< a name = "l00196" > < / a > 00196 < span class = "comment" > */< / span >
< a name = "l00197" > < / a > < a class = "code" href = "group___m_m_c___s_p_i.html#ga2f69ba255b397f2d5f09cf1fe26a953f" > 00197< / a > < span class = "preprocessor" > #define mmcIsWriteProtected(mmcp) ((mmcp)-> mmc_is_protected())< / span >
< a name = "l00198" > < / a > 00198 < span class = "preprocessor" > < / span >
< a name = "l00199" > < / a > 00199 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00200" > < / a > 00200 < span class = "comment" > /* External declarations. */< / span >
< a name = "l00201" > < / a > 00201 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00202" > < / a > 00202
< a name = "l00203" > < / a > 00203 < span class = "preprocessor" > #ifdef __cplusplus< / span >
< a name = "l00204" > < / a > 00204 < span class = "preprocessor" > < / span > < span class = "keyword" > extern< / span > < span class = "stringliteral" > " C" < / span > {
< a name = "l00205" > < / a > 00205 < span class = "preprocessor" > #endif< / span >
< a name = "l00206" > < / a > 00206 < span class = "preprocessor" > < / span > < span class = "keywordtype" > void< / span > < a class = "code" href = "group___m_m_c___s_p_i.html#ga351951c841ece80fc692195ab37b2f06" title = "MMC over SPI driver initialization." > mmcInit< / a > (< span class = "keywordtype" > void< / span > );
< a name = "l00207" > < / a > 00207 < span class = "keywordtype" > void< / span > < a class = "code" href = "group___m_m_c___s_p_i.html#ga44df4f9091614cab6de8d79c3c6b1a14" title = "Initializes an instance." > mmcObjectInit< / a > (< a class = "code" href = "struct_m_m_c_driver.html" title = "Structure representing a MMC driver." > MMCDriver< / a > *mmcp, < a class = "code" href = "struct_s_p_i_driver.html" title = "Structure representing a SPI driver." > SPIDriver< / a > *spip,
< a name = "l00208" > < / a > 00208 < span class = "keyword" > const< / span > < a class = "code" href = "struct_s_p_i_config.html" title = "Driver configuration structure." > SPIConfig< / a > *lscfg, < span class = "keyword" > const< / span > < a class = "code" href = "struct_s_p_i_config.html" title = "Driver configuration structure." > SPIConfig< / a > *hscfg,
< a name = "l00209" > < / a > 00209 < a class = "code" href = "group___m_m_c___s_p_i.html#gaa7dbe27afa62f18e545ddea6a20bfa51" title = "Function used to query some hardware status bits." > mmcquery_t< / a > is_protected, < a class = "code" href = "group___m_m_c___s_p_i.html#gaa7dbe27afa62f18e545ddea6a20bfa51" title = "Function used to query some hardware status bits." > mmcquery_t< / a > is_inserted);
< a name = "l00210" > < / a > 00210 < span class = "keywordtype" > void< / span > < a class = "code" href = "group___m_m_c___s_p_i.html#ga076506461b42641a9fe632cc3e72dab5" title = "Configures and activates the MMC peripheral." > mmcStart< / a > (< a class = "code" href = "struct_m_m_c_driver.html" title = "Structure representing a MMC driver." > MMCDriver< / a > *mmcp, < span class = "keyword" > const< / span > < a class = "code" href = "struct_m_m_c_config.html" title = "Driver configuration structure." > MMCConfig< / a > *config);
< a name = "l00211" > < / a > 00211 < span class = "keywordtype" > void< / span > < a class = "code" href = "group___m_m_c___s_p_i.html#ga27833cde77794f914e4802c7e65281a5" title = "Disables the MMC peripheral." > mmcStop< / a > (< a class = "code" href = "struct_m_m_c_driver.html" title = "Structure representing a MMC driver." > MMCDriver< / a > *mmcp);
< a name = "l00212" > < / a > 00212 < a class = "code" href = "group__types.html#ga7556af1cb61728b53228fa3af1c851de" title = "Boolean, recommended the fastest signed." > bool_t< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#ga9ff4f12fa759c3cb4aca2b64b11f1d22" title = "Performs the initialization procedure on the inserted card." > mmcConnect< / a > (< a class = "code" href = "struct_m_m_c_driver.html" title = "Structure representing a MMC driver." > MMCDriver< / a > *mmcp);
< a name = "l00213" > < / a > 00213 < a class = "code" href = "group__types.html#ga7556af1cb61728b53228fa3af1c851de" title = "Boolean, recommended the fastest signed." > bool_t< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gab90f252316351a93ec38b11f7eaf1f16" title = "Brings the driver in a state safe for card removal." > mmcDisconnect< / a > (< a class = "code" href = "struct_m_m_c_driver.html" title = "Structure representing a MMC driver." > MMCDriver< / a > *mmcp);
< a name = "l00214" > < / a > 00214 < a class = "code" href = "group__types.html#ga7556af1cb61728b53228fa3af1c851de" title = "Boolean, recommended the fastest signed." > bool_t< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#ga6c62caa5d008460e7319fb2c36518ddc" title = "Starts a sequential read." > mmcStartSequentialRead< / a > (< a class = "code" href = "struct_m_m_c_driver.html" title = "Structure representing a MMC driver." > MMCDriver< / a > *mmcp, < a class = "code" href = "group___s_t_m8___c_o_r_e.html#ga06896e8c53f721507066c079052171f8" > uint32_t< / a > startblk);
< a name = "l00215" > < / a > 00215 < a class = "code" href = "group__types.html#ga7556af1cb61728b53228fa3af1c851de" title = "Boolean, recommended the fastest signed." > bool_t< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#ga7e02b9210a8d3d9f8465b8000983dadf" title = "Reads a block within a sequential read operation." > mmcSequentialRead< / a > (< a class = "code" href = "struct_m_m_c_driver.html" title = "Structure representing a MMC driver." > MMCDriver< / a > *mmcp, < a class = "code" href = "group___s_t_m8___c_o_r_e.html#gaba7bc1797add20fe3efdf37ced1182c5" > uint8_t< / a > *buffer);
< a name = "l00216" > < / a > 00216 < a class = "code" href = "group__types.html#ga7556af1cb61728b53228fa3af1c851de" title = "Boolean, recommended the fastest signed." > bool_t< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gaf55b97f76be81f4ce5cde415f3131400" title = "Stops a sequential read gracefully." > mmcStopSequentialRead< / a > (< a class = "code" href = "struct_m_m_c_driver.html" title = "Structure representing a MMC driver." > MMCDriver< / a > *mmcp);
< a name = "l00217" > < / a > 00217 < a class = "code" href = "group__types.html#ga7556af1cb61728b53228fa3af1c851de" title = "Boolean, recommended the fastest signed." > bool_t< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#ga8031c8222f92a0c6632b36ff943fe825" title = "Starts a sequential write." > mmcStartSequentialWrite< / a > (< a class = "code" href = "struct_m_m_c_driver.html" title = "Structure representing a MMC driver." > MMCDriver< / a > *mmcp, < a class = "code" href = "group___s_t_m8___c_o_r_e.html#ga06896e8c53f721507066c079052171f8" > uint32_t< / a > startblk);
< a name = "l00218" > < / a > 00218 < a class = "code" href = "group__types.html#ga7556af1cb61728b53228fa3af1c851de" title = "Boolean, recommended the fastest signed." > bool_t< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#ga9ce0adb181138efc1f835aff6d8eb203" title = "Writes a block within a sequential write operation." > mmcSequentialWrite< / a > (< a class = "code" href = "struct_m_m_c_driver.html" title = "Structure representing a MMC driver." > MMCDriver< / a > *mmcp, < span class = "keyword" > const< / span > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#gaba7bc1797add20fe3efdf37ced1182c5" > uint8_t< / a > *buffer);
< a name = "l00219" > < / a > 00219 < a class = "code" href = "group__types.html#ga7556af1cb61728b53228fa3af1c851de" title = "Boolean, recommended the fastest signed." > bool_t< / a > < a class = "code" href = "group___m_m_c___s_p_i.html#gae84abdd53540f03262822aa1f9a213b5" title = "Stops a sequential write gracefully." > mmcStopSequentialWrite< / a > (< a class = "code" href = "struct_m_m_c_driver.html" title = "Structure representing a MMC driver." > MMCDriver< / a > *mmcp);
< a name = "l00220" > < / a > 00220 < span class = "preprocessor" > #ifdef __cplusplus< / span >
< a name = "l00221" > < / a > 00221 < span class = "preprocessor" > < / span > }
< a name = "l00222" > < / a > 00222 < span class = "preprocessor" > #endif< / span >
< a name = "l00223" > < / a > 00223 < span class = "preprocessor" > < / span >
< a name = "l00224" > < / a > 00224 < span class = "preprocessor" > #endif < / span > < span class = "comment" > /* CH_HAL_USE_MMC_SPI */< / span >
< a name = "l00225" > < / a > 00225
< a name = "l00226" > < / a > 00226 < span class = "preprocessor" > #endif < / span > < span class = "comment" > /* _MMC_SPI_H_ */< / span >
< a name = "l00227" > < / a > 00227 < span class = "comment" > < / span >
< a name = "l00228" > < / a > 00228 < span class = "comment" > /** @} */< / span >
< / pre > < / div > < / div >
2010-11-22 05:53:37 +00:00
< / div >
2010-08-10 03:11:02 +00:00
< hr size = "1" > < address style = "text-align: right;" > < small >
2010-11-22 05:53:37 +00:00
Generated on Sun Oct 24 2010 09:40:37 for ChibiOS/RT by < a href = "http://www.doxygen.org/index.html" > < img src = "doxygen.png" alt = "doxygen" align = "middle" border = "0" > < / a > 1.7.1< / small > < / address >
2010-08-10 03:11:02 +00:00
< / body >
< / html >