Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,19 @@ Implemented interfaces:

</details>

### Adafruit MacroPad RP2040
<details>

Implemented interfaces:
- GPIO
- PWM
- UART1
- I2C0
- SPI1
- WS2812B

</details>

### Adafruit Trinkey QT2040
<details>

Expand Down
3 changes: 3 additions & 0 deletions firmware/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ KERNEL=="hidraw*", ATTRS{idVendor}=="cafe", ATTRS{idProduct}=="4005", TAG+="uacc
KERNEL=="hidraw*", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="00f1", TAG+="uaccess", GROUP="plugdev", MODE="0660"
# Adafruit ItsyBitsy
KERNEL=="hidraw*", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="00fd", TAG+="uaccess", GROUP="plugdev", MODE="0660"
# Adafruit MacroPad
KERNEL=="hidraw*", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="0107", TAG+="uaccess", GROUP="plugdev", MODE="0660"
# Adafruit QT2040 Trinkey
KERNEL=="hidraw*", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="0109", TAG+="uaccess", GROUP="plugdev", MODE="0660"
# Adafruit QTPY
Expand Down Expand Up @@ -65,6 +67,7 @@ Compatible board can be:
- PICO
- FEATHER
- ITSYBITSY
- MACROPAD
- QTPY
- QT2040_TRINKEY

Expand Down
7 changes: 4 additions & 3 deletions firmware/build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ function build {
mkdir -p $RELEASE_DIR
build pico_i2s PICO 1 1 1000 0
build pico_hub75 PICO 0 1 1000 1
build feather FEATHER 0 0 1000 0
build itsybitsy ITSYBITSY 0 0 1000 0
build qtpy QTPY 0 0 1000 0
build feather FEATHER 0 1 1000 0
build itsybitsy ITSYBITSY 0 1 1000 0
build qtpy QTPY 0 1 1000 0
build qt2040_trinkey QT2040_TRINKEY 0 0 1000 0
build macropad MACROPAD 0 1 12 0

2 changes: 1 addition & 1 deletion firmware/source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pico_sdk_init()


set(BOARD "PICO" CACHE STRING "BaseName chosen by the user at CMake configure time")
set_property(CACHE BOARD PROPERTY STRINGS PICO FEATHER ITSYBITSY QTPY QT2040_TRINKEY)
set_property(CACHE BOARD PROPERTY STRINGS PICO FEATHER ITSYBITSY QTPY QT2040_TRINKEY MACROPAD)
message(STATUS "Selected board:'${BOARD}'")

# might help for feather?
Expand Down
18 changes: 18 additions & 0 deletions firmware/source/board_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define ITSYBITSY 3
#define QTPY 4
#define QT2040_TRINKEY 5
#define MACROPAD 6

#define BOARD ${BOARD}

Expand Down Expand Up @@ -132,6 +133,23 @@
#define U2IF_UART0_RX 2

//---------------------------------------------------------
// MacroPad
//---------------------------------------------------------
#elif BOARD == MACROPAD
// I2C0
#define I2C0_ENABLED 1
#define U2IF_I2C0_SDA 20
#define U2IF_I2C0_SCL 21
// SPI1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this SPI1 instead of SPI2?

#define SPI1_ENABLED 1
#define U2IF_SPI1_CK 26
#define U2IF_SPI1_MOSI 27
#define U2IF_SPI1_MISO 28
// UART1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this UART1 instead of UART0?

#define UART1_ENABLED 1
#define U2IF_UART1_TX 20
#define U2IF_UART1_RX 21
//---------------------------------------------------------
// Pico (default)
//---------------------------------------------------------
#elif BOARD == PICO
Expand Down
5 changes: 5 additions & 0 deletions firmware/source/usb_descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
#define USB_PRD "QT2040 Trinkey U2IF"
#define USB_VID 0x239A
#define USB_PID 0x0109
#elif BOARD == MACROPAD
#define USB_MFG "Adafruit"
#define USB_PRD "MacroPad RP2040 U2IF"
#define USB_VID 0x239A
#define USB_PID 0x0107
#elif BOARD == PICO
#define USB_MFG "Pico"
#define USB_PRD "U2IF"
Expand Down
1 change: 1 addition & 0 deletions source/machine/u2if.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
(0xcafe, 0x4005), # pico
(0x239a, 0x00f1), # Adafruit Feather
(0x239a, 0x00fd), # Adafruit ItsyBitsy
(0x239a, 0x0107), # Adafruit MacroPad
(0x239a, 0x0109), # Adafruit QT2040 Trinket
(0x239a, 0x00f7), # Adafruit QTPY
]
Expand Down