rt-thread/bsp/ft2004/libraries/bsp/ft_sd/ft_sdctrl_sinit.c

34 lines
912 B
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
 * @ : Copyright (c) 2021 Phytium Information Technology, Inc.
 *
 * SPDX-License-Identifier: Apache-2.0.
 *
* @Date: 2021-03-31 14:59:20
* @LastEditTime: 2021-05-25 16:47:14
* @Description:  This files is for sd ctrl static initialization
*
* @Modify History: * * Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
*/
#include "ft_sdctrl.h"
#include "ft_parameters.h"
extern FSdCtrl_Config_t FSdCtrl_Config[FT_SDC_NUM];
FSdCtrl_Config_t *FSdCtrl_LookupConfig(u32 instanceId)
{
FSdCtrl_Config_t *CfgPtr = NULL;
u32 Index;
for (Index = 0; Index < (u32)FT_GMAC_INSTANCES_NUM; Index++)
{
if (FSdCtrl_Config[Index].instanceId == instanceId)
{
CfgPtr = &FSdCtrl_Config[Index];
break;
}
}
return (FSdCtrl_Config_t *)CfgPtr;
}