/************************************************************************** * * Copyright (c) 2015-2021 by WuYuan Technology, Inc. * * This software is copyrighted by and is the property of SiFar * Technology, Inc.. All rights are reserved by SiFar Technology, Inc.. * This software may only be used in accordance with the corresponding * license agreement. Any unauthorized use, duplication, distribution, * or disclosure of this software is expressly forbidden. * * This Copyright notice MUST not be removed or modified without prior * written consent of SiFar Technology, Inc.. * * WuYuan Technology, Inc. reserves the right to modify this software without notice. * * Author: Sober * Ver: 1.0.0 2023.12.23 * Description: Creat **************************************************************************/ #ifndef _SF_SD_COMM_H_ #define _SF_SD_COMM_H_ #define MMC_DEV_MAX_NUM (2) typedef enum { MMC_DEV_SD = 0, MMC_DEV_EMMC = 1, MMC_DEV_NO = 2, }MMC_DEV_TYPE; typedef enum { MMC_DEV_NODE_STATE_NO = 0, MMC_DEV_NODE_STATE_EXIST = 1, MMC_DEV_NODE_STATE_NO_EXIST = 2, }MMC_DEV_NODE_STATE; typedef enum { MMC_DEV_MOUNT_STATE_NO = 0, MMC_DEV_MOUNT_STATE_MOUNTED = 1, MMC_DEV_MOUNT_STATE_UNMOUNTED = 2, }MMC_DEV_MOUNT_STATE; typedef enum { MMC_DEV_SPACE_STATE_NO = 0, MMC_DEV_SPACE_STATE_ENOUGH = 1, MMC_DEV_SPACE_STATE_NO_ENOUGH = 2, }MMC_DEV_SPACE_STATE; typedef enum { MMC_DEV_LOOP_STATE_NO = 0, MMC_DEV_LOOP_STATE_ON = 1, MMC_DEV_LOOP_STATE_OFF = 2, }MMC_DEV_LOOP_STATE; typedef struct { MMC_DEV_TYPE dev_type; MMC_DEV_MOUNT_STATE moumted_state; MMC_DEV_SPACE_STATE space_state; MMC_DEV_LOOP_STATE loop_state; int dcf_handle; }SF_RTOS_ST_MMC_DEV; void SF_RtosStrgInit(void); void SF_RtosStrgUnInit(void); int SF_RtosStrgRegister(int devid, int mounted_state); void SF_RtosStrgSetDcfHandle(UINT32 strg_id, UINT32 handle); SF_RTOS_ST_MMC_DEV *SF_RtosStrgCheckWorkableDev(void); #endif