|
SSD1306 Driver for TivaC
SSD1306 i2c driver for use with Texas Instrument TivaC
|
Source file implementing main ssd1306 driver function. More...
#include "ssd1306.h"#include <assert.h>#include <stdbool.h>#include <stdint.h>#include <stdio.h>#include <string.h>#include "inc/hw_i2c.h"#include "inc/hw_ints.h"#include "inc/hw_memmap.h"#include "inc/hw_types.h"#include "driverlib/gpio.h"#include "driverlib/i2c.h"#include "driverlib/interrupt.h"#include "driverlib/pin_map.h"#include "driverlib/sysctl.h"#include "driverlib/uart.h"#include "oled_font.h"#include "ssd1306_info.h"#include "ssd1306_utils.h"
Functions | |
| void | ssd1306Init (void) |
| Configure the hardware like I2C module to be ready for talking with SSD1306. | |
| void | ssd1306SwitchDisplay (const bool isOn) |
| Turn display on or off. More... | |
| void | ssd1306TurnOn (const bool isFirstTime) |
| Initialize the ssd1306. More... | |
| void | ssd1306AdjustContrast (const uint8_t contrastVal) |
| Adjust contrast of the OLED screen. More... | |
| void | ssd1306ClearDisplay (void) |
| Clear the display and makes it all black. More... | |
| void | ssd1306SwitchLine (const uint32_t lineNum) |
| Change the target line to print. More... | |
| void | ssd1306PrintPic (const uint8_t *picBitmap, const uint32_t startColCoordinate, const uint32_t endColCoordinate, const uint32_t startPageCoordinate, const uint32_t endPageCoordinate) |
| Print picture on oled screen. More... | |
| void | ssd1306PrintString (const char *stringToPrint, const uint32_t lineNum, const uint32_t startCol, const fontSetDesc fontSet) |
| Print string onto oled screen. More... | |
Source file implementing main ssd1306 driver function.
| void ssd1306AdjustContrast | ( | const uint8_t | contrastVal | ) |
Adjust contrast of the OLED screen.
| contrastVal | The contrast value to be set, limited up to 255 |
| void ssd1306ClearDisplay | ( | void | ) |
Clear the display and makes it all black.
Works by blanking the GDDRAM data with 0
| void ssd1306PrintPic | ( | const uint8_t * | picBitmap, |
| const uint32_t | startColCoordinate, | ||
| const uint32_t | endColCoordinate, | ||
| const uint32_t | startPageCoordinate, | ||
| const uint32_t | endPageCoordinate | ||
| ) |
Print picture on oled screen.
| picBitmap | Arrays containing the bitmap of the picture |
| startColCoordinate | Column to start printing |
| endColCoordinate | Column to stop printing(inclusive) |
| startPageCoordinate | Page to start printing |
| endPageCoordinate | Page to stop printing(inclusive) |
| void ssd1306PrintString | ( | const char * | stringToPrint, |
| const uint32_t | lineNum, | ||
| const uint32_t | startCol, | ||
| const fontSetDesc | fontSet | ||
| ) |
Print string onto oled screen.
| stringToPrint | Character array containing string to print |
| lineNum | The line at which to print(start at 0), limited by SSD1306_MAX_LINE |
| startCol | Column at which to start printing |
| fontSet | The struct containing the font set descriptor for fonts to be used |
| void ssd1306SwitchDisplay | ( | const bool | isOn | ) |
Turn display on or off.
| isOn | Display on if true |
| void ssd1306SwitchLine | ( | const uint32_t | lineNum | ) |
Change the target line to print.
| lineNum | The line to change to, limited by SSD1306_MAX_LINE |
| void ssd1306TurnOn | ( | const bool | isFirstTime | ) |
Initialize the ssd1306.
Do things like configure charge pump, and other require settings to starting up the display
1.8.13