Jens Altenburg
/
Fachbuch_Initialisierungen
Initialisation Nucleo-F446 by Jens Altenburg
oled.h@0:9b6fbe273511, 2021-03-17 (annotated)
- Committer:
- prof_al
- Date:
- Wed Mar 17 13:55:03 2021 +0000
- Revision:
- 0:9b6fbe273511
Hardware Abstraction Layer (HAL) Nucleo-F446
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
prof_al | 0:9b6fbe273511 | 1 | #if 1 |
prof_al | 0:9b6fbe273511 | 2 | /** |
prof_al | 0:9b6fbe273511 | 3 | * SSD1306xLED - Library for the SSD1306 based OLED/PLED 128x64 displays |
prof_al | 0:9b6fbe273511 | 4 | * |
prof_al | 0:9b6fbe273511 | 5 | * @author Neven Boyanov |
prof_al | 0:9b6fbe273511 | 6 | * |
prof_al | 0:9b6fbe273511 | 7 | * This is part of the Tinusaur/SSD1306xLED project. |
prof_al | 0:9b6fbe273511 | 8 | * |
prof_al | 0:9b6fbe273511 | 9 | * Copyright (c) 2018 Neven Boyanov, The Tinusaur Team. All Rights Reserved. |
prof_al | 0:9b6fbe273511 | 10 | * Distributed as open source software under MIT License, see LICENSE.txt file. |
prof_al | 0:9b6fbe273511 | 11 | * Retain in your source code the link http://tinusaur.org to the Tinusaur project. |
prof_al | 0:9b6fbe273511 | 12 | * |
prof_al | 0:9b6fbe273511 | 13 | * Source code available at: https://bitbucket.org/tinusaur/ssd1306xled |
prof_al | 0:9b6fbe273511 | 14 | * |
prof_al | 0:9b6fbe273511 | 15 | */ |
prof_al | 0:9b6fbe273511 | 16 | |
prof_al | 0:9b6fbe273511 | 17 | #ifndef SSD1306XLED_H |
prof_al | 0:9b6fbe273511 | 18 | #define SSD1306XLED_H |
prof_al | 0:9b6fbe273511 | 19 | |
prof_al | 0:9b6fbe273511 | 20 | #include "main.h" |
prof_al | 0:9b6fbe273511 | 21 | |
prof_al | 0:9b6fbe273511 | 22 | // ============================================================================ |
prof_al | 0:9b6fbe273511 | 23 | |
prof_al | 0:9b6fbe273511 | 24 | // -----(+)-------------------->-----> [Vcc] Pin 1 on the SSD1306 display board |
prof_al | 0:9b6fbe273511 | 25 | // -----(-)-------------------->-----> [GND] Pin 2 on the SSD1306 display board |
prof_al | 0:9b6fbe273511 | 26 | #define SSD1306_SCL PB2 // ----> [SCL] Pin 3 on the SSD1306 display board |
prof_al | 0:9b6fbe273511 | 27 | #define SSD1306_SDA PB0 // ----> [SDA] Pin 4 on the SSD1306 display board |
prof_al | 0:9b6fbe273511 | 28 | |
prof_al | 0:9b6fbe273511 | 29 | #define SSD1306_SADDR 0x78 // Display IC2 slave address, default 0x78 |
prof_al | 0:9b6fbe273511 | 30 | |
prof_al | 0:9b6fbe273511 | 31 | // ---------------------------------------------------------------------------- |
prof_al | 0:9b6fbe273511 | 32 | |
prof_al | 0:9b6fbe273511 | 33 | #define ssd1306_clear() ssd1306_fill4(0, 0, 0, 0) |
prof_al | 0:9b6fbe273511 | 34 | #define ssd1306_fill(p) ssd1306_fill4(p, p, p, p) |
prof_al | 0:9b6fbe273511 | 35 | #define ssd1306_fill2(p1, p2) ssd1306_fill4(p1, p2, p1, p2) |
prof_al | 0:9b6fbe273511 | 36 | |
prof_al | 0:9b6fbe273511 | 37 | // ---------------------------------------------------------------------------- |
prof_al | 0:9b6fbe273511 | 38 | |
prof_al | 0:9b6fbe273511 | 39 | //void ssd1306_init(void); |
prof_al | 0:9b6fbe273511 | 40 | void vOledInit(void); |
prof_al | 0:9b6fbe273511 | 41 | void ssd1306_setpos(byte x, byte y); |
prof_al | 0:9b6fbe273511 | 42 | void ssd1306_fill4(byte, byte, byte, byte); |
prof_al | 0:9b6fbe273511 | 43 | void ssd1306tx_char(byte ); |
prof_al | 0:9b6fbe273511 | 44 | void ssd1306tx_large(byte, byte, byte ); |
prof_al | 0:9b6fbe273511 | 45 | |
prof_al | 0:9b6fbe273511 | 46 | // ============================================================================ |
prof_al | 0:9b6fbe273511 | 47 | |
prof_al | 0:9b6fbe273511 | 48 | #endif |
prof_al | 0:9b6fbe273511 | 49 | |
prof_al | 0:9b6fbe273511 | 50 | #endif |