Skip to content

Commit 1447272

Browse files
author
Sven Hädrich
committed
drivers: dali: Add driver for STM PWMs
1 parent 5fa4925 commit 1447272

File tree

8 files changed

+1148
-0
lines changed

8 files changed

+1148
-0
lines changed

drivers/dali/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
zephyr_library()
55
# zephyr-keep-sorted-start
66
zephyr_library_sources_ifdef(CONFIG_DALI_LPC11U6X dali_lpc11u6x.c)
7+
zephyr_library_sources_ifdef(CONFIG_DALI_PWM dali_pwm.c)
78
# zephyr-keep-sorted-stop

drivers/dali/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ config DALI_MAX_FRAMES_IN_QUEUE
1818
How many frames should be buffered in the recv queue
1919

2020
source "drivers/dali/Kconfig.lpc11u6x"
21+
source "drivers/dali/Kconfig.pwm"
2122

2223
module = DALI_LOW_LEVEL
2324
module-str = dali_low_level

drivers/dali/Kconfig.pwm

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# PWM DALI configuration options
2+
3+
# Copyright (c) 2025 by Sven Hädrich <[email protected]>
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config DALI_PWM
7+
bool "Generic PWM DALI driver"
8+
default y
9+
depends on DT_HAS_ZEPHYR_DALI_PWM_ENABLED
10+
select PWM
11+
select PWM_CAPTURE
12+
help
13+
Enable DALI driver for generic PWM MCUs.
14+
15+
if DALI_PWM
16+
17+
choice
18+
prompt "Thread for sending out"
19+
default DALI_PWM_OWN_THREAD
20+
21+
config DALI_PWM_GLOBAL_THREAD
22+
bool "Use global thread"
23+
24+
config DALI_PWM_OWN_THREAD
25+
bool "Use own thread"
26+
27+
endchoice
28+
29+
config DALI_PWM_THREAD_PRIORITY
30+
int "DALI send own thread priority"
31+
depends on DALI_PWM_OWN_THREAD
32+
default 10
33+
help
34+
The priority of the thread used for sending DALI frames.
35+
36+
config DALI_PWM_THREAD_STACK_SIZE
37+
int "DALI send own thread stack size"
38+
depends on DALI_PWM_OWN_THREAD
39+
default 1024
40+
help
41+
The thread stack size.
42+
43+
endif # DALI_PWM

0 commit comments

Comments
 (0)