Pull the medium-specific pieces out of the common code
Change-Id: I9cd1824a6bf535e285553fbe5f79f6d72919f048
diff --git a/motors/peripheral/can.c b/motors/peripheral/can.c
index 7187ac9..0e731e2 100644
--- a/motors/peripheral/can.c
+++ b/motors/peripheral/can.c
@@ -33,8 +33,6 @@
void can_init(void) {
printf("can_init\n");
- PORTB_PCR18 = PORT_PCR_DSE | PORT_PCR_MUX(2);
- PORTB_PCR19 = PORT_PCR_DSE | PORT_PCR_MUX(2);
SIM_SCGC6 |= SIM_SCGC6_FLEXCAN0;
@@ -175,7 +173,7 @@
void can_receive_command(unsigned char *data, int *length) {
if (0) {
static int i = 0;
- if (i++ == 13) {
+ if (i++ == 10000) {
printf("IFLAG1=%" PRIx32 " ESR=%" PRIx32 " ESR1=%" PRIx32 "\n",
CAN0_IFLAG1, CAN0_ECR, CAN0_ESR1);
i = 0;