libDaisy
Hardware Library for Daisy
Toggle main menu visibility
Introduction
Related Pages
Additional Resources
Electrosmith Website
Daisy Seed Product Page
Daisy Web Programmer
Daisy Seed Datasheet
DaisySP DSP Library Documentation
Daisy Forum
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
a
b
c
d
f
g
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
Related Symbols
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
u
w
Functions
Variables
Macros
_
a
b
c
d
e
f
i
l
m
n
o
p
q
r
s
t
u
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
oled_sh1106.h
Go to the documentation of this file.
1
#ifndef __OLED_SH1106_H__
2
#define __OLED_SH1106_H__
3
4
#include "
dev/oled_ssd130x.h
"
5
6
namespace
daisy
7
{
11
template
<
size_t
w
id
th,
size_t
height,
typename
Transport>
12
class
SH1106Driver
:
public
SSD130xDriver
<width, height, Transport>
13
{
14
public
:
18
void
Update
()
19
{
20
uint8_t i;
21
uint8_t high_column_addr;
22
switch
(height)
23
{
24
case
32: high_column_addr = 0x12;
break
;
25
26
default
: high_column_addr = 0x10;
break
;
27
}
28
for
(i = 0; i < (height / 8); i++)
29
{
30
this->
transport_
.SendCommand(0xB0 + i);
31
this->
transport_
.SendCommand(0x02);
32
this->
transport_
.SendCommand(high_column_addr);
33
this->
transport_
.SendData(&this->
buffer_
[width * i], width);
34
}
35
};
18
void
Update
() {
…
}
36
};
12
class
SH1106Driver
:
public
SSD130xDriver
<width, height, Transport> {
…
};
37
41
using
SH11064WireSpi128x64Driver
42
=
SH1106Driver<128, 64, SSD130x4WireSpiTransport>
;
43
47
using
SH1106I2c128x64Driver
=
SH1106Driver<128, 64, SSD130xI2CTransport>
;
48
49
};
// namespace daisy
50
51
#endif
daisy::SH1106Driver
Definition
oled_sh1106.h:13
daisy::SH1106Driver::Update
void Update()
Definition
oled_sh1106.h:18
daisy::SSD130xDriver
Definition
oled_ssd130x.h:255
daisy::SSD130xDriver::transport_
Transport transport_
Definition
oled_ssd130x.h:407
daisy::SSD130xDriver::buffer_
uint8_t buffer_[width *height/8]
Definition
oled_ssd130x.h:408
daisy
Hardware defines and helpers for daisy field platform.
Definition
index.h:2
oled_ssd130x.h
src
dev
oled_sh1106.h