void StartupTask( void ) { pi_printf("infor: start up\r\n"); bcm2835_read_mac_address(); parse_config(); printf("ACT LED on GPIO %d\r\n", act_led_gpio); printf("CAN bus frequency %d MHz\r\n", MCP2515_FREQUENCY_MHz); EcuM_StartupTwo(); // Startup CanIf due to ComM is missing in this example CanIf_SetControllerMode(CANIF_CanIfCtrlCfg, CANIF_CS_STARTED); CanIf_SetPduMode(CANIF_CanIfCtrlCfg, CANIF_SET_ONLINE); /** Setup Com stack with necessary parameters**/ Com_IpduGroupVector groupVector; Com_ClearIpduGroupVector(groupVector); //Start the IPDU group Com_SetIpduGroup(groupVector, COM_PDU_GROUP_ID_TXIPDUGROUP, TRUE); Com_SetIpduGroup(groupVector, COM_PDU_GROUP_ID_RXIPDUGROUP, TRUE); Com_IpduGroupControl(groupVector, TRUE); TerminateTask(); }
// Tasks void Task1( void ) { EcuM_StartupTwo(); CanIf_SetControllerMode(CANIF_Controller_A, CANIF_CS_STARTED); Com_IpduGroupStart(CanDbImportedPdus, 1); TerminateTask(); }
void StartupTask( void ) { pi_printf("infor: start up\r\n"); EcuM_StartupTwo(); // Startup CanIf due to ComM is missing in this example CanIf_SetControllerMode(CANIF_CanIfCtrlCfg, CANIF_CS_STARTED); CanIf_SetPduMode(CANIF_CanIfCtrlCfg, CANIF_SET_ONLINE); /** Setup Com stack with necessary parameters**/ Com_IpduGroupVector groupVector; //Start the IPDU group Com_ClearIpduGroupVector(groupVector); //Start the IPDU group Com_SetIpduGroup(groupVector, COM_PDU_GROUP_ID_TXCOMIPDUGROUP, TRUE); Com_SetIpduGroup(groupVector, COM_PDU_GROUP_ID_RXCOMIPDUGROUP, TRUE); Com_IpduGroupControl(groupVector, TRUE); TerminateTask(); }