1 /*
2  * @ : Copyright (c) 2021 Phytium Information Technology, Inc.
3  *
4  * SPDX-License-Identifier: Apache-2.0.
5  *
6  * @Date: 2021-04-07 13:22:01
7  * @LastEditTime: 2021-04-07 13:22:01
8  * @Description:  Description of file
9  * @Modify History:
10  * * * Ver   Who        Date         Changes
11  * * ----- ------     --------    --------------------------------------
12  */
13 
14 #include "ft_qspi.h"
15 #include "ft_parameters.h"
16 
17 extern FQSpi_Config_t FqSpi_ConfigTable[FT_QSPI_NUM];
18 
FQSpi_LookupConfig(u32 instanceId)19 FQSpi_Config_t *FQSpi_LookupConfig(u32 instanceId)
20 {
21     FQSpi_Config_t *pFQSpi_Config_t = NULL;
22 
23     u32 Index;
24     for (Index = 0; Index < (u32)FT_GMAC_INSTANCES_NUM; Index++)
25     {
26         if (FqSpi_ConfigTable[Index].instanceId == instanceId)
27         {
28             pFQSpi_Config_t = &FqSpi_ConfigTable[Index];
29             break;
30         }
31     }
32 
33     return pFQSpi_Config_t;
34 }
35