void writeCommand(uint8_t c) { CLR_DC(); CLR_CS(); spiWrite(c); SET_CS(); }
void ssd1306_command(uint8_t c) { // wait until tx empty flag is set while(!(SPI0_S & SPI_S_SPTEF_MASK)); // d/c pin low for command mode. CLR_DC(); // write the command SPI0_D = c; }