Skip to content

Commit 66097a8

Browse files
committed
add fake LED
1 parent 731adc7 commit 66097a8

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

variants/matrixportal_m4/variant.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ const PinDescription g_APinDescription[]=
110110
{ PORTA, 9, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
111111
{ PORTA, 10, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
112112
{ PORTA, 11, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
113+
114+
// 47 nonexistant LED
115+
{ PORTA, 15, PIO_DIGITAL, PIN_ATTR_PWM_G, No_ADC_Channel, TCC1_CH3, TC3_CH0, EXTERNAL_INT_15 },
113116
} ;
114117

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

variants/matrixportal_m4/variant.h

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ extern "C"
8181
// #define digitalPinToTimer(P)
8282

8383
// LEDs
84-
//#define PIN_LED_13 (13u)
84+
#define PIN_LED_47 (47u)
8585
//#define PIN_LED_RXL (25u)
8686
//#define PIN_LED_TXL (26u)
87-
//#define PIN_LED PIN_LED_13
87+
#define PIN_LED PIN_LED_47
8888
//#define PIN_LED2 PIN_LED_RXL
8989
//#define PIN_LED3 PIN_LED_TXL
90-
#define LED_BUILTIN PIN_LED_13
90+
#define LED_BUILTIN PIN_LED_47
9191
#define PIN_NEOPIXEL (4)
9292

9393
/*
@@ -113,6 +113,24 @@ static const uint8_t DAC1 = PIN_DAC1;
113113

114114
#define ADC_RESOLUTION 12
115115

116+
117+
118+
/* WiFi interfaces */
119+
#define SerialESP32 Serial2
120+
#define SerialNina SerialESP32
121+
#define SPIWIFI SPI
122+
#define ESP32_GPIO0 29
123+
#define ESP32_RESETN 30
124+
#define SPIWIFI_SS 33
125+
#define SPIWIFI_ACK 31
126+
#define SPIWIFI_RESET ESP32_RESETN
127+
#define NINA_GPIO0 ESP32_GPIO0
128+
#define NINA_RESETN ESP32_RESETN
129+
#define NINA_ACK SPIWIFI_ACK
130+
#define NINA_CTS SPIWIFI_ACK
131+
#define NINA_RTS NINA_GPIO0
132+
133+
116134
/*
117135
* Serial interfaces
118136
*/
@@ -215,6 +233,7 @@ extern SERCOM sercom4;
215233
extern SERCOM sercom5;
216234

217235
extern Uart Serial1;
236+
extern Uart Serial2;
218237

219238
#endif
220239

0 commit comments

Comments
 (0)