S32K312

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K312

1,782件の閲覧回数
zq1
Contributor III

i am building project with S32K312 with lpuart_lin ,but there is always error:the calback fun undefined,

i want to know how to define the function

zq1_0-1704856729844.png

zq1_1-1704856763888.png

 

0 件の賞賛
返信
3 返答(返信)

1,764件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@zq1

The two functions have different capitalization

0 件の賞賛
返信

1,761件の閲覧回数
zq1
Contributor III
void LIN_CallBack(const uint8 Instance, const Lpuart_Lin_Ip_StateStructType *LinState)
{
(void)Instance;
const Lpuart_Lin_Ip_StateStructType * linCurrentState = LinState;
Lin_msg_temp.id = linCurrentState->CurrentEventId;
switch (linCurrentState->CurrentEventId)
{
case LPUART_LIN_IP_RECV_HEADER_OK:
if(0x3C == Lin_msg_temp.id)
{
//ready to receive data
//what api could i use??
}
    else if(0x3D == Lin_msg_temp.id)
{
    //send data
    //what api could i use???
}
   break;
 
case LPUART_LIN_IP_RX_COMPLETED:
{
for(uint8 i = 0;i<sizeof(g_aLINRxBuf);i++)
{
Lin_msg_temp.data[i] = g_aLINRxBuf[i];
}
Lin_msg_temp.length = linCurrentState->RxSize;
}
break;
 
case LPUART_LIN_IP_TX_COMPLETED:
{
//clear tx buffer
}
break;
 
default:
  /* do nothing */
break;
}
}
 
void Lin_Init()
{
Lpuart_Lin_Ip_Init(INST_LIN2,&Lpuart_Lin_Ip_Sa_pHwConfigPB_0_BOARD_INITPERIPHERALS);
IntCtrl_Ip_EnableIrq(LPUART2_IRQn);
}
0 件の賞賛
返信

1,762件の閲覧回数
zq1
Contributor III

thank you ,coud you please help me abou the problem :S32K - NXP Community

0 件の賞賛
返信