Media support routines provide media management functions. More...
Functions | |
int32_t | fs_mc_read_cd (uint32_t drive_num) |
Callback function used to read Card Detect (CD) pin state when Memory Card is used in SPI mode. | |
int32_t | fs_mc_read_wp (uint32_t drive_num) |
Callback function used to read Write Protect (WP) pin state when Memory Card is used in SPI mode. | |
int32_t | fs_mc_spi_control_ss (uint32_t drive_num, uint32_t ss) |
Callback function used to control Slave Select signal when Memory Card is used in SPI mode. | |
fsLockUnlock * | fs_mc_lock_unlock (uint32_t drive_num) |
Callback function used to retrieve password management information in order to manage locked memory card device during initialization. | |
Media support routines provide media management functions.
fsLockUnlock * fs_mc_lock_unlock | ( | uint32_t | drive_num | ) |
Callback function used to retrieve password management information in order to manage locked memory card device during initialization.
[in] | drive_num | Memory Card Drive number |
The function fs_mc_lock_unlock returns the media lock/unlock information structure. Application optionally implements this function and ensure proper drive_num mapping.
The argument drive_num is specifying a Memory Card drive instance number.
Code Example
int32_t fs_mc_read_cd | ( | uint32_t | drive_num | ) |
Callback function used to read Card Detect (CD) pin state when Memory Card is used in SPI mode.
[in] | drive_num | Memory Card Drive number |
The function fs_mc_read_cd returns memory card detection state. Application optionally implements this function and ensure proper drive_num mapping to Card Detect (CD) pin on the Memory Card socket.
The argument drive_num is specifying a Memory Card drive instance number.
Code Example
int32_t fs_mc_read_wp | ( | uint32_t | drive_num | ) |
Callback function used to read Write Protect (WP) pin state when Memory Card is used in SPI mode.
[in] | drive_num | Memory Card Drive number |
The function fs_mc_read_wp returns memory card write protection state. Application optionally implements this function and ensure proper drive_num mapping to Write Protect (WP) pin on the Memory Card socket.
The argument drive_num is specifying a Memory Card drive instance number.
int32_t fs_mc_spi_control_ss | ( | uint32_t | drive_num, |
uint32_t | ss | ||
) |
Callback function used to control Slave Select signal when Memory Card is used in SPI mode.
[in] | drive_num | Memory Card Drive number |
[in] | ss | Slave select signal state |
The function fs_mc_spi_control_ss controls the Slave Select (SS) signal state. Application optionally implements this function and ensure proper drive_num mapping to SS pin on the Memory Card socket. Its return value indicates current SS signal state or when -1 is returned, that SS signal control is not implemented by this function and must be controlled using an SPI driver.
The argument drive_num is specifying a Memory Card drive instance number.
The argument ss is specifying a Slave Select signal state: 0=inactive, 1=active