MBED code for Xbee module running on solar car

Dependencies:   XBeeLib mbed CUER_CAN

Fork of XBee802_Send_Data by Digi International Inc.

Committer:
ItsJustZi
Date:
Tue Sep 12 15:35:43 2017 +0000
Revision:
12:13762b16b300
CAN packets converted to Xbee packets and remote device is picking it up.. just need to verify from the receiving end that the data is indeed what we expect

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ItsJustZi 12:13762b16b300 1 #include "CAN_Data.h"
ItsJustZi 12:13762b16b300 2 #include "CAN_IDs.h"
ItsJustZi 12:13762b16b300 3 #include "mbed.h"
ItsJustZi 12:13762b16b300 4 #include "PINNAMES_mbed.h"
ItsJustZi 12:13762b16b300 5
ItsJustZi 12:13762b16b300 6 #define CAN_TIMEOUT_MS 100
ItsJustZi 12:13762b16b300 7 #define CAN_BUFFER_SIZE 255
ItsJustZi 12:13762b16b300 8
ItsJustZi 12:13762b16b300 9 void interruptHandler();
ItsJustZi 12:13762b16b300 10 bool idAccepted(int id);
ItsJustZi 12:13762b16b300 11 void CAN_Init();
ItsJustZi 12:13762b16b300 12 bool can_send(CANMessage msg);
ItsJustZi 12:13762b16b300 13 void CANDataSentCallback(void);
ItsJustZi 12:13762b16b300 14 void CANIDsListUpdater(void);
ItsJustZi 12:13762b16b300 15
ItsJustZi 12:13762b16b300 16 extern CAN can; //Create a CAN object to handle CAN comms
ItsJustZi 12:13762b16b300 17
ItsJustZi 12:13762b16b300 18 //Software buffer for receiving CAN messages
ItsJustZi 12:13762b16b300 19 extern CANMessage buffer[CAN_BUFFER_SIZE]; //CAN receive buffer
ItsJustZi 12:13762b16b300 20 extern bool safe_to_write[CAN_BUFFER_SIZE]; //Semaphore bit indicating that it's safe to write to the software buffer
ItsJustZi 12:13762b16b300 21 extern bool CAN_data_sent;
ItsJustZi 12:13762b16b300 22 extern int acceptedCANIDs[CAN_BUFFER_SIZE];