You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

62 lines
2.1 KiB

/*
* Copyright : (C) 2022 Phytium Information Technology, Inc.
* All Rights Reserved.
*
* This program is OPEN SOURCE software: you can redistribute it and/or modify it
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd,
* either version 1.0 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Phytium Public License for more details.
*
*
* FilePath: fi3c_sinit.c
* Date: 2021-11-01 14:53:42
* LastEditTime: 2022-02-18 08:36:52
* Description:  This file is for implementation of driver's static initialization functionality
*
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/9/11 first commit
*/
/***************************** Include Files *********************************/
#include "ftypes.h"
#include "fparameters.h"
#include "fi3c.h"
#include "sdkconfig.h"
/************************** Constant Definitions *****************************/
/**************************** Type Definitions *******************************/
/***************** Macros (Inline Functions) Definitions *********************/
/************************** Variable Definitions *****************************/
extern const FI3cConfig FI3C_CONFIG_TBL[FI3C_NUM];
/************************** Function Prototypes ******************************/
/**
* @name: FI3cLookupConfig
* @msg: 获取I3C驱动的默认配置参数
* @return {const FI3cConfig*} 驱动默认参数
* @param {u32} instance_id, 当前控制的I3C控制器实例号
*/
const FI3cConfig *FI3cLookupConfig(u32 instance_id)
{
const FI3cConfig *ptr = NULL;
u32 index;
for (index = 0; index < (u32)FI3C_NUM; index++)
{
if (FI3C_CONFIG_TBL[index].instance_id == instance_id)
{
ptr = &FI3C_CONFIG_TBL[index];
break;
}
}
return (const FI3cConfig *)ptr;
}