Skip to content

Commit

Permalink
boards/shields: ssd1306: Factorize and move to conditional Kconfig
Browse files Browse the repository at this point in the history
Factorize definitions for ssd1306_128x32 and sd1306_128x64 shields
and move to conditional Kconfig.
As part of this change, direct drivers Kconfig symbols enabling
(I2C, SSD1306) are removed as they are application responsibility.
Also disabling SSD16XX is removed as SSD16XX should not be enabled
by default.

Signed-off-by: Erwan Gouriou <[email protected]>
  • Loading branch information
erwango authored and nashif committed Jan 2, 2020
1 parent 980ddb6 commit 4faf654
Show file tree
Hide file tree
Showing 14 changed files with 68 additions and 64 deletions.
45 changes: 45 additions & 0 deletions boards/shields/ssd1306/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright (c) 2019 Linaro Limited
# SPDX-License-Identifier: Apache-2.0

if SHIELD_SSD1306_128X64 || SHIELD_SSD1306_128X32

if DISPLAY

config I2C
default y

config SSD1306
default y

if LVGL

config LVGL_DISPLAY_DEV_NAME
default "SSD1306"

config LVGL_HOR_RES
default 128

config LVGL_VER_RES
default 64 if SHIELD_SSD1306_128X64
default 32 if SHIELD_SSD1306_128X32

config LVGL_VDB_SIZE
default 64

config LVGL_DPI
default 148

config LVGL_BITS_PER_PIXEL
default 1

choice LVGL_COLOR_DEPTH
default LVGL_COLOR_DEPTH_1
endchoice

endif # LVGL

rsource "boards/*.defconfig"

endif # DISPLAY

endif # SHIELD_SSD1306_128X64 || SHIELD_SSD1306_128X32
8 changes: 8 additions & 0 deletions boards/shields/ssd1306/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2019 Linaro Limited
# SPDX-License-Identifier: Apache-2.0

config SHIELD_SSD1306_128X32
def_bool $(shields_list_contains,ssd1306_128x32)

config SHIELD_SSD1306_128X64
def_bool $(shields_list_contains,ssd1306_128x64)
10 changes: 10 additions & 0 deletions boards/shields/ssd1306/boards/reel_board.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2019 Linaro Limited
# SPDX-License-Identifier: Apache-2.0

if BOARD_REEL_BOARD

choice I2C_0_NRF_TYPE
default I2C_0_NRF_TWI
endchoice

endif # BOARD_REEL_BOARD
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.. _ssd1306_128x64_shield:
.. _ssd1306_128_shield:

SSD1306 128x64 pixels generic shield
####################################
SSD1306 128x64(/32) pixels generic shield
#########################################

Overview
********

This is a generic shield for 128x64 pixel resolution OLED displays
This is a generic shield for 128x64(/32) pixel resolution OLED displays
based on SSD1306 controller. These displays have an I2C interface and
usually only four pins: GND, VCC, SCL and SDA. Display pins can be
connected to the pin header of a board using jumper wires.
Expand Down
2 changes: 0 additions & 2 deletions boards/shields/ssd1306_128x32/boards/reel_board.conf

This file was deleted.

30 changes: 0 additions & 30 deletions boards/shields/ssd1306_128x32/doc/index.rst

This file was deleted.

11 changes: 0 additions & 11 deletions boards/shields/ssd1306_128x32/ssd1306_128x32.conf

This file was deleted.

2 changes: 0 additions & 2 deletions boards/shields/ssd1306_128x64/boards/reel_board.conf

This file was deleted.

3 changes: 0 additions & 3 deletions boards/shields/ssd1306_128x64/boards/reel_board.overlay

This file was deleted.

11 changes: 0 additions & 11 deletions boards/shields/ssd1306_128x64/ssd1306_128x64.conf

This file was deleted.

2 changes: 1 addition & 1 deletion samples/gui/lvgl/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Display shield and a board which provides a configuration
for Arduino connectors, for example:

- :ref:`adafruit_2_8_tft_touch_v2` and :ref:`nrf52840_pca10056`
- :ref:`ssd1306_128x64_shield` and :ref:`frdm_k64f`
- :ref:`ssd1306_128_shield` and :ref:`frdm_k64f`

or a simulated display environment in a native Posix application:

Expand Down

0 comments on commit 4faf654

Please sign in to comment.