hi guys
ive got a problem with a library that was working. Its a gaming library for esp32 that kurte helped with on the buffer and that's kind of the problem. in the protected part of the code you get this....
#ifdef ENABLE_Grafx_FRAMEBUFFER
// Add support for optional frame buffer
uint16_t *_pfbtft; // Optional Frame buffer
uint16_t _fbtft1_lines; // How many lines of the data is held in first allocation
uint16_t *_pfbtft2; // ON ESP32, may not be able to allocate memory in one chunk.
uint8_t _use_fbtft; // Are we in frame buffer mode?
#endif
void setAddr(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1)
__attribute__((always_inline)) {
writecommand_cont(Grafx_CASET); // Column addr set
writedata16_cont(x0); // XSTART
writedata16_cont(x1); // XEND
writecommand_cont(Grafx_PASET); // Row addr set
writedata16_cont(y0); // YSTART
writedata16_cont(y1); // YEND
}
void beginSPITransaction(uint32_t clock = Grafx_SPICLOCK) __attribute__((always_inline)) {
SPI.beginTransaction(SPISettings(clock, MSBFIRST, SPI_MODE0));
if (_csport)
*_csport &= ~_cspinmask;
}
void endSPITransaction() __attribute__((always_inline)) {
if (_csport)
*_csport |= _cspinmask;
SPI.endTransaction();
}
/// ESP STUFF ////////////////////////////////////////////////////////////////////////this function
uint16_t *mapYtoFBPtr(uint16_t y) __attribute__((always_inline)) {
if (y < _fbtft1_lines)
return &_pfbtft[y*_width];
else
return &_pfbtft2[(y-_fbtft1_lines)*_width];
}
it keeps saying that the pfbt stuff hasn't been declared in the function mapytofbptr(), even though are declared previously in the code.
Arduino: 1.8.2 (Windows 10), TD: 1.36, Board: "Adafruit ESP32 Feather, 80MHz, 921600, None"
Build options changed, rebuilding all
In file included from C:\Users\Duhjoker\Documents\PokeDune_esp\PokeDune_esp.ino:5:0:
C:\Users\Duhjoker\Documents\Arduino\libraries\GameRIot_ESP/Grafx_esp.h: In member function 'uint16_t* Grafx_esp::mapYtoFBPtr(uint16_t)':
C:\Users\Duhjoker\Documents\Arduino\libraries\GameRIot_ESP/Grafx_esp.h:572:11: error: '_fbtft1_lines' was not declared in this scope
if (y < _fbtft1_lines)
^
C:\Users\Duhjoker\Documents\Arduino\libraries\GameRIot_ESP/Grafx_esp.h:573:12: error: '_pfbtft' was not declared in this scope
return &_pfbtft[y*_width];
^
C:\Users\Duhjoker\Documents\Arduino\libraries\GameRIot_ESP/Grafx_esp.h:575:12: error: '_pfbtft2' was not declared in this scope
return &_pfbtft2[(y-_fbtft1_lines)*_width];
^