2021-10-03 13:36:05 +03:00
|
|
|
/**
|
2022-01-05 19:10:18 +03:00
|
|
|
* @file furi_hal_sd.h
|
2021-10-03 13:36:05 +03:00
|
|
|
* SD Card HAL API
|
|
|
|
*/
|
|
|
|
|
2021-03-09 14:53:33 +03:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
2022-01-05 19:10:18 +03:00
|
|
|
#include <furi_hal_spi_types.h>
|
2021-03-09 14:53:33 +03:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2021-10-03 13:36:05 +03:00
|
|
|
/** Init SD card detect
|
|
|
|
*/
|
2021-03-09 14:53:33 +03:00
|
|
|
void hal_sd_detect_init(void);
|
|
|
|
|
2021-10-03 13:36:05 +03:00
|
|
|
/** Set SD card detect pin to low
|
|
|
|
*/
|
2021-03-09 14:53:33 +03:00
|
|
|
void hal_sd_detect_set_low(void);
|
|
|
|
|
2021-10-03 13:36:05 +03:00
|
|
|
/** Get SD card status
|
|
|
|
*
|
|
|
|
* @return true if SD card present, false if SD card not present
|
2021-03-09 14:53:33 +03:00
|
|
|
*/
|
|
|
|
bool hal_sd_detect(void);
|
|
|
|
|
2021-11-30 15:09:43 +03:00
|
|
|
/** Pointer to currently used SPI Handle */
|
|
|
|
extern FuriHalSpiBusHandle* furi_hal_sd_spi_handle;
|
|
|
|
|
2021-03-09 14:53:33 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
2021-10-03 13:36:05 +03:00
|
|
|
#endif
|