/* Write data to the display controller. 
This functions sets the pin D/C# before writing to the controller. Different data write function is called based on the selected interface. */
void ssd1306_write_data(uint8_t data)
/* Write data to the display controller. 
This functions sets the pin D/C# before writing to the controller. Different data write function is called based on the selected interface. */
void ssd1306_write_data(uint8_t data)
{
	spi_select_slave(&ssd1306_master, &ssd1306_slave, true);
	port_pin_set_output_level(SSD1306_DC_PIN, true);
	spi_write_buffer_wait(&ssd1306_master, &data, 1);
	spi_select_slave(&ssd1306_master, &ssd1306_slave, false);
}