mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-16 00:49:16 +00:00
sdmmc host: add handling of CD and WP pins
Previous version of the code only connected CD and WP to the peripheral, in fact the hardware does not use the values of these signals automatically. This adds code to read CD and WP values when command is executed and return errors if card is not present, or write command is executed when WP signal is active.
This commit is contained in:
@@ -255,7 +255,7 @@ typedef volatile struct {
|
||||
|
||||
union {
|
||||
struct {
|
||||
uint32_t cards: 2; ///< bit N reads 1 if card N is present
|
||||
uint32_t cards: 2; ///< bit N reads 0 if card N is present
|
||||
uint32_t reserved: 30;
|
||||
};
|
||||
uint32_t val;
|
||||
@@ -263,7 +263,7 @@ typedef volatile struct {
|
||||
|
||||
union {
|
||||
struct {
|
||||
uint32_t card0: 2; ///< bit N reads 1 if card N is write protected
|
||||
uint32_t cards: 2; ///< bit N reads 1 if card N is write protected
|
||||
uint32_t reserved: 30;
|
||||
};
|
||||
uint32_t val;
|
||||
|
Reference in New Issue
Block a user