09_FreeRTOS_CAN_loopback/main.cpp
/**
 * CAN transmit task.
 * Receive CAN message from other tasks and try to send it through CAN.
 * @param pvParameters None
 */
CAN transmit task.
Receive CAN message from other tasks and try to send it through CAN.
@param pvParameters None
CAN transmit task . Receive CAN message from other tasks and try to send it through CAN . @param pvParameters None
void CANTransmitTask(void *pvParameters) {
  (void)pvParameters;
  CAN_Tx_t can_tx; 
  while (1u) {
    xQueueReceive(CanTxQueue, &can_tx, portMAX_DELAY);
    ToggleBlueLed();
    while (!CAN_Transmit(&can_tx)) {
      vTaskDelay(RETRANSMISSION_DELAY);
    }
  }
}
void CANTransmitTask ( void * pvParameters ) { ( void ) pvParameters ; CAN_Tx_t can_tx ; while ( 1u ) { xQueueReceive ( CanTxQueue , & can_tx , portMAX_DELAY ) ; ToggleBlueLed ( ) ; while ( ! CAN_Transmit ( & can_tx ) ) { vTaskDelay ( RETRANSMISSION_DELAY ) ; } } }
CAN transmit task.
CAN transmit task .
/* CAN message to send */ /* Receive CAN message from queue */ /* Indicate message receiving from queue */ /* Try to put CAN message in mailbox */ /* CAN retransmission delay if mailboxes are busy */