From 6398c2a1ac1bbdb1573d8ea1b554f42d70b7ad29 Mon Sep 17 00:00:00 2001 From: caternuson Date: Wed, 26 Jan 2022 15:19:30 -0800 Subject: [PATCH 1/2] add dotstar pin defs --- variants/gemma_m0/variant.h | 3 +++ variants/itsybitsy_m0/variant.h | 4 ++++ variants/itsybitsy_m4/variant.h | 6 +++++- variants/trinket_m0/variant.h | 3 +++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/variants/gemma_m0/variant.h b/variants/gemma_m0/variant.h index 43bdd68a6..8161c9fb7 100644 --- a/variants/gemma_m0/variant.h +++ b/variants/gemma_m0/variant.h @@ -87,6 +87,9 @@ extern "C" // DotStar LED #define INTERNAL_DS_DATA 3 #define INTERNAL_DS_CLK 4 +#define PIN_DOTSTAR_DATA 3 +#define PIN_DOTSTAR_CLK 4 +#define DOTSTAR_NUM 1 /* * Analog pins diff --git a/variants/itsybitsy_m0/variant.h b/variants/itsybitsy_m0/variant.h index 4c0d1c15f..46542861b 100644 --- a/variants/itsybitsy_m0/variant.h +++ b/variants/itsybitsy_m0/variant.h @@ -80,6 +80,10 @@ extern "C" #define PIN_LED_13 (13u) #define PIN_LED PIN_LED_13 #define LED_BUILTIN PIN_LED_13 +// DotStar LED +#define PIN_DOTSTAR_DATA 41 +#define PIN_DOTSTAR_CLK 40 +#define DOTSTAR_NUM 1 /* * Analog pins diff --git a/variants/itsybitsy_m4/variant.h b/variants/itsybitsy_m4/variant.h index e031adc9f..6510d250a 100644 --- a/variants/itsybitsy_m4/variant.h +++ b/variants/itsybitsy_m4/variant.h @@ -84,6 +84,10 @@ extern "C" #define PIN_LED_13 (13u) #define PIN_LED PIN_LED_13 #define LED_BUILTIN PIN_LED_13 +// DotStar LED +#define PIN_DOTSTAR_DATA 8 +#define PIN_DOTSTAR_CLK 6 +#define DOTSTAR_NUM 1 /* * Analog pins @@ -137,7 +141,7 @@ static const uint8_t ATN = PIN_ATN; #define PAD_SPI_TX SPI_PAD_0_SCK_1 #define PAD_SPI_RX SERCOM_RX_PAD_3 -static const uint8_t SS = PIN_A2 ; +static const uint8_t SS = PIN_A2 ; static const uint8_t MOSI = PIN_SPI_MOSI ; static const uint8_t MISO = PIN_SPI_MISO ; static const uint8_t SCK = PIN_SPI_SCK ; diff --git a/variants/trinket_m0/variant.h b/variants/trinket_m0/variant.h index f11b1ef09..e76dc3107 100644 --- a/variants/trinket_m0/variant.h +++ b/variants/trinket_m0/variant.h @@ -87,6 +87,9 @@ extern "C" // DotStar LED #define INTERNAL_DS_DATA 7 #define INTERNAL_DS_CLK 8 +#define PIN_DOTSTAR_DATA 7 +#define PIN_DOTSTAR_CLK 8 +#define DOTSTAR_NUM 1 /* * Analog pins From dd787f583ced2c4fdecae47860a87c5e9e38bb8c Mon Sep 17 00:00:00 2001 From: caternuson Date: Wed, 26 Jan 2022 15:23:50 -0800 Subject: [PATCH 2/2] paran u --- variants/gemma_m0/variant.h | 10 +++++----- variants/itsybitsy_m0/variant.h | 6 +++--- variants/itsybitsy_m4/variant.h | 6 +++--- variants/trinket_m0/variant.h | 10 +++++----- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/variants/gemma_m0/variant.h b/variants/gemma_m0/variant.h index 8161c9fb7..dda282c87 100644 --- a/variants/gemma_m0/variant.h +++ b/variants/gemma_m0/variant.h @@ -85,11 +85,11 @@ extern "C" #define PIN_LED3 PIN_LED_TXL #define LED_BUILTIN PIN_LED_13 // DotStar LED -#define INTERNAL_DS_DATA 3 -#define INTERNAL_DS_CLK 4 -#define PIN_DOTSTAR_DATA 3 -#define PIN_DOTSTAR_CLK 4 -#define DOTSTAR_NUM 1 +#define INTERNAL_DS_DATA (3u) +#define INTERNAL_DS_CLK (4u) +#define PIN_DOTSTAR_DATA (3u) +#define PIN_DOTSTAR_CLK (4u) +#define DOTSTAR_NUM (1u) /* * Analog pins diff --git a/variants/itsybitsy_m0/variant.h b/variants/itsybitsy_m0/variant.h index 46542861b..ae6a7eac0 100644 --- a/variants/itsybitsy_m0/variant.h +++ b/variants/itsybitsy_m0/variant.h @@ -81,9 +81,9 @@ extern "C" #define PIN_LED PIN_LED_13 #define LED_BUILTIN PIN_LED_13 // DotStar LED -#define PIN_DOTSTAR_DATA 41 -#define PIN_DOTSTAR_CLK 40 -#define DOTSTAR_NUM 1 +#define PIN_DOTSTAR_DATA (41u) +#define PIN_DOTSTAR_CLK (40u) +#define DOTSTAR_NUM (1u) /* * Analog pins diff --git a/variants/itsybitsy_m4/variant.h b/variants/itsybitsy_m4/variant.h index 6510d250a..da7736074 100644 --- a/variants/itsybitsy_m4/variant.h +++ b/variants/itsybitsy_m4/variant.h @@ -85,9 +85,9 @@ extern "C" #define PIN_LED PIN_LED_13 #define LED_BUILTIN PIN_LED_13 // DotStar LED -#define PIN_DOTSTAR_DATA 8 -#define PIN_DOTSTAR_CLK 6 -#define DOTSTAR_NUM 1 +#define PIN_DOTSTAR_DATA (8u) +#define PIN_DOTSTAR_CLK (6u) +#define DOTSTAR_NUM (1u) /* * Analog pins diff --git a/variants/trinket_m0/variant.h b/variants/trinket_m0/variant.h index e76dc3107..af311f983 100644 --- a/variants/trinket_m0/variant.h +++ b/variants/trinket_m0/variant.h @@ -85,11 +85,11 @@ extern "C" #define PIN_LED3 PIN_LED_TXL #define LED_BUILTIN PIN_LED_13 // DotStar LED -#define INTERNAL_DS_DATA 7 -#define INTERNAL_DS_CLK 8 -#define PIN_DOTSTAR_DATA 7 -#define PIN_DOTSTAR_CLK 8 -#define DOTSTAR_NUM 1 +#define INTERNAL_DS_DATA (7u) +#define INTERNAL_DS_CLK (8u) +#define PIN_DOTSTAR_DATA (7u) +#define PIN_DOTSTAR_CLK (8u) +#define DOTSTAR_NUM (1u) /* * Analog pins