Created
October 29, 2017 08:32
-
-
Save electronut/444e3ff2f39a9516a3775012d66db377 to your computer and use it in GitHub Desktop.
stm32-conway-task.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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