initial software commit
This commit is contained in:
32
Src/fatfs_platform.c
Normal file
32
Src/fatfs_platform.c
Normal file
@ -0,0 +1,32 @@
|
||||
/* USER CODE BEGIN Header */
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file : fatfs_platform.c
|
||||
* @brief : fatfs_platform source file
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2023 STMicroelectronics.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is licensed under terms that can be found in the LICENSE file
|
||||
* in the root directory of this software component.
|
||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
/* USER CODE END Header */
|
||||
#include "fatfs_platform.h"
|
||||
|
||||
uint8_t BSP_PlatformIsDetected(void) {
|
||||
uint8_t status = SD_PRESENT;
|
||||
/* Check SD card detect pin */
|
||||
if(HAL_GPIO_ReadPin(SD_DETECT_GPIO_PORT, SD_DETECT_PIN) != GPIO_PIN_RESET)
|
||||
{
|
||||
status = SD_NOT_PRESENT;
|
||||
}
|
||||
/* USER CODE BEGIN 1 */
|
||||
/* user code can be inserted here */
|
||||
/* USER CODE END 1 */
|
||||
return status;
|
||||
}
|
||||
Reference in New Issue
Block a user