Skip to content

Commit

Permalink
fix ESP32C3 compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
moononournation committed Jun 22, 2023
1 parent be7bd81 commit 0af19f3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/databus/Arduino_ESP32QSPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ bool Arduino_ESP32QSPI::begin(int32_t speed, int8_t dataMode)

pinMode(_cs, OUTPUT);
digitalWrite(_cs, HIGH); // disable chip select
#if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3)
if (_cs >= 32)
{
_csPinMask = digitalPinToBitMask(_cs);
_csPortSet = (PORTreg_t)&GPIO.out1_w1ts.val;
_csPortClr = (PORTreg_t)&GPIO.out1_w1tc.val;
}
else
#endif
if (_cs != GFX_NOT_DEFINED)
{
_csPinMask = digitalPinToBitMask(_cs);
_csPortSet = (PORTreg_t)&GPIO.out_w1ts;
Expand Down

0 comments on commit 0af19f3

Please sign in to comment.