Implementation of SDMMC SW 1Bit Mode

Issue #194 new
Patryk Kubiak created an issue

General Description

The goal of the task is to implement part of SDMMC driver - SW 1Bit Mode. The mode has to allow for using SD card in 1Bit mode without LLD by using only GPIO driver. The interface has to be compatible with oC_SDMMC_Mode_Interface_t structure.

Trello link: https://trello.com/c/RL0fiyXk

Mode information

  • Mode - oC_SDMMC_Mode_SW_1Bit
  • ModeName - "sw-1bit"

Related tasks

  • [ #191 ] - Implementation of SDMMC driver - General SDMMC architecture

Mode context structure

struct ModeContext_t
{
    /** @brief Field for object content verification (calculated by function #oC_CountObjectControl ) */
    oC_ObjectControl_t                  ObjectControl;
};

Required Interface

// Turns on the mode
oC_ErrorCode_t oC_SDMMC_Mode_SW1Bit_TurnOn( void );
// Turns off the mode
oC_ErrorCode_t oC_SDMMC_Mode_SW1Bit_TurnOff( void );
// Checks if the given configuration is possible to set by using the mode
bool oC_SDMMC_Mode_SW1Bit_IsSupported( const oC_SDMMC_Config_t * Config , oC_SDMMC_Context_t Context );
// Prepares the mode to work with the given configuration
oC_ErrorCode_t oC_SDMMC_Mode_SW1Bit_Configure( const oC_SDMMC_Config_t * Config , oC_SDMMC_Context_t Context );
// Unconfigures the mode
oC_ErrorCode_t oC_SDMMC_Mode_SW1Bit_Unconfigure( oC_SDMMC_Context_t Context );
// Sends SD/MMC command to card
oC_ErrorCode_t oC_SDMMC_Mode_SW1Bit_SendCommand( oC_SDMMC_Context_t Context , oC_SDMMC_Command_t * Command , oC_Time_t Timeout );
// Reads data by using the mode
oC_ErrorCode_t oC_SDMMC_Mode_SW1Bit_ReadData( oC_SDMMC_Context_t Context , char * outBuffer, oC_MemorySize_t * Size , oC_Time_t Timeout );
// Writes data by using the mode
oC_ErrorCode_t oC_SDMMC_Mode_SW1Bit_WriteData( oC_SDMMC_Context_t Context ,  const char * Buffer, oC_MemorySize_t * Size , oC_Time_t Timeout );
// Initializes card after detection
oC_ErrorCode_t oC_SDMMC_Mode_SW1Bit_InitializeCard( oC_SDMMC_Context_t Context , oC_Time_t Timeout );

Comments (6)

  1. Log in to comment