Add working simple receiver test code
It makes all the motors spin back and forth, which is hilarious.
Change-Id: I150f07fbd91f71d725efa13d36f94dd2102b86d1
diff --git a/motors/peripheral/can.h b/motors/peripheral/can.h
index 54bdce8..98083c9 100644
--- a/motors/peripheral/can.h
+++ b/motors/peripheral/can.h
@@ -10,6 +10,8 @@
extern "C" {
#endif
+#define CAN_EFF_FLAG UINT32_C(0x80000000) /* EFF/SFF is set in the MSB */
+
void can_init(uint32_t id0, uint32_t id1);
// Mailbox is 2 or 3 for the two send mailboxes.
@@ -18,7 +20,7 @@
// Sets *length to -1 if there isn't a new piece of data to receive.
// Mailbox is 0 or 1 for the two receive mailboxes.
-void can_receive_command(unsigned char *data, int *length, int mailbox);
+void can_receive(unsigned char *data, int *length, int mailbox);
#ifdef __cplusplus
}