4dfab40cac
Add a new DT property named "pixel-group-size" that allows users to configure the driver to refresh the matrix by illuminating multiple LEDs in particular rows simultaneously. This way the maximum possible brightness of the LEDs can be increased (as they can be lit longer) and the timer interrupt handler is executed less frequently, what results in decreased CPU load, but more GPIOTE/PPI channels needs to be allocated if the PWM peripheral cannot be used. Thus, it is left to users to select the configuration that suits them best. Update definitions of both the bbc_microbit boards with this new property, using the maximum available group size (to achieve maximum possible brightness). For v2, no new resources are used (only all channels in the already used PWM peripheral are now utilized). For v1, two more GPIOTE and PPI channels are allocated. Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
23 lines
994 B
Plaintext
23 lines
994 B
Plaintext
# Copyright (c) 2021, Nordic Semiconductor ASA
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
DT_COMPAT_NRF_LED_MATRIX := nordic,nrf-led-matrix
|
|
|
|
config DISPLAY_NRF_LED_MATRIX
|
|
bool "LED matrix driven by GPIOs"
|
|
depends on SOC_FAMILY_NRF
|
|
select NRFX_GPIOTE
|
|
select NRFX_PPI if HAS_HW_NRF_PPI
|
|
default $(dt_compat_enabled,$(DT_COMPAT_NRF_LED_MATRIX))
|
|
help
|
|
Enable driver for a LED matrix with rows and columns driven by
|
|
GPIOs. The driver allows setting one of 256 levels of brightness
|
|
(where 0 means off completely) for each of the LEDs independently.
|
|
Assignment of GPIOs to rows and columns and the mapping of those
|
|
to pixels are specified in properties of a "nordic,nrf-led-matrix"
|
|
compatible node in devicetree.
|
|
The driver uses one TIMER instance and, depending on what is set in
|
|
devicetree, one PWM instance or one or more GPIOTE and PPI channels
|
|
(the latter value depends on the chosen pixel group size - the number
|
|
of LEDs in one row that can be lit simultaneously).
|