Skip to content

Commit

Permalink
Merge pull request #6 from adafruit/default-pinout-with-warning
Browse files Browse the repository at this point in the history
Always provide a pinout, so that CI can proceed
  • Loading branch information
jepler authored Feb 26, 2025
2 parents dceca16 + bf21023 commit e17e2a5
Show file tree
Hide file tree
Showing 8 changed files with 1,853 additions and 2,055 deletions.
39 changes: 37 additions & 2 deletions .github/workflows/githubci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on: [pull_request, push, repository_dispatch]

jobs:
build:
strategy:
matrix:
arduino-platform: ["feather_rp2350", "metro_rp2350"]

runs-on: ubuntu-latest

steps:
Expand All @@ -20,10 +24,41 @@ jobs:
run: bash ci/actions_install.sh

- name: test platforms
run: python3 ci/build_platform.py feather_rp2350 feather_rp2350_tinyusb metro_rp2350 metro_rp2350_tinyusb
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }}

clang:
runs-on: ubuntu-latest

steps:
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: adafruit/ci-arduino
path: ci

- name: pre-install
run: bash ci/actions_install.sh
- name: clang
run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -r .
run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -e "./src/drivers/dvhstx" -e './.git' -r .

doxygen:
runs-on: ubuntu-latest

steps:
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: adafruit/ci-arduino
path: ci

- name: pre-install
run: bash ci/actions_install.sh

- name: doxygen
env:
Expand Down
12 changes: 9 additions & 3 deletions src/Adafruit_dvhstx.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ using pimoroni::DVHSTXPinout;
#if defined(PIN_CKP)
#define DVHSTX_PINOUT_DEFAULT \
{ PIN_CKP, PIN_D0P, PIN_D1P, PIN_D2P }
#else
#if !defined(DVHSTX_NO_DEFAULT_PINOUT_WARNING)
#pragma GCC warning \
"DVHSTX_PINOUT_DEFAULT is a default pinout. If you get no video display, use the correct pinout for your board."
#endif
#define DVHSTX_PINOUT_DEFAULT \
{ 12, 14, 16, 18 }
#endif

int16_t dvhstx_width(DVHSTXResolution r);
Expand Down Expand Up @@ -171,13 +178,12 @@ class DVHSTXText3 : public GFXcanvas16 {
/**************************************************************************/
/*!
@brief Instatiate a DVHSTX 8-bit canvas context for graphics
@param res Display resolution
@param double_buffered Whether to allocate two buffers
*/
/**************************************************************************/
DVHSTXText3(DVHSTXPinout pinout)
: GFXcanvas16(91, 30, false),
pinout(pinout), res{res}, attr{TextColor::TEXT_WHITE} {}
: GFXcanvas16(91, 30, false), pinout(pinout), res{},
attr{TextColor::TEXT_WHITE} {}
~DVHSTXText3() { end(); }

operator bool() const { return hstx.get_back_buffer<uint16_t>(); }
Expand Down
Loading

0 comments on commit e17e2a5

Please sign in to comment.