2020-12-19 08:31 PM
I am trying to assign a member function to a thread, but when I do, I get an error saying "invalid use of non-static member function 'void AudioPlayer::AudioThread(const void*)'".
2020-12-20 01:08 AM
You mix C and C++
i mean your h file is better name hpp.
And for start as thread you need C wrapper function inspire here
extern "C" void touchgfx_init();
extern "C" void touchgfx_taskEntry();
static STM32TouchController tc;
static STM32F4DMA dma;
static LCD24bpp display;
static ApplicationFontProvider fontProvider;
static Texts texts;
static TouchGFXHAL hal(dma, display, tc, 480, 1280);
void touchgfx_init()
{
Bitmap::registerBitmapDatabase(BitmapDatabase::getInstance(), BitmapDatabase::getInstanceSize());
TypedText::registerTexts(&texts);
Texts::setLanguage(0);
FontManager::setFontProvider(&fontProvider);
FrontendHeap& heap = FrontendHeap::getInstance();
(void)heap; // we need to obtain the reference above to initialize the frontend heap.
hal.initialize();
}
void touchgfx_taskEntry()
{
/*
* Main event loop. Will wait for VSYNC signal, and then process next frame. Call
* this function from your GUI task.
*
* Note This function never returns
*/
hal.taskEntry();
}