Hi,
when I compared the variants lately after the 1.5.7 was coming out, the only difference I found was some sanitizing, like unsigned int instead int, for loops. So I checked again and figured out, that this is indeed already in 1.5.6r2!
(Maybe I missed a compare from 1.5.6r0-r2)
The documentation in the header of the original arduino.cpp-file is incomplete! The full block in the variants.h file is:
/*
* Complementary CAN pins
*/
static const uint8_t CAN1RX = 88;
static const uint8_t CAN1TX = 89;
// CAN0
#define PINS_CAN0 (90u)
// CAN1
#define PINS_CAN1 (91u)
so it is pin 88 to 91!
and in variants.cpp , where for the DigiX in line 284 the DigiX pins are starting there is the following code, which is missing in the DigiX version:
// 90 .. 91 - "All CAN pins" masks
// 90 - CAN0 all pins
{ PIOA, PIO_PA1A_CANRX0|PIO_PA0A_CANTX0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
// 91 - CAN1 all pins
{ PIOB, PIO_PB15A_CANRX1|PIO_PB14A_CANTX1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
Looks like, that there is some cleaning needed, which might have effects to existing DigiX projects. As the current DigiX are having printed pin numbers on the board starting with 90, I would like to see a solution, where those pins are having duplicated numbers.
Worth a discussion to find out a generic solution, which should go into the upcoming new digistump-IDE!