Jens Altenburg / Mbed 2 deprecated Fachbuch_Initialisierungen

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers oled.h Source File

oled.h

00001 #if 1
00002 /**
00003  * SSD1306xLED - Library for the SSD1306 based OLED/PLED 128x64 displays
00004  *
00005  * @author Neven Boyanov
00006  *
00007  * This is part of the Tinusaur/SSD1306xLED project.
00008  *
00009  * Copyright (c) 2018 Neven Boyanov, The Tinusaur Team. All Rights Reserved.
00010  * Distributed as open source software under MIT License, see LICENSE.txt file.
00011  * Retain in your source code the link http://tinusaur.org to the Tinusaur project.
00012  *
00013  * Source code available at: https://bitbucket.org/tinusaur/ssd1306xled
00014  *
00015  */
00016 
00017 #ifndef SSD1306XLED_H
00018 #define SSD1306XLED_H
00019 
00020 #include "main.h"
00021 
00022 // ============================================================================
00023 
00024 // -----(+)-------------------->-----> [Vcc]    Pin 1 on the SSD1306 display board
00025 // -----(-)-------------------->-----> [GND]    Pin 2 on the SSD1306 display board
00026 #define SSD1306_SCL     PB2   // ----> [SCL]    Pin 3 on the SSD1306 display board
00027 #define SSD1306_SDA     PB0   // ----> [SDA]    Pin 4 on the SSD1306 display board
00028 
00029 #define SSD1306_SADDR   0x78  // Display IC2 slave address, default 0x78
00030 
00031 // ----------------------------------------------------------------------------
00032 
00033 #define ssd1306_clear() ssd1306_fill4(0, 0, 0, 0)
00034 #define ssd1306_fill(p) ssd1306_fill4(p, p, p, p)
00035 #define ssd1306_fill2(p1, p2) ssd1306_fill4(p1, p2, p1, p2)
00036 
00037 // ----------------------------------------------------------------------------
00038 
00039 //void ssd1306_init(void);
00040 void vOledInit(void);
00041 void ssd1306_setpos(byte x, byte y);
00042 void ssd1306_fill4(byte, byte, byte, byte);
00043 void ssd1306tx_char(byte );
00044 void ssd1306tx_large(byte, byte, byte );
00045 
00046 // ============================================================================
00047 
00048 #endif 
00049 
00050 #endif