This commit is contained in:
Pim Kunis 2022-10-09 08:09:42 +02:00
parent ba8f072d23
commit 2c935df494
110 changed files with 1350 additions and 8011 deletions

View file

@ -0,0 +1,18 @@
defmodule EisromFirmware do
@moduledoc """
Documentation for EisromFirmware.
"""
@doc """
Hello world.
## Examples
iex> EisromFirmware.hello
:world
"""
def hello do
:world
end
end

View file

@ -0,0 +1,44 @@
defmodule EisromFirmware.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
@impl true
def start(_type, _args) do
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: EisromFirmware.Supervisor]
children =
[
# Children for all targets
# Starts a worker by calling: EisromFirmware.Worker.start_link(arg)
# {EisromFirmware.Worker, arg},
] ++ children(target())
Supervisor.start_link(children, opts)
end
# List all child processes to be supervised
def children(:host) do
[
# Children that only run on the host
# Starts a worker by calling: EisromFirmware.Worker.start_link(arg)
# {EisromFirmware.Worker, arg},
]
end
def children(_target) do
[
# Children for all targets except host
# Starts a worker by calling: EisromFirmware.Worker.start_link(arg)
# {EisromFirmware.Worker, arg},
]
end
def target() do
Application.get_env(:eisrom_firmware, :target)
end
end