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