📄 csl_mmcsd.h
字号:
set by the SET_BLOCK_LEN command </b> */
CSL_MMCSD_CMDTYP_MMC_GEN_WRITE_CMD =
CSL_FMKT (MMCSD_MMCCMD_DMATRIG, NO)
|CSL_FMKT (MMCSD_MMCCMD_DCLR, NO)
|CSL_FMKT (MMCSD_MMCCMD_STRMTP, BLOCK)
|CSL_FMKT (MMCSD_MMCCMD_WDATX, DATA)
|CSL_FMKT (MMCSD_MMCCMD_DTRW, WRITE)
|CSL_FMKT (MMCSD_MMCCMD_BSYEXP, BUSY)
|CSL_FMKT (MMCSD_MMCCMD_RSPFMT, R1)
|CSL_FMKT (MMCSD_MMCCMD_INITCK, NO)
|CSL_FMKT (MMCSD_MMCCMD_PPLEN, PP)
|CSL_FMK (MMCSD_MMCCMD_CMD, 56),
/**< <b>: Used to transfer a data block to the card for general
purpose / application specific commands. The size of the data block
shall be set by the SET_BLOCK_LEN command </b> */
CSL_MMCSD_CMDTYP_SD_GEN_WRITE_CMD =
CSL_FMKT (MMCSD_MMCCMD_DMATRIG, NO)
|CSL_FMKT (MMCSD_MMCCMD_DCLR, NO)
|CSL_FMKT (MMCSD_MMCCMD_STRMTP, BLOCK)
|CSL_FMKT (MMCSD_MMCCMD_WDATX, DATA)
|CSL_FMKT (MMCSD_MMCCMD_DTRW, WRITE)
|CSL_FMKT (MMCSD_MMCCMD_BSYEXP, NO)
|CSL_FMKT (MMCSD_MMCCMD_RSPFMT, R1)
|CSL_FMKT (MMCSD_MMCCMD_INITCK, NO)
|CSL_FMKT (MMCSD_MMCCMD_PPLEN, PP)
|CSL_FMK(MMCSD_MMCCMD_CMD, 56)
/**< <b>: Used to transfer a data block to the SD card for general
purpose / application specific commands. The size of the data block
shall be set by the SET_BLOCK_LEN command </b> */
} CSL_MmcsdCmdType;
/**
@} */
/**\defgroup CSL_MMCSD_CONTROLCMD_ENUM Control Commands
* \ingroup CSL_MMCSD_CONTROL_API
@{*/
/** \brief Enumeration for control commands passed to \a CSL_mmcsdHwControl()
*
* This is the set of commands that are passed to the \a CSL_mmcsdHwControl()
* with an optional argument type-casted to \a void* .
* The arguments to be passed with each enumeration (if any) are specified
* next to the enumeration
*/
typedef enum {
/**
* @brief Resets MMCSD controller specified by input bitmask
* @param (CSL_BitMask16*)
*/
CSL_MMCSD_CMD_RESET = 1,
/**
* @brief Re-enables MMCSD controller from RESET specified by the
* input bitmask
* @param (CSL_BitMask16*)
*/
CSL_MMCSD_CMD_ENABLE = 2,
/**
* @brief Send the initialization sequence necessary at the start
* @param NONE
*/
CSL_MMCSD_CMD_INITSEQ_SEND = 3,
/**
* @brief Read a word from FIFO Address of the word to read kept in arg
* typecasted to (Uint32*)
* @param NONE
*/
CSL_MMCSD_CMD_READ_WORD = 4,
/**
* @brief Write a word to FIFO
* @param (Uint32*)
*/
CSL_MMCSD_CMD_WRITE_WORD = 5,
/**
* @brief Read specified number of words from FIFO. The "transfernum"
* and error field acts as output parameters reporting the actual
* number of words read and error if any occured during read.
* @param (CSL_MmcsdBufferDescriptor*)
*/
CSL_MMCSD_CMD_READ = 6,
/**
* @brief Write specified number of words into FIFO. The "transfernum"
* and error field acts as output parameters reporting the actual
* number of words written and error if any occured during write.
* @param (CSL_MmcsdBufferDescriptor*)
*/
CSL_MMCSD_CMD_WRITE = 7,
/**
* @brief Send the specified command to MMC/SD controller
* @param (CSL_MmcsdCmd*)
*/
CSL_MMCSD_CMD_SEND_CMD = 8,
/**
* @brief Set the SD bus width
* @param (CSL_MmcsdBusWidth*)
*/
CSL_MMCSD_CMD_SET_SD_BUSWIDTH = 9,
/**
* @brief Set the size of blocks to transfer
* @param (Uint16*)
*/
CSL_MMCSD_CMD_SET_BLKSIZE = 10,
/**
* @brief Set the number of blocks to transfer
* @param (Uint16*)
*/
CSL_MMCSD_CMD_SET_NUMBLKS = 11,
/**
* @brief Clear the interrupt status
* @param NONE
*/
CSL_MMCSD_CMD_CLEAR_STATUS = 12,
/**
* @brief Clear the response
* @param NONE
*/
CSL_MMCSD_CMD_CLEAR_RESPONSE = 13,
/**
* @brief Enable the interrupts specified by mask
* @param (CSL_BitMask16*)
*/
CSL_MMCSD_CMD_INTR_ENABLE = 14,
/**
* @brief Disable the interrupts specified by mask
* @param (CSL_BitMask16*)
*/
CSL_MMCSD_CMD_INTR_DISABLE = 15,
/**
* @brief Set acces width, used by FIFO control to determine
* full/empty flag.
* @param (CSL_MmcsdFifoAccessWidth*)
*/
CSL_MMCSD_CMD_SET_ACCESS_WIDTH = 16,
/**
* @brief Set FIFO threshold level
* @param (CSL_MmcsdFifoThreshold*)
*/
CSL_MMCSD_CMD_SET_FIFO_THRESHOLD = 17,
/**
* @brief Set FIFO direction
* @param (CSL_MmcsdFifoDir*)
*/
CSL_MMCSD_CMD_SET_FIFO_DIR = 18,
/**
* @brief Reset FIFO
* @param NONE
*/
CSL_MMCSD_CMD_RESET_FIFO = 19,
/**
* @brief Enable automatic start of read wait on CRC error
* @param NONE
*/
CSL_MMCSD_CMD_SDIO_ENABLE_RDWT_CRC = 20,
/**
* @brief Starts the read wait operation 2 clocks after the end of
* read data block.
* @param NONE
*/
CSL_MMCSD_CMD_SDIO_START_RDWT = 21,
/**
* @brief End read wait operation and release DAT2
* @param NONE
*/
CSL_MMCSD_CMD_SDIO_END_RDWT = 22,
/**
* @brief Enable the SDIO interrupts specified by input bitmask
* @param (CSL_BitMask16*)
*/
CSL_MMCSD_CMD_SDIO_INTR_ENABLE = 23,
/**
* @brief Disable the SDIO interrupts specified by input bitmask
* @param (CSL_BitMask16*)
*/
CSL_MMCSD_CMD_SDIO_INTR_DISABLE = 24,
/**
* @brief Clear SDIO interrupts based on mask
* @param (CSL_BitMask16*)
*/
CSL_MMCSD_CMD_SDIO_CLEAR_STATUS = 25
} CSL_MmcsdHwControlCmd;
/**
@} */
/**\defgroup CSL_MMCSD_QUERYCMD_ENUM Query Commands
* \ingroup CSL_MMCSD_QUERY_API
* @{ */
/** \brief Enumeration for queries passed to \a CSL_mmcsdGetHwStatus()
*
* This is used to get the status of different operations.The arguments
* to be passed with each enumeration if any are specified next to
* the enumeration */
typedef enum {
/**
* @brief Queries command index register
* @param (Uint16*)
*/
CSL_MMCSD_QUERY_CMD_INDEX = 1,
/**
* @brief Get the response to the command last sent
* @param (CSL_MmcsdResponse*)
*/
CSL_MMCSD_QUERY_RESPONSE = 2,
/**
* @brief Get the bus width of the data bus
* @param (CSL_MmcsdBusWidth*)
*/
CSL_MMCSD_QUERY_SD_BUSWIDTH = 3,
/**
* @brief Get the number of blocks left to transmit
* @param (Uint16*)
*/
CSL_MMCSD_QUERY_NUMBLKS = 4,
/**
* @brief Queries status0 register
* @param (CSL_BitMask16*)
*/
CSL_MMCSD_QUERY_STATUS0 = 5,
/**
* @brief Queries status1 register
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -