Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding EPD Feather #3

Merged
merged 2 commits into from
Apr 11, 2023
Merged
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
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,20 @@ Implemented interfaces:

</details>

### Adafruit Feather ThinkInk RP2040
<details>

Implemented interfaces:
- GPIO
- ADC
- PWM
- UART0
- I2C0 & I2C1
- SPI0 & SPI1
- WS2812B

</details>

### Adafruit Qt Py RP2040
<details>

Expand Down
3 changes: 3 additions & 0 deletions firmware/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ SUBSYSTEM=="usb", ATTR{idVendor}=="239a", ATTR{idProduct}=="00f7", MODE="0666"
KERNEL=="hidraw*", ATTRS{idVendor}=="cafe", ATTRS{idProduct}=="4005", TAG+="uaccess", GROUP="plugdev", MODE="0660"
# Adafruit Feather
KERNEL=="hidraw*", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="00f1", TAG+="uaccess", GROUP="plugdev", MODE="0660"
# Adafruit Feather ThinkInk
KERNEL=="hidraw*", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="812C", TAG+="uaccess", GROUP="plugdev", MODE="0660"
# Adafruit ItsyBitsy
KERNEL=="hidraw*", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="00fd", TAG+="uaccess", GROUP="plugdev", MODE="0660"
# Adafruit QT2040 Trinkey
Expand Down Expand Up @@ -64,6 +66,7 @@ The firmware to upload to Pico is u2if/firmware/source/build/u2if.uf2
Compatible board can be:
- PICO
- FEATHER
- FEATHER_EPD
- ITSYBITSY
- QTPY
- QT2040_TRINKEY
Expand Down
1 change: 1 addition & 0 deletions firmware/build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ build feather FEATHER 0 0 1000 0
build itsybitsy ITSYBITSY 0 0 1000 0
build qtpy QTPY 0 0 1000 0
build qt2040_trinkey QT2040_TRINKEY 0 0 1000 0
build feather_epd FEATHER_EPD 0 1 1 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 FEATHER_EPD ITSYBITSY QTPY QT2040_TRINKEY)
message(STATUS "Selected board:'${BOARD}'")

# might help for feather?
Expand Down
28 changes: 28 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 FEATHER_EPD 6

#define BOARD ${BOARD}

Expand Down Expand Up @@ -131,6 +132,33 @@
#define U2IF_UART0_TX 1
#define U2IF_UART0_RX 2

//---------------------------------------------------------
// Feather ThinkInk
//---------------------------------------------------------
#elif BOARD == FEATHER_EPD
// I2C0
#define I2C0_ENABLED 1
#define U2IF_I2C0_SDA 4
#define U2IF_I2C0_SCL 5
// I2C1
#define I2C1_ENABLED 1
#define U2IF_I2C1_SDA 2
#define U2IF_I2C1_SCL 3
// SPI0
#define SPI0_ENABLED 1
#define U2IF_SPI0_CK 22
#define U2IF_SPI0_MOSI 23
#define U2IF_SPI0_MISO 99
// SPI1
#define SPI1_ENABLED 1
#define U2IF_SPI1_CK 14
#define U2IF_SPI1_MOSI 15
#define U2IF_SPI1_MISO 8
// UART0
#define UART0_ENABLED 1
#define U2IF_UART0_TX 0
#define U2IF_UART0_RX 1

//---------------------------------------------------------
// Pico (default)
//---------------------------------------------------------
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 @@ -44,6 +44,11 @@
#define USB_PRD "Feather RP2040 U2IF"
#define USB_VID 0x239A
#define USB_PID 0x00F1
#elif BOARD == FEATHER_EPD
#define USB_MFG "Adafruit"
#define USB_PRD "Feather RP2040 ThinkInk U2IF"
#define USB_VID 0x239A
#define USB_PID 0x812C
#elif BOARD == ITSYBITSY
#define USB_MFG "Adafruit"
#define USB_PRD "ItsyBitsy RP2040 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 @@ -8,6 +8,7 @@
# (VID, PID)
(0xcafe, 0x4005), # pico
(0x239a, 0x00f1), # Adafruit Feather
(0x239a, 0x812C), # Adafruit Feather ThinkInk
(0x239a, 0x00fd), # Adafruit ItsyBitsy
(0x239a, 0x0109), # Adafruit QT2040 Trinket
(0x239a, 0x00f7), # Adafruit QTPY
Expand Down