STSW-STLKT01
|
Functions | |
uint8_t | BSP_SD_Init (void) |
Initialize the SD card. More... | |
uint8_t | BSP_SD_IsDetected (void) |
uint8_t | BSP_SD_ReadBlocks (uint32_t *p32Data, uint64_t Sector, uint16_t BlockSize, uint32_t NumberOfBlocks) |
Reads block(s) from a specified address in an SD card, in polling mode. More... | |
uint8_t | BSP_SD_WriteBlocks (uint32_t *p32Data, uint64_t Sector, uint16_t BlockSize, uint32_t NumberOfBlocks) |
Writes block(s) to a specified address in an SD card, in polling mode. More... | |
uint8_t | BSP_SD_Erase (uint32_t StartAddr, uint32_t EndAddr) |
Erases the specified memory area of the given SD card. More... | |
uint8_t | BSP_SD_GetStatus (void) |
Returns the SD status. More... | |
uint8_t | BSP_SD_GetCardInfo (SD_CardInfo *pCardInfo) |
Returns information about specific card. More... | |
void | SD_IO_Init (void) |
Initializes the SD Card and put it into StandBy State (Ready for data transfer). More... | |
void | SD_IO_Init_LS (void) |
Initializes the SD Card and put it into StandBy State (Ready for data transfer). Low baundrate. More... | |
void | SD_IO_WriteByte (uint8_t Data) |
Writes a byte on the SD. More... | |
uint8_t | SD_IO_ReadByte (void) |
Reads a byte from the SD. More... | |
HAL_StatusTypeDef | SD_IO_WriteCmd (uint8_t Cmd, uint32_t Arg, uint8_t Crc, uint8_t Response) |
Sends 5 bytes command to the SD card and get response. More... | |
uint8_t | SD_IO_WriteCmd_wResp (uint8_t Cmd, uint32_t Arg, uint8_t Crc) |
Sends 5 bytes command to the SD card and get response. More... | |
HAL_StatusTypeDef | SD_IO_WaitResponse (uint8_t Response) |
Waits response from the SD card. More... | |
void | SD_IO_WriteDummy (void) |
Sends dummy byte with CS High. More... | |
void | SD_IO_WriteDMA (uint8_t *pData, uint16_t Size) |
Writes a block by DMA on the SD. More... | |
Detailed Description
Function Documentation
◆ BSP_SD_Erase()
uint8_t BSP_SD_Erase | ( | uint32_t | StartAddr, |
uint32_t | EndAddr | ||
) |
Erases the specified memory area of the given SD card.
- Parameters
-
StartAddr Start byte address EndAddr End byte address
- Return values
-
SD status
Definition at line 756 of file SensorTile_sd.c.
◆ BSP_SD_GetCardInfo()
uint8_t BSP_SD_GetCardInfo | ( | SD_CardInfo * | pCardInfo | ) |
Returns information about specific card.
- Parameters
-
cardinfo pointer to a SD_CardInfo structure that contains all SD card information.
- Return values
-
The SD Response: - MSD_ERROR : Sequence failed
- MSD_OK : Sequence succeed
Definition at line 185 of file SensorTile_sd.c.
◆ BSP_SD_GetStatus()
uint8_t BSP_SD_GetStatus | ( | void | ) |
Returns the SD status.
- Parameters
-
None
- Return values
-
The SD status.
Definition at line 678 of file SensorTile_sd.c.
◆ BSP_SD_Init()
uint8_t BSP_SD_Init | ( | void | ) |
Initialize the SD card.
- Parameters
-
None
- Return values
-
The SD Response: - MSD_ERROR : Sequence failed
- MSD_OK : Sequence succeed
Definition at line 151 of file SensorTile_sd.c.
◆ BSP_SD_ReadBlocks()
uint8_t BSP_SD_ReadBlocks | ( | uint32_t * | p32Data, |
uint64_t | Sector, | ||
uint16_t | BlockSize, | ||
uint32_t | NumberOfBlocks | ||
) |
Reads block(s) from a specified address in an SD card, in polling mode.
- Parameters
-
pData Pointer to the buffer that will contain the data to transmit ReadAddr Address from where data is to be read BlockSize SD card data block size, that should be 512 NumOfBlocks Number of SD blocks to read
- Return values
-
SD status
Definition at line 208 of file SensorTile_sd.c.
◆ BSP_SD_WriteBlocks()
uint8_t BSP_SD_WriteBlocks | ( | uint32_t * | p32Data, |
uint64_t | Sector, | ||
uint16_t | BlockSize, | ||
uint32_t | NumberOfBlocks | ||
) |
Writes block(s) to a specified address in an SD card, in polling mode.
- Parameters
-
pData Pointer to the buffer that will contain the data to transmit WriteAddr Address from where data is to be written BlockSize SD card data block size, that should be 512 NumOfBlocks Number of SD blocks to write
- Return values
-
SD status
Definition at line 287 of file SensorTile_sd.c.
◆ SD_IO_Init()
void SD_IO_Init | ( | void | ) |
Initializes the SD Card and put it into StandBy State (Ready for data transfer).
- Parameters
-
None
- Return values
-
None
Definition at line 1140 of file SensorTile.c.
◆ SD_IO_Init_LS()
void SD_IO_Init_LS | ( | void | ) |
Initializes the SD Card and put it into StandBy State (Ready for data transfer). Low baundrate.
- Parameters
-
None
- Return values
-
None
Definition at line 1167 of file SensorTile.c.
◆ SD_IO_ReadByte()
uint8_t SD_IO_ReadByte | ( | void | ) |
Reads a byte from the SD.
- Parameters
-
None
- Return values
-
The received byte.
Definition at line 1253 of file SensorTile.c.
◆ SD_IO_WaitResponse()
HAL_StatusTypeDef SD_IO_WaitResponse | ( | uint8_t | Response | ) |
Waits response from the SD card.
- Parameters
-
Response Expected response from the SD card
- Return values
-
HAL_StatusTypeDef HAL Status
Definition at line 1347 of file SensorTile.c.
◆ SD_IO_WriteByte()
void SD_IO_WriteByte | ( | uint8_t | Data | ) |
Writes a byte on the SD.
- Parameters
-
Data byte to send.
- Return values
-
None
Definition at line 1224 of file SensorTile.c.
◆ SD_IO_WriteCmd()
HAL_StatusTypeDef SD_IO_WriteCmd | ( | uint8_t | Cmd, |
uint32_t | Arg, | ||
uint8_t | Crc, | ||
uint8_t | Response | ||
) |
Sends 5 bytes command to the SD card and get response.
- Parameters
-
Cmd The user expected command to send to SD card. Arg The command argument. Crc The CRC. Response Expected response from the SD card
- Return values
-
HAL_StatusTypeDef HAL Status
Definition at line 1312 of file SensorTile.c.
◆ SD_IO_WriteCmd_wResp()
uint8_t SD_IO_WriteCmd_wResp | ( | uint8_t | Cmd, |
uint32_t | Arg, | ||
uint8_t | Crc | ||
) |
Sends 5 bytes command to the SD card and get response.
- Parameters
-
Cmd The user expected command to send to SD card. Arg The command argument. Crc The CRC. Response Expected response from the SD card
- Return values
-
HAL_StatusTypeDef HAL Status
Definition at line 1273 of file SensorTile.c.
◆ SD_IO_WriteDMA()
void SD_IO_WriteDMA | ( | uint8_t * | pData, |
uint16_t | Size | ||
) |
Writes a block by DMA on the SD.
- Parameters
-
Data byte to send.
- Return values
-
None
Definition at line 1237 of file SensorTile.c.
◆ SD_IO_WriteDummy()
void SD_IO_WriteDummy | ( | void | ) |
Sends dummy byte with CS High.
- Parameters
-
None
- Return values
-
None
Definition at line 1374 of file SensorTile.c.
Generated by 1.8.13