Limit can0 to Teensy35 only for now

This commit is contained in:
Josh Stewart 2020-01-25 00:21:20 +11:00
parent da299433de
commit 1d5053cccf
4 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
#ifndef CANCOMMS_H
#define CANCOMMS_H
#if defined(CORE_TEENSY)
#if defined(CORE_TEENSY35)
#include <FlexCAN_T4.h>
FlexCAN_T4<CAN0, RX_SIZE_256, TX_SIZE_16> Can0;

View File

@ -291,7 +291,7 @@ void sendCancommand(uint8_t cmdtype, uint16_t canaddress, uint8_t candata1, uint
case 3:
//send to truecan send routine
//canaddress == speeduino canid, candata1 == canin channel dest, paramgroup == can address to request from
#if defined(CORE_TEENSY) //Scope guarding this for now, but this needs a bit of a rethink for how it can be handled better across multiple archs
#if defined(CORE_TEENSY35) //Scope guarding this for now, but this needs a bit of a rethink for how it can be handled better across multiple archs
outMsg.id = (canaddress);
outMsg.len = 8;
outMsg.buf[0] = 0x0B ; //11;

View File

@ -53,7 +53,7 @@ void initialiseAll()
//STM32 can not currently enabled
#endif
#if defined(CORE_TEENSY)
#if defined(CORE_TEENSY35)
configPage9.intcan_available = 1; // device has internal canbus
//Teensy uses the Flexcan_T4 library to use the internal canbus
//enable local can interface

View File

@ -69,7 +69,7 @@ void loop()
if (CANSerial.available() > 0) { canCommand(); }
}
}
#if defined(CORE_TEENSY)
#if defined(CORE_TEENSY35)
//currentStatus.canin[12] = configPage9.enable_intcan;
if (configPage9.enable_intcan == 1) // use internal can module
{