SSD1306 Driver for TivaC
SSD1306 i2c driver for use with Texas Instrument TivaC
Enumerations | Functions
ssd1306_utils.h File Reference

Header file containg declaration of utils functions for ssd1306. More...

#include <stdint.h>
Include dependency graph for ssd1306_utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  Ssd1306ComType { COMMAND = 0b0000000, GDDRAM_DATA = 0b01000000 }
 Enum describing the type of communication that can be done with the SSD1306.
 

Functions

void ssd1306Write (const Ssd1306ComType comType, const uint8_t dataByte)
 Single I2C write to the SSD1306. More...
 
void ssd1306WriteList (const Ssd1306ComType comType, const uint8_t dataByte[], const uint32_t totalByte)
 List I2C write to the SSD1306. More...
 
void ssd1306WaitMaster (void)
 Helper function to wait for master to finnish i2c.
 
void ssd1306WaitBus (void)
 Helper function to wait for all transaction on the i2c bus to finnish.
 
void ssd1306BeginCom (const Ssd1306ComType comType)
 Helper function uses for making i2c transaction to initiate contact with ssd1306. More...
 
void ssd1306EndCom (const uint8_t lastByteToSend)
 Helper function uses for ending i2c transaction. More...
 
void ssd1306ContinueCom (const uint8_t dataToSend)
 Transfer the data and let SSD1306 know transaction will still continue. More...
 
void setColumnRange (const uint32_t startColCoordinate, const uint32_t endColCoordinate)
 Set the Column Range that can be printed on OLED. More...
 
void setPageRange (const uint32_t startPageCoordinate, const uint32_t endPageCoordinate)
 Set the Page Range that can be printed on OLED. More...
 

Detailed Description

Header file containg declaration of utils functions for ssd1306.

Author
Khoi Trinh
Version
0.1
Date
2018-11-03

Function Documentation

◆ setColumnRange()

void setColumnRange ( const uint32_t  startColCoordinate,
const uint32_t  endColCoordinate 
)

Set the Column Range that can be printed on OLED.

Parameters
startColCoordinateColumn to start printing
endColCoordinateColumn to stop printing(inclusive)

◆ setPageRange()

void setPageRange ( const uint32_t  startPageCoordinate,
const uint32_t  endPageCoordinate 
)

Set the Page Range that can be printed on OLED.

Parameters
startPageCoordinatePage to start printing
endPageCoordinatePage to stop printing(inclusive)

◆ ssd1306BeginCom()

void ssd1306BeginCom ( const Ssd1306ComType  comType)

Helper function uses for making i2c transaction to initiate contact with ssd1306.

Parameters
comTypeCommunication type of this transaction

◆ ssd1306ContinueCom()

void ssd1306ContinueCom ( const uint8_t  dataToSend)

Transfer the data and let SSD1306 know transaction will still continue.

Parameters
dataToSendThe data byte to be sent

◆ ssd1306EndCom()

void ssd1306EndCom ( const uint8_t  lastByteToSend)

Helper function uses for ending i2c transaction.

Parameters
lastByteToSendThe last byte to be sent

◆ ssd1306Write()

void ssd1306Write ( const Ssd1306ComType  comType,
const uint8_t  dataByte 
)

Single I2C write to the SSD1306.

Parameters
comTypeCommunication type of this transaction
dataByteThe data byte to be written

◆ ssd1306WriteList()

void ssd1306WriteList ( const Ssd1306ComType  comType,
const uint8_t  dataByte[],
const uint32_t  totalByte 
)

List I2C write to the SSD1306.

Parameters
comTypeCommunication type of this transaction
dataByteList containing the bytes to be transferred
totalByteTotal bytes to be transferred