29 #if defined(YOUR_PLATFORM) 34 #if defined(CONFIG_PLATFORM_I2C_AVAILABLE) && defined(CONFIG_PLATFORM_I2C_ENABLE) 35 static uint8_t s_i2c_addr = 0x3C;
37 static void platform_i2c_start(
void)
42 static void platform_i2c_stop(
void)
47 static void platform_i2c_send(uint8_t data)
52 static void platform_i2c_close(
void)
57 static void platform_i2c_send_buffer(
const uint8_t *data, uint16_t len)
64 if (addr) s_i2c_addr = addr;
78 #if defined(CONFIG_PLATFORM_SPI_AVAILABLE) && defined(CONFIG_PLATFORM_SPI_ENABLE) 82 static void platform_spi_start(
void)
87 static void platform_spi_stop(
void)
92 static void platform_spi_send(uint8_t data)
97 static void platform_spi_close(
void)
102 static void platform_spi_send_buffer(
const uint8_t *data, uint16_t len)
124 #endif // YOUR_PLATFORM
void ssd1306_platform_spiInit(int8_t busId, int8_t cesPin, int8_t dcPin)
Initializes spi interface for platform being used.
void(* send)(uint8_t data)
void ssd1306_platform_i2cInit(int8_t busId, uint8_t addr, ssd1306_platform_i2cConfig_t *cfg)
Initializes i2c interface for platform being used.
void(* close)(void)
deinitializes internal resources, allocated for interface.
ssd1306_interface_t ssd1306_intf
void(* send_buffer)(const uint8_t *buffer, uint16_t size)
Sends bytes to SSD1306 device.