src/Hardware/Hardware_CAN.c
/* Read the current CAN-bus message. Returning false if the message has been read before, else true */
Read the current CAN-bus message. Returning false if the message has been read before, else true
Read the current CAN - bus message . Returning false if the message has been read before else true
bool Hardware_CAN_Read_Message(uint16_t *COB_ID, uint8_t data[]) {
	bool is_new_message;
	#if PROCESSOR_CHOICE == STM32
	STM32_PLC_CAN_Get_ID_Data(ID, data, &is_new_message);
#elif PROCESSOR_CHOICE == ARDUINO
#elif PROCESSOR_CHOICE == PIC
#elif PROCESSOR_CHOICE == AVR
#elif PROCESSOR_CHOICE == QT_USB
    QT_USB_Get_ID_Data(ID, data, &is_new_message);
#else
	Internal_Receive(COB_ID, data, &is_new_message);
#endif
	return is_new_message;
}
bool Hardware_CAN_Read_Message ( uint16_t * COB_ID , uint8_t data [ ] ) { bool is_new_message ; #if PROCESSOR_CHOICE == STM32 STM32_PLC_CAN_Get_ID_Data ( ID , data , & is_new_message ) ; #elif PROCESSOR_CHOICE == ARDUINO #elif PROCESSOR_CHOICE == PIC #elif PROCESSOR_CHOICE == AVR #elif PROCESSOR_CHOICE == QT_USB QT_USB_Get_ID_Data ( ID , data , & is_new_message ) ; #else Internal_Receive ( COB_ID , data , & is_new_message ) ; #endif return is_new_message ; }
Read the current CAN-bus message.
Read the current CAN - bus message .
/* Implement your CAN function to get ID, data[] and the flag is_new_message here for the Arduino platform */ /* Implement your CAN function to get ID, data[] and the flag is_new_message here for the PIC platform */ /* Implement your CAN function to get ID, data[] and the flag is_new_message here for the AVR platform */ /* If no processor are used, use internal feedback for debugging */