s32k312 I2C RTD

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

s32k312 I2C RTD

跳至解决方案
521 次查看
Hoon
Contributor III

I have one problem. I'm trying to use the Lpi2c_Ip_MasterEndTransfer function, but I get the following compiler error as below 

"""  function "Lpi2c_Ip_MasterEndTransfer" declared implicitly """

 

There is no problem using the other functions below in the Lpi2c_Ip.c file. The same phenomenon occurs when the location of the function is moved to Lpi2c_Ip_MasterDeinit for fear that the Lpi2c_Ip_MasterEndTransfer function has been deactivated by the define process. Is there a related error?

no problem functions

Lpi2c_Ip_MasterDeinit
Lpi2c_Ip_MasterInit
Lpi2c_Ip_MasterSendDataBlocking
Lpi2c_Ip_MasterReceiveDataBlocking

标记 (1)
0 项奖励
回复
1 解答
497 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @Hoon 

The function Lpi2c_Ip_MasterEndTransfer() is declared as static, which means the function's access level is restricted to the file where it is defined. As a result, its usage is limited to that file and it cannot be accessed from other source files including main.c.

Based on your description, the error appears to be caused by an attempt to call this static function from main.c, which is not allowed due to its restricted visibility. In contrast, the other functions you are using do not have the static keyword, which is why they are accessible from main.c.

 

BR, VaneB

在原帖中查看解决方案

0 项奖励
回复
1 回复
498 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @Hoon 

The function Lpi2c_Ip_MasterEndTransfer() is declared as static, which means the function's access level is restricted to the file where it is defined. As a result, its usage is limited to that file and it cannot be accessed from other source files including main.c.

Based on your description, the error appears to be caused by an attempt to call this static function from main.c, which is not allowed due to its restricted visibility. In contrast, the other functions you are using do not have the static keyword, which is why they are accessible from main.c.

 

BR, VaneB

0 项奖励
回复