Skip to content

Commit

Permalink
add WeAct BlackPill V2.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
moononournation committed Apr 12, 2021
1 parent 9e7fc7b commit de42e0a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ This library is not putting speed at the first priority, but still paid much eff
- ESP8266 Series
- ESP32 Series
- rtlduino
- WeAct BlackPill V2.0 (BlackPill F411CE)

## Tobe Support Dev Board
- Arduino ATMega2560
Expand Down
19 changes: 10 additions & 9 deletions examples/PDQgraphicstest/PDQgraphicstest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,18 @@ Arduino_GFX *gfx = new Arduino_ST7789(bus, -1 /* RST */, 2 /* rotation */, true

#else /* not selected specific hardware */

#if defined(ESP32)
#define TFT_CS 5
// #define TFT_CS -1 // for display without CS pin
// #define TFT_DC 16
#define TFT_DC 27
// #define TFT_DC -1 // for display without DC pin (9-bit SPI)
// #define TFT_RST 17
#if defined(ARDUINO_BLACKPILL_F411CE)
#define TFT_CS 4 // -1 for display without CS pin
#define TFT_DC 3
#define TFT_RST 2
#define TFT_BL 1
#elif defined(ESP32)
#define TFT_CS 5 // -1 for display without CS pin
#define TFT_DC 27 // -1 for display without DC pin (9-bit SPI)
#define TFT_RST 33
#define TFT_BL 22
#elif defined(ESP8266)
#define TFT_CS 15
#define TFT_CS 15 // -1 for display without CS pin
#define TFT_DC 4
#define TFT_RST 2
#define TFT_BL 5
Expand All @@ -81,7 +82,7 @@ Arduino_GFX *gfx = new Arduino_ST7789(bus, -1 /* RST */, 2 /* rotation */, true
#define TFT_RST 22
#define TFT_BL 23
#else
#define TFT_CS 9
#define TFT_CS 9 // -1 for display without CS pin
#define TFT_DC 8
#define TFT_RST 7
#define TFT_BL 6
Expand Down
7 changes: 5 additions & 2 deletions src/Arduino_DataBus.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ typedef uint32_t ARDUINOGFX_PORT_t;
#define ESP8266SAFEBATCHBITSIZE (2048 * 8 * 9)
#define USE_FAST_PINIO ///< Use direct PORT register access
typedef uint32_t ARDUINOGFX_PORT_t;
#elif defined(ARDUINO_STM32_FEATHER)
// TODO: fast pin IO?
#elif defined(ARDUINO_ARCH_STM32)
#define USE_FAST_PINIO ///< Use direct PORT register access
typedef uint32_t ARDUINOGFX_PORT_t;
#elif defined(__arm__)
#if defined(ARDUINO_ARCH_SAMD)
// Adafruit M0, M4
Expand Down Expand Up @@ -81,6 +82,8 @@ typedef volatile ARDUINOGFX_PORT_t *PORTreg_t;
#define SPI_DEFAULT_FREQ 80000000
#elif defined(ARDUINO_ARCH_STM32F1)
#define SPI_DEFAULT_FREQ 36000000
#elif defined(ARDUINO_BLACKPILL_F411CE)
#define SPI_DEFAULT_FREQ 50000000
#else
#define SPI_DEFAULT_FREQ 24000000 ///< Default SPI data clock frequency
#endif
Expand Down
5 changes: 5 additions & 0 deletions src/Arduino_GFX_Library.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@
#define TFT_DC 8
#define TFT_RST 7
#define TFT_BL 6
#elif defined(ARDUINO_BLACKPILL_F411CE)
#define TFT_CS 4
#define TFT_DC 3
#define TFT_RST 2
#define TFT_BL 1
#elif defined(ESP32)
#define TFT_SCK 18
#define TFT_MOSI 23
Expand Down

0 comments on commit de42e0a

Please sign in to comment.