SSD1306 I2C Display Driver
1.2.2
This library is developed to control SSD1306 I2C OLED Display
src
ssd1306_i2c_conf.h
1
/*
2
Copyright (C) 2016-2017 Alexey Dynda
3
4
This file is part of SSD1306 library.
5
6
This program is free software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#ifndef _SSD1306_I2C_CONF_H_
21
#define _SSD1306_I2C_CONF_H_
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
27
// Uncomment this block only, if you need to use "embedded" I2C on Atmega controllers
28
// #define SSD1306_EMBEDDED_I2C
29
30
#ifndef SSD1306_SA
31
36
#define SSD1306_SA 0x3C // Slave address
37
#endif
38
39
#if defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
40
#ifndef SSD1306_EMBEDDED_I2C
41
44
#define SSD1306_EMBEDDED_I2C
45
#endif
46
#endif
47
48
#if defined(__AVR_ATtiny25__) | defined(__AVR_ATtiny45__) | defined(__AVR_ATtiny85__)
49
#ifndef SSD1306_SCL
50
#define SSD1306_SCL PB3 // SCL, Pin 3 on SSD1306 Board
51
#endif
52
#ifndef SSD1306_SDA
53
#define SSD1306_SDA PB4 // SDA, Pin 4 on SSD1306 Board
54
#endif
55
#else
56
#ifndef SSD1306_SCL
57
#define SSD1306_SCL 5 // SCL, Pin A5 on SSD1306 Board
58
#endif
59
#ifndef SSD1306_SDA
60
#define SSD1306_SDA 4 // SDA, Pin A4 on SSD1306 Board
61
#endif
62
#endif
63
64
#ifdef __cplusplus
65
}
66
#endif
67
68
#endif
Generated by
1.8.12