Skip to content

Commit 4a5f9f7

Browse files
committed
add custom init code for neopixel power pin to default on
1 parent bdd8ee9 commit 4a5f9f7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

variants/qtpy_m0/variant.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
#include "variant.h"
20-
20+
#include "Arduino.h"
2121
/*
2222
* Pins descriptions
2323
*/
@@ -77,3 +77,10 @@ void SERCOM0_Handler()
7777
Serial1.IrqHandler();
7878
}
7979

80+
void initVariant(void) {
81+
// special initialization code just for us
82+
83+
// turn on neopixel
84+
pinMode(12, OUTPUT);
85+
digitalWrite(12, HIGH);
86+
}

variants/qtpy_m0/variant.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ extern "C"
8080
#define PIN_LED_13 (13u)
8181
#define PIN_LED PIN_LED_13
8282
#define LED_BUILTIN PIN_LED_13
83+
#define PIN_NEOPIXEL (11u)
8384

8485
/*
8586
* Analog pins

0 commit comments

Comments
 (0)