SAMV71 Xplained Ultra Software Package 1.5

HSMCI Functions
[Working with HSMCI]

Collaboration diagram for HSMCI Functions:

Functions

void HSMCI_Enable (Hsmci *pRMci)
 Enable Multi-Media Interface.
void HSMCI_Disable (Hsmci *pRMci)
 Disable Multi-Media Interface.
void HSMCI_Reset (Hsmci *pRMci, uint8_t bBackup)
 Reset (& Disable) Multi-Media Interface.
void HSMCI_Select (Hsmci *pRMci, uint8_t bSlot, uint8_t bBusWidth)
 Select slot.
void HSMCI_SetSlot (Hsmci *pRMci, uint8_t bSlot)
 Set slot.
void HSMCI_SetBusWidth (Hsmci *pRMci, uint8_t bBusWidth)
 Set bus width of MCI.
uint8_t HSMCI_GetBusWidth (Hsmci *pRMci)
 Return bus width setting.
void HSMCI_ConfigureMode (Hsmci *pRMci, uint32_t dwMode)
 Configures a MCI peripheral as specified.
uint32_t HSMCI_GetMode (Hsmci *pRMci)
 Return mode register.
void HSMCI_ProofEnable (Hsmci *pRMci, uint8_t bRdProof, uint8_t bWrProof)
 Enable/Disable R/W proof.
void HSMCI_PadvCtl (Hsmci *pRMci, uint8_t bPadv)
 Padding value setting.
void HSMCI_FByteEnable (Hsmci *pRMci, uint8_t bFByteEn)
 Force byte transfer enable/disable.
uint8_t HSMCI_IsFByteEnabled (Hsmci *pRMci)
 Check if Force Byte mode enabled.
void HSMCI_DivCtrl (Hsmci *pRMci, uint32_t bClkDiv, uint8_t bPwsDiv)
 Set Clock Divider & Power save divider for MCI.
void HSMCI_EnableIt (Hsmci *pRMci, uint32_t dwSources)
 Enables one or more interrupt sources of MCI peripheral.
void HSMCI_DisableIt (Hsmci *pRMci, uint32_t dwSources)
 Disable one or more interrupt sources of MCI peripheral.
uint32_t HSMCI_GetItMask (Hsmci *pRMci)
 Return the interrupt mask register.
void HSMCI_ConfigureTransfer (Hsmci *pRMci, uint16_t wBlkLen, uint16_t wCnt)
 Set block len & count for transfer.
void HSMCI_SetBlockLen (Hsmci *pRMci, uint16_t wBlkSize)
 Set block length.
void HSMCI_SetBlockCount (Hsmci *pRMci, uint16_t wBlkCnt)
 Set block (byte) count.
void HSMCI_ConfigureCompletionTO (Hsmci *pRMci, uint32_t dwConfigure)
 Configure the Completion Signal Timeout.
void HSMCI_ConfigureDataTO (Hsmci *pRMci, uint32_t dwConfigure)
 Configure the Data Timeout.
void HSMCI_SendCmd (Hsmci *pRMci, uint32_t dwCmd, uint32_t dwArg)
 Send command.
uint32_t HSMCI_GetResponse (Hsmci *pRMci)
 Return the response register.
uint32_t HSMCI_Read (Hsmci *pRMci)
 Return the receive data register.
void HSMCI_ReadFifo (Hsmci *pRMci, uint8_t *pdwData, uint32_t dwSize)
 Read from FIFO.
void HSMCI_Write (Hsmci *pRMci, uint32_t dwData)
 Sends data through MCI peripheral.
void HSMCI_WriteFifo (Hsmci *pRMci, uint8_t *pdwData, uint32_t dwSize)
 Write to FIFO.
uint32_t HSMCI_GetStatus (Hsmci *pRMci)
 Return the status register.
void HSMCI_ConfigureDma (Hsmci *pRMci, uint32_t dwConfigure)
 Configure the HSMCI DMA.
void HSMCI_EnableDma (Hsmci *pRMci, uint8_t bEnable)
 Enable the HSMCI DMA.
void HSMCI_Configure (Hsmci *pRMci, uint32_t dwConfigure)
 Configure the HSMCI.
void HSMCI_HsEnable (Hsmci *pRMci, uint8_t bHsEnable)
 Enable/Disable High-Speed mode for MCI.
uint8_t HSMCI_IsHsEnabled (Hsmci *pRMci)
 Check if High-speed mode is enabled on MCI.
void HSMCI_BusWidthCtl (Hsmci *pRMci, uint8_t bBusWidth)
void HSMCI_SlotCtl (Hsmci *pRMci, uint8_t bSlot)
uint8_t HSMCI_GetSlot (Hsmci *pRMci)
void HSMCI_ConfigureWP (Hsmci *pRMci, uint32_t dwConfigure)
 Configure the Write Protection Mode.
uint32_t HSMCI_GetWPStatus (Hsmci *pRMci)
 Return the write protect status register.

Function Documentation

void HSMCI_Configure ( Hsmci pRMci,
uint32_t  dwConfigure 
)

Configure the HSMCI.

Parameters:
pRMci Pointer to an Hsmci instance.
dwConfigure Configure value.

Definition at line 517 of file hsmci.c.

void HSMCI_ConfigureCompletionTO ( Hsmci pRMci,
uint32_t  dwConfigure 
)

Configure the Completion Signal Timeout.

Parameters:
pRMci Pointer to an Hsmci instance.
dwConfigure Completion Signal Timeout configure.

Definition at line 354 of file hsmci.c.

void HSMCI_ConfigureDataTO ( Hsmci pRMci,
uint32_t  dwConfigure 
)

Configure the Data Timeout.

Parameters:
pRMci Pointer to an Hsmci instance.
dwConfigure Data Timeout configure.

Definition at line 365 of file hsmci.c.

void HSMCI_ConfigureDma ( Hsmci pRMci,
uint32_t  dwConfigure 
)

Configure the HSMCI DMA.

Parameters:
pRMci Pointer to an Hsmci instance.
dwConfigure Configure value.

Definition at line 492 of file hsmci.c.

void HSMCI_ConfigureMode ( Hsmci pRMci,
uint32_t  dwMode 
)

Configures a MCI peripheral as specified.

Parameters:
pRMci Pointer to an MCI instance.
dwMode Value of the MCI Mode register.

Definition at line 185 of file hsmci.c.

void HSMCI_ConfigureTransfer ( Hsmci pRMci,
uint16_t  wBlkLen,
uint16_t  wCnt 
)

Set block len & count for transfer.

Parameters:
pRMci Pointer to an Hsmci instance.
wBlkLen Block size.
wCnt Block(byte) count.

Definition at line 317 of file hsmci.c.

void HSMCI_ConfigureWP ( Hsmci pRMci,
uint32_t  dwConfigure 
)

Configure the Write Protection Mode.

Parameters:
pRMci Pointer to an Hsmci instance.
dwConfigure WP mode configure value.

Definition at line 552 of file hsmci.c.

void HSMCI_Disable ( Hsmci pRMci  ) 

Disable Multi-Media Interface.

Parameters:
pRMci Pointer to a Hsmci instance

Definition at line 65 of file hsmci.c.

void HSMCI_DisableIt ( Hsmci pRMci,
uint32_t  dwSources 
)

Disable one or more interrupt sources of MCI peripheral.

Parameters:
pRMci Pointer to an Hsmci instance.
sources Bitwise OR of selected interrupt sources.

Definition at line 294 of file hsmci.c.

void HSMCI_DivCtrl ( Hsmci pRMci,
uint32_t  bClkDiv,
uint8_t  bPwsDiv 
)

Set Clock Divider & Power save divider for MCI.

Parameters:
pRMci Pointer to an MCI instance.
bClkDiv Clock Divider value (0 ~ 255).
bPwsDiv Power Saving Divider (1 ~ 7).

Definition at line 262 of file hsmci.c.

void HSMCI_Enable ( Hsmci pRMci  ) 

Enable Multi-Media Interface.

Parameters:
pRMci Pointer to a Hsmci instance

Definition at line 55 of file hsmci.c.

void HSMCI_EnableDma ( Hsmci pRMci,
uint8_t  bEnable 
)

Enable the HSMCI DMA.

Parameters:
pRMci Pointer to an Hsmci instance.
bEnable 1 to enable, 0 to disable.

Definition at line 503 of file hsmci.c.

void HSMCI_EnableIt ( Hsmci pRMci,
uint32_t  dwSources 
)

Enables one or more interrupt sources of MCI peripheral.

Parameters:
pRMci Pointer to an Hsmci instance.
sources Bitwise OR of selected interrupt sources.

Definition at line 283 of file hsmci.c.

void HSMCI_FByteEnable ( Hsmci pRMci,
uint8_t  bFByteEn 
)

Force byte transfer enable/disable.

Parameters:
pRMci Pointer to an MCI instance.
bFByteEn FBYTE enable/disable.

Definition at line 236 of file hsmci.c.

uint8_t HSMCI_GetBusWidth ( Hsmci pRMci  ) 

Return bus width setting.

Parameters:
pRMci Pointer to an MCI instance.
Returns:
1, 4 or 8.

Definition at line 166 of file hsmci.c.

uint32_t HSMCI_GetItMask ( Hsmci pRMci  ) 

Return the interrupt mask register.

Parameters:
pRMci Pointer to an Hsmci instance.
Returns:
MCI interrupt mask register.

Definition at line 305 of file hsmci.c.

uint32_t HSMCI_GetMode ( Hsmci pRMci  ) 

Return mode register.

Parameters:
pRMci Pointer to an MCI instance.

Definition at line 195 of file hsmci.c.

uint32_t HSMCI_GetResponse ( Hsmci pRMci  ) 

Return the response register.

Parameters:
pRMci Pointer to an Hsmci instance.
Returns:
MCI response register.

Definition at line 390 of file hsmci.c.

uint32_t HSMCI_GetStatus ( Hsmci pRMci  ) 

Return the status register.

Parameters:
pRMci Pointer to an Hsmci instance.
Returns:
MCI status register.

Definition at line 481 of file hsmci.c.

uint32_t HSMCI_GetWPStatus ( Hsmci pRMci  ) 

Return the write protect status register.

Parameters:
pRMci Pointer to an Hsmci instance.
Returns:
MCI write protect status register.

Definition at line 563 of file hsmci.c.

void HSMCI_HsEnable ( Hsmci pRMci,
uint8_t  bHsEnable 
)

Enable/Disable High-Speed mode for MCI.

Parameters:
pRMci Pointer to an Hsmci instance.
bHsEnable Enable/Disable high-speed.

Definition at line 528 of file hsmci.c.

uint8_t HSMCI_IsFByteEnabled ( Hsmci pRMci  ) 

Check if Force Byte mode enabled.

Parameters:
pRMci Pointer to an MCI instance.
Returns:
1 if _FBYTE is enabled.

Definition at line 250 of file hsmci.c.

uint8_t HSMCI_IsHsEnabled ( Hsmci pRMci  ) 

Check if High-speed mode is enabled on MCI.

Parameters:
pRMci Pointer to an Hsmci instance.
Returns:
1

Definition at line 541 of file hsmci.c.

void HSMCI_PadvCtl ( Hsmci pRMci,
uint8_t  bPadv 
)

Padding value setting.

Parameters:
pRMci Pointer to an MCI instance.
bPadvEn Padding value 0xFF/0x00.

Definition at line 222 of file hsmci.c.

void HSMCI_ProofEnable ( Hsmci pRMci,
uint8_t  bRdProof,
uint8_t  bWrProof 
)

Enable/Disable R/W proof.

Parameters:
pRMci Pointer to an MCI instance.
bRdProof Read proof enable/disable.
bWrProof Write proof enable/disable.

Definition at line 207 of file hsmci.c.

uint32_t HSMCI_Read ( Hsmci pRMci  ) 

Return the receive data register.

Parameters:
pRMci Pointer to an Hsmci instance.
Returns:
MCI receive data register.

Definition at line 401 of file hsmci.c.

void HSMCI_ReadFifo ( Hsmci pRMci,
uint8_t *  pdwData,
uint32_t  dwSize 
)

Read from FIFO.

Parameters:
pRMci Pointer to an Hsmci instance.
pdwData Pointer to data buffer.
dwSize Size of data buffer (in DWord).

Definition at line 413 of file hsmci.c.

void HSMCI_Reset ( Hsmci pRMci,
uint8_t  bBackup 
)

Reset (& Disable) Multi-Media Interface.

Parameters:
mci Pointer to a Hsmci instance
bBackup Backup registers values to keep previous settings, including _MR, _SDCR, _DTOR, _CSTOR, _DMA and _CFG.

Definition at line 78 of file hsmci.c.

void HSMCI_Select ( Hsmci pRMci,
uint8_t  bSlot,
uint8_t  bBusWidth 
)

Select slot.

Parameters:
pRMci Pointer to a Hsmci instance
bSlot Slot ID (0~3 for A~D).

Definition at line 105 of file hsmci.c.

void HSMCI_SendCmd ( Hsmci pRMci,
uint32_t  dwCmd,
uint32_t  dwArg 
)

Send command.

Parameters:
pRMci Pointer to an Hsmci instance.
dwCmd Command register value.
dwArg Argument register value.

Definition at line 377 of file hsmci.c.

void HSMCI_SetBlockCount ( Hsmci pRMci,
uint16_t  wBlkCnt 
)

Set block (byte) count.

Parameters:
pRMci Pointer to an Hsmci instance.
wBlkCnt Block(byte) count.

Definition at line 343 of file hsmci.c.

void HSMCI_SetBlockLen ( Hsmci pRMci,
uint16_t  wBlkSize 
)

Set block length.

Count is reset to 0.

Parameters:
pRMci Pointer to an Hsmci instance.
wBlkSize Block size.

Definition at line 332 of file hsmci.c.

void HSMCI_SetBusWidth ( Hsmci pRMci,
uint8_t  bBusWidth 
)

Set bus width of MCI.

Parameters:
pRMci Pointer to a Hsmci instance
bBusWidth 1,4 or 8 (bits).

Definition at line 141 of file hsmci.c.

void HSMCI_SetSlot ( Hsmci pRMci,
uint8_t  bSlot 
)

Set slot.

Parameters:
pRMci Pointer to a Hsmci instance
bSlot Slot ID (0~3 for A~D).

Definition at line 130 of file hsmci.c.

void HSMCI_Write ( Hsmci pRMci,
uint32_t  dwData 
)

Sends data through MCI peripheral.

Parameters:
pRMci Pointer to an Hsmci instance.
 

Definition at line 441 of file hsmci.c.

void HSMCI_WriteFifo ( Hsmci pRMci,
uint8_t *  pdwData,
uint32_t  dwSize 
)

Write to FIFO.

Parameters:
pRMci Pointer to an Hsmci instance.
pdwData Pointer to data buffer.
dwSize Size of data buffer (In DWord).

Definition at line 453 of file hsmci.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines