Skip to content

Commit a316ca9

Browse files
wwhheerreekartben
authored andcommitted
boards: shields: Add support for Abrobot esp32c3 oled board
Abrobot esp32c3 oled only works with sh1106_compatible display driver. It does not support 1306 display driver commands. Its screen resolution is 72x40. Its screen start position is 30, 12. Signed-off-by: Rick Cai <wwhheerree@hotmail.com>
1 parent a0fddf6 commit a316ca9

File tree

4 files changed

+70
-0
lines changed

4 files changed

+70
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2024 Rick Cai <wwhheerree@hotmail.com>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SHIELD_SH1106_72X40
5+
def_bool $(shields_list_contains,sh1106_72x40)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright (c) 2024 Rick Cai <wwhheerree@hotmail.com>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
chosen {
9+
zephyr,display = &abrobot_72x40;
10+
};
11+
};
12+
13+
&i2c0 {
14+
status = "okay";
15+
clock-frequency = <I2C_BITRATE_STANDARD>;
16+
pinctrl-0 = <&i2c0_default>;
17+
pinctrl-names = "default";
18+
19+
abrobot_72x40: ssd1306@3c {
20+
compatible = "sinowealth,sh1106";
21+
reg = <0x3c>;
22+
width = <72>;
23+
height = <40>;
24+
segment-offset = <30>;
25+
page-offset = <0>;
26+
display-offset = <0xC>;
27+
multiplex-ratio = <0x27>;
28+
prechargep = <0x22>;
29+
ready-time-ms = <10>;
30+
segment-remap;
31+
com-invdir;
32+
use-internal-iref;
33+
};
34+
};
Binary file not shown.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
.. _abrobot_esp32c3oled_shield:
2+
3+
Abrobot ESP32 C3 OLED Shield
4+
############################
5+
6+
Overview
7+
********
8+
9+
.. figure:: abrobot_esp32c3_oled.webp
10+
:align: center
11+
:alt: Abrobot ESP32 C3 OLED Shield
12+
13+
Abrobot esp32c3 oled only works with sh1106_compatible display driver. It does not support 1306 display driver commands.
14+
Its screen resolution is 72x40.
15+
Its screen start position is 30, 12.
16+
17+
Requirements
18+
************
19+
20+
This shield can only be used with esp32c3_042_oled board.
21+
22+
Programming
23+
***********
24+
25+
Set ``-b esp32c3_042_oled --shield abrobot_sh1106_72x40`` when you invoke ``west build``. For example:
26+
27+
.. zephyr-app-commands::
28+
:zephyr-app: samples/drivers/display
29+
:board: esp32c3_042_oled
30+
:shield: abrobot_sh1106_72x40
31+
:goals: build

0 commit comments

Comments
 (0)