SSD1306 Driver for TivaC
SSD1306 i2c driver for use with Texas Instrument TivaC
ssd1306_utils.h
Go to the documentation of this file.
1 
11 #ifndef _SSD1306_UTILS_H
12 #define _SSD1306_UTILS_H
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 #include <stdint.h>
19 
24 typedef enum { COMMAND = 0b0000000, GDDRAM_DATA = 0b01000000 } Ssd1306ComType;
25 
32 void ssd1306Write(const Ssd1306ComType comType, const uint8_t dataByte);
40 void ssd1306WriteList(const Ssd1306ComType comType,
41  const uint8_t dataByte[],
42  const uint32_t totalByte);
43 
48 void ssd1306WaitMaster(void);
53 void ssd1306WaitBus(void);
54 
60 void ssd1306BeginCom(const Ssd1306ComType comType);
66 void ssd1306EndCom(const uint8_t lastByteToSend);
72 void ssd1306ContinueCom(const uint8_t dataToSend);
73 
80 void setColumnRange(const uint32_t startColCoordinate, const uint32_t endColCoordinate);
81 
88 void setPageRange(const uint32_t startPageCoordinate, const uint32_t endPageCoordinate);
89 
90 #ifdef __cplusplus
91 }
92 #endif
93 #endif
void ssd1306WriteList(const Ssd1306ComType comType, const uint8_t dataByte[], const uint32_t totalByte)
List I2C write to the SSD1306.
Definition: ssd1306_utils.c:78
void ssd1306EndCom(const uint8_t lastByteToSend)
Helper function uses for ending i2c transaction.
Definition: ssd1306_utils.c:65
void ssd1306BeginCom(const Ssd1306ComType comType)
Helper function uses for making i2c transaction to initiate contact with ssd1306. ...
Definition: ssd1306_utils.c:57
void ssd1306WaitMaster(void)
Helper function to wait for master to finnish i2c.
Definition: ssd1306_utils.c:102
void ssd1306ContinueCom(const uint8_t dataToSend)
Transfer the data and let SSD1306 know transaction will still continue.
Definition: ssd1306_utils.c:72
void setColumnRange(const uint32_t startColCoordinate, const uint32_t endColCoordinate)
Set the Column Range that can be printed on OLED.
Definition: ssd1306_utils.c:114
void ssd1306Write(const Ssd1306ComType comType, const uint8_t dataByte)
Single I2C write to the SSD1306.
Definition: ssd1306_utils.c:43
void ssd1306WaitBus(void)
Helper function to wait for all transaction on the i2c bus to finnish.
Definition: ssd1306_utils.c:108
Ssd1306ComType
Enum describing the type of communication that can be done with the SSD1306.
Definition: ssd1306_utils.h:24
void setPageRange(const uint32_t startPageCoordinate, const uint32_t endPageCoordinate)
Set the Page Range that can be printed on OLED.
Definition: ssd1306_utils.c:123