S32K312

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K312

653 Views
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 Kudos
Reply
3 Replies

635 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@zq1

The two functions have different capitalization

0 Kudos
Reply

632 Views
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 Kudos
Reply

633 Views
zq1
Contributor III

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

0 Kudos
Reply