15 : Adafruit_GFX(static_cast<int16_t>(w), static_cast<int16_t>(h)),
16 stride_(static_cast<uint16_t>((w + 7) / 8)) {
17 const size_t bytes =
static_cast<size_t>(stride_) * h;
18 if (bytes == 0)
return;
19 bits_ =
static_cast<uint8_t*
>(heap_caps_malloc(bytes, MALLOC_CAP_SPIRAM));
20 if (bits_) std::memset(bits_, 0, bytes);