SD card v7 BSP (#361)

* Outdated apps: add api-light-usage

* Gpio: update SD card CS pin settings

* API-power: added fns to disable/enable external 3v3 dc-dc

* API-gpio: separated SD card detect routines

* Resources: removed sd cs pin

* SD card: low level init now resets card power supply

* App SD-filesystem: use new card detect fns

* SD card: fix low level init headers

* SD card: more realilable low level init, power reset, exit from command read cycle conditionally

* App SD-filesystem: led notifiers, init cycling

* SD card: backport to F4

* SD card: handle eject in init sequence

* SD card: api to set level on detect gpio

* SPI: api to set state on bus pins

* SD card: set low state on bus pins while power reset

Co-authored-by: coreglitch <mail@s3f.ru>
This commit is contained in:
SG
2021-03-09 14:53:33 +03:00
committed by GitHub
parent 3f10ce47f0
commit fef16a8e7a
20 changed files with 463 additions and 214 deletions

View File

@@ -83,6 +83,16 @@ float api_hal_power_get_usb_voltage();
/* Get power system component state */
void api_hal_power_dump_state(string_t buffer);
/**
* @brief Enable 3.3v on external gpio and sd card
*/
void api_hal_power_enable_external_3_3v();
/**
* @brief Disable 3.3v on external gpio and sd card
*/
void api_hal_power_disable_external_3_3v();
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,30 @@
#include <stdint.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Init SD card detect
*
*/
void hal_sd_detect_init(void);
/**
* @brief Set SD card detect pin to low
*
*/
void hal_sd_detect_set_low(void);
/**
* @brief Get SD card status
*
* @return true if SD card present
* @return false if SD card not present
*/
bool hal_sd_detect(void);
#ifdef __cplusplus
}
#endif