Skip to content

Commit 308e949

Browse files
committed
feather_m4_can: Add CAN-related pins to variant files
40: CAN_STANDBY 41: CAN_TX 42: CAN_RX
1 parent ad022b4 commit 308e949

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

variants/feather_m4_can/variant.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
//TC2 IOSET 2
3030
//TC3 IOSET 1
3131
//TC4 IOSET 1
32-
const PinDescription g_APinDescription[]=
32+
const PinDescription g_APinDescription[PINS_COUNT]=
3333
{
3434
// 0..13 - Digital pins
3535
// ----------------------
@@ -107,6 +107,12 @@ const PinDescription g_APinDescription[]=
107107
{ PORTA, 9, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
108108
{ PORTA, 10, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
109109
{ PORTA, 11, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
110+
111+
// ----------------------
112+
// 40..42 CAN (STANDBY, TX, RX)
113+
{ PORTB, 13, PIO_DIGITAL, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
114+
{ PORTB, 14, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
115+
{ PORTB, 15, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
110116
} ;
111117

112118
const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TCC3, TCC4, TC0, TC1, TC2, TC3, TC4, TC5 } ;

variants/feather_m4_can/variant.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ extern "C"
5757
*----------------------------------------------------------------------------*/
5858

5959
// Number of pins defined in PinDescription array
60-
#define PINS_COUNT (40u)
61-
#define NUM_DIGITAL_PINS (20u)
60+
#define PINS_COUNT (43u)
61+
#define NUM_DIGITAL_PINS (23u)
6262
#define NUM_ANALOG_INPUTS (6u)
6363
#define NUM_ANALOG_OUTPUTS (1u)
6464
#define analogInputToDigitalPin(p) ((p < 6u) ? (p) + 14u : -1)

0 commit comments

Comments
 (0)