HUB75: allow up to 6 panels on -S3
This commit is contained in:
@@ -600,8 +600,14 @@ BusHub75Matrix::BusHub75Matrix(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWh
|
||||
_needsRefresh = mxconfig.latch_blanking == 1;
|
||||
reversed = mxconfig.clkphase;
|
||||
|
||||
// How many panels we have connected, cap at sane value
|
||||
mxconfig.chain_length = max((uint8_t) 1, min(bc.pins[0], (uint8_t) 4)); // prevent bad data preventing boot due to low memory
|
||||
// How many panels we have connected, cap at sane value, prevent bad data preventing boot due to low memory
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(BOARD_HAS_PSRAM) // ESP32-S3: allow up to 6 panels
|
||||
mxconfig.chain_length = max((uint8_t) 1, min(bc.pins[0], (uint8_t) 6));
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP32S2) // ESP32-S2: only 2 panels due to small RAM
|
||||
mxconfig.chain_length = max((uint8_t) 1, min(bc.pins[0], (uint8_t) 2));
|
||||
#else // others: up to 4 panels
|
||||
mxconfig.chain_length = max((uint8_t) 1, min(bc.pins[0], (uint8_t) 4));
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(BOARD_HAS_PSRAM)
|
||||
if(bc.pins[0] > 4) {
|
||||
|
||||
Reference in New Issue
Block a user