Skip to content

Commit

Permalink
add trinket m0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
ladyada committed Mar 20, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent cfc2c8f commit c1defe9
Showing 3 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Adafruit_NeoPixel_ZeroDMA.cpp
Original file line number Diff line number Diff line change
@@ -77,10 +77,11 @@ struct {
SercomRXPad padRX;
EPioType pinFunc;
} sercomTable[] = {
#ifdef ARDUINO_GEMMA_M0
#if defined(ARDUINO_GEMMA_M0)
&sercom0, SERCOM0, SERCOM0_DMAC_ID_TX, 0, 14, 2, SPI_PAD_0_SCK_1, SERCOM_RX_PAD_2, PIO_SERCOM_ALT,
#else
#ifdef ADAFRUIT_CIRCUITPLAYGROUND_M0
#elif defined(ARDUINO_TRINKET_M0)
&sercom0, SERCOM0, SERCOM0_DMAC_ID_TX, 4, 2, 3, SPI_PAD_2_SCK_3, SERCOM_RX_PAD_1, PIO_SERCOM_ALT,
#elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0)
&sercom5, SERCOM5, SERCOM5_DMAC_ID_TX, 8, A5, A4, SPI_PAD_3_SCK_1, SERCOM_RX_PAD_0, PIO_SERCOM_ALT,
&sercom0, SERCOM0, SERCOM0_DMAC_ID_TX, A2, A9, A3, SPI_PAD_2_SCK_3, SERCOM_RX_PAD_1, PIO_SERCOM_ALT,
&sercom4, SERCOM4, SERCOM4_DMAC_ID_TX, A7, 5, A6, SPI_PAD_0_SCK_1, SERCOM_RX_PAD_2, PIO_SERCOM_ALT,
@@ -91,8 +92,7 @@ struct {
&sercom1, SERCOM1, SERCOM1_DMAC_ID_TX, 11, 12, 13, SPI_PAD_0_SCK_1, SERCOM_RX_PAD_3, PIO_SERCOM,
&sercom4, SERCOM4, SERCOM4_DMAC_ID_TX, 23, 22, 24, SPI_PAD_2_SCK_3, SERCOM_RX_PAD_0, PIO_SERCOM_ALT,
&sercom5, SERCOM5, SERCOM5_DMAC_ID_TX, A5, 6, 7, SPI_PAD_0_SCK_3, SERCOM_RX_PAD_2, PIO_SERCOM_ALT,
#endif // end not ADAFRUIT_CIRCUITPLAYGROUND_M0
#endif // end not ARDUINO_GEMMA_M0
#endif
};
#define N_SERCOMS (sizeof(sercomTable) / sizeof(sercomTable[0]))

1 change: 1 addition & 0 deletions examples/strandtest/strandtest.ino
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@
// On Circuit Playground Express: 8, A2 and A7 (TX) are valid.
// On Feather M0, Arduino Zero, etc.: 5, 11, A5 and 23 (SPI MOSI).
// On GEMMA M0: pin 0.
// On Trinket M0: pin 4.
// On Metro M4: A3 (WIP - more to come)
#define PIN 8
#define NUM_PIXELS 10
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Adafruit DMA neopixel library
version=1.0.0
version=1.0.1
author=Adafruit
maintainer=Adafruit <[email protected]>
sentence=Arduino library for neopixel DMA on samd21 microcontroller

0 comments on commit c1defe9

Please sign in to comment.