Other Parts Discussed in Thread: HALCOGEN
I have been trying to setup CAN on my Hercules Launchpad board but I haven't had any success. I have followed this tutorial but with no success. You can see all my HALCOGEN configuration and code below.
uint8_t txtFailedMessage[] = { "Failed to Send Can Message: " };
uint8_t txtReceivedMessage[] = {"\nJust Received a Message\n"};
void CAN_init(void) {
uint8_t txtCanInit[] = { "Initializing CAN" };
sciDisplayText(sciREGx, txtCanInit, strlen((char*)txtCanInit));
canInit();
}
void CAN_send(uint8_t * message) {
if(canTransmit(canREG1, canMESSAGE_BOX1, message) == 0) {
sciDisplayText(sciREGx, txtFailedMessage, strlen((char*)txtFailedMessage));
while(1) {
;
}
} else {
sciDisplayText(sciREGx, message, strlen((char*)message));
}
}
void canMessageNotification(canBASE_t *node, uint32 messageBox) {
sciDisplayText(sciREGx, txtReceivedMessage, strlen((char*)txtReceivedMessage));
return;
}
void canStatusChangeNotification(canBASE_t *node, uint32 notification) {
return;
}
void canErrorNotification(canBASE_t *node, uint32 notification) {
return;
}