|
ssd1306xled 1.0.0
SSD1306/SSD1315/SSH1106 OLED driver for ATtiny85
|
Driver for SSD1306, SSD1315, and SSH1106 OLED displays. More...
#include <stdint.h>#include <Arduino.h>#include <util/delay.h>

Go to the source code of this file.
Data Structures | |
| class | SSD1306Device |
| Driver for SSD1306-family OLED displays over bit-banged I2C. More... | |
Macros | |
| #define | _SSD1306XLED_TINY_INIT_SUPPORTED_ |
| #define | _SSD1306XLED_INIT_VERTICAL_SUPPORTED_ |
| #define | SSD1306_SCL PB2 |
| #define | SSD1306_SDA PB0 |
| #define | SSD1306_SA 0X3C |
| #define | DDR_USI DDRB |
| #define | PORT_USI PORTB |
| #define | PIN_USI PINB |
| #define | PORT_USI_SDA PORTB0 |
| #define | PORT_USI_SCL PORTB2 |
| #define | PIN_USI_SDA PINB0 |
| #define | PIN_USI_SCL PINB2 |
| #define | DDR_USI_CL DDR_USI |
| #define | PORT_USI_CL PORT_USI |
| #define | PIN_USI_CL PIN_USI |
| #define | TWI_FAST_MODE |
| #define | DELAY_T2TWI (_delay_us(2)) |
| #define | DELAY_T4TWI (_delay_us(1)) |
| #define | TWI_NACK_BIT 0 |
| #define | SSD1306_COMMAND 0x00 |
| #define | SSD1306_DATA 0x40 |
| #define | SSD1306_NO_FONT_6X8 |
| #define | SSD1306_NO_FONT_8X16 |
| #define | SSD1306_NO_DRAW_BMP |
| #define | SSD1306_QUICK_BEGIN |
Variables | |
| const unsigned char | USISR_8bit = 1<<USISIF | 1<<USIOIF | 1<<USIPF | 1<<USIDC | 0x0<<USICNT0 |
| const unsigned char | USISR_1bit = 1<<USISIF | 1<<USIOIF | 1<<USIPF | 1<<USIDC | 0xE<<USICNT0 |
| SSD1306Device | SSD1306 |
| Global driver instance. | |
Driver for SSD1306, SSD1315, and SSH1106 OLED displays.
Bit-bangs I2C via the ATtiny85 USI peripheral. No Wire library needed – saves about 1 KB of flash compared to TinyWireM. Works on any AVR with USI by redefining the pin macros.
Originally by Neven Boyanov (Tinusaur). I2C rewrite based on TinyI2C by David Johnson-Davies. Maintained by Tejashwi Kalp Taru.
| #define _SSD1306XLED_INIT_VERTICAL_SUPPORTED_ |
| #define _SSD1306XLED_TINY_INIT_SUPPORTED_ |
| #define DDR_USI DDRB |
| #define DDR_USI_CL DDR_USI |
| #define DELAY_T2TWI (_delay_us(2)) |
| #define DELAY_T4TWI (_delay_us(1)) |
| #define PIN_USI PINB |
| #define PIN_USI_CL PIN_USI |
| #define PIN_USI_SCL PINB2 |
| #define PIN_USI_SDA PINB0 |
| #define PORT_USI PORTB |
| #define PORT_USI_CL PORT_USI |
| #define PORT_USI_SCL PORTB2 |
| #define PORT_USI_SDA PORTB0 |
| #define SSD1306_COMMAND 0x00 |
I2C control byte: next bytes are commands.
| #define SSD1306_DATA 0x40 |
I2C control byte: next bytes are display data.
| #define TWI_FAST_MODE |
| #define TWI_NACK_BIT 0 |
|
extern |
Global driver instance.
Use this to call all display functions. Do not create additional instances.
| const unsigned char USISR_1bit = 1<<USISIF | 1<<USIOIF | 1<<USIPF | 1<<USIDC | 0xE<<USICNT0 |
| const unsigned char USISR_8bit = 1<<USISIF | 1<<USIOIF | 1<<USIPF | 1<<USIDC | 0x0<<USICNT0 |