Skip to content

Instantly share code, notes, and snippets.

@electronut
Created October 29, 2017 08:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save electronut/444e3ff2f39a9516a3775012d66db377 to your computer and use it in GitHub Desktop.
Save electronut/444e3ff2f39a9516a3775012d66db377 to your computer and use it in GitHub Desktop.
stm32-conway-task.cpp
// The Conway Task function
void conwayTaskFunc(void const * arg)
{
// The Joy of C++
Conway64* conway = const_cast<Conway64*>(static_cast<const Conway64*>(arg));
// enable for testing only
//conway->testInit();
// add a glider object
conway->addGlider(0, 0);
// draw it
conway->render();
// task loop
for(;;)
{
// wait for signal
osSignalWait (0x0001, osWaitForever);
// draw
conway->update();
// slight delay
osDelay(1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment