Created
October 29, 2017 08:28
-
-
Save electronut/e80b6666676f37e000be06ed2ba2a2ff to your computer and use it in GitHub Desktop.
stm32-conway.h
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
class Conway64 { | |
public: | |
Conway64(SPI_HandleTypeDef* hSPI); | |
virtual ~Conway64(); | |
// initialize | |
void init(); | |
// add glider with top left cell at (i, j) | |
void addGlider(int i, int j); | |
void addBlinker(int i, int j); | |
// update simulation | |
void update(); | |
// render to LED grid | |
void render(); | |
// signal to thread | |
void signal(); | |
// test init SPI | |
void testInit(); | |
// test SPI | |
void test(); | |
private: | |
BitBuf88 _grid; | |
MAX7219* _max7219; | |
osThreadId _conwayTaskHandle; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment