We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a974c2 commit 94ed50eCopy full SHA for 94ed50e
lib/delux/application.ex
@@ -8,6 +8,8 @@ defmodule Delux.Application do
8
# Optionally start Delux if configured in the application
9
# environment
10
11
+ apply_dt_overlays()
12
+
13
children =
14
case Application.get_all_env(:delux) do
15
[] -> []
@@ -17,4 +19,13 @@ defmodule Delux.Application do
17
19
opts = [strategy: :one_for_one, name: Delux.Supervisor]
18
20
Supervisor.start_link(children, opts)
21
end
22
23
+ def apply_dt_overlays do
24
+ config = Application.get_env(:delux, :dt_overlays, [])
25
26
+ Enum.each(config[:pins] || [], fn {label, pin} ->
27
+ args = [config[:overlays_path], "label=#{label}", "gpio=#{pin}"]
28
+ System.cmd("dtoverlay", args)
29
+ end)
30
+ end
31
0 commit comments