This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

消息



uint8 OnBoard_SendCAN( void )
{
  CANdata_t *msgPtr;

  if ( registeredCANTaskID != NO_TASK_ID )
  {
    // Send the address to the task
    msgPtr = (CANdata_t *)osal_msg_allocate( sizeof(CANdata_t) );
    if ( msgPtr )
    {
      msgPtr->hdr.event = CAN_R;
    
      osal_msg_send( registeredCANTaskID, (uint8 *)msgPtr );
    }
    return ( SUCCESS );
  }
  else
    return ( FAILURE );
}

用中断调试上面的代码是执行了的,但是进不了消息处理函数,这是什么问题呢,执行了函数
osal_msg_send( registeredCANTaskID, (uint8 *)msgPtr );以后不是会设置消息事件吗,为什么

uint16 Hal_ProcessEvent( uint8 task_id, uint16 events )
{
uint8 *msgPtr;

(void)task_id; // Intentionally unreferenced parameter

if ( events & SYS_EVENT_MSG )
进不去这个函数呢(Hal_ProcessEvent里的其他事件是可以进入处理的)