Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zio: initial channel definitions #14245

Closed
6 changes: 6 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
/drivers/*/*xec* @franciscomunoz @albertofloyd @scottwcpg
/drivers/wifi/ @jukkar @tbursztyka @pfalcon
/drivers/wifi/eswifi/ @loicpoulain
/drivers/zio/ @bfrog
/dts/arm/atmel/samr21.dtsi @benpicco
/dts/arm/st/ @erwango
/dts/arm/ti/cc13?2* @bwitherspoon
Expand Down Expand Up @@ -220,6 +221,7 @@
/include/drivers/loapic.h @andrewboie
/include/drivers/mvic.h @andrewboie
/include/drivers/pcie/ @gnuless
/include/drivers/zio/ @bfrog
/include/drivers/serial/uart_ns16550.h @gnuless
/include/dt-bindings/clock/kinetis_scg.h @henrikbrixandersen
/include/dt-bindings/pcie/ @gnuless
Expand Down Expand Up @@ -253,6 +255,8 @@
/include/toolchain.h @andrewboie @andyross @nashif
/include/toolchain/ @andrewboie @andyross
/include/zephyr.h @andrewboie @andyross
/include/zio.h @bfrog
/include/zio/ @bfrog
/kernel/ @andrewboie @andyross
/lib/gui/ @vanwinkeljan
/lib/libc/ @nashif
Expand Down Expand Up @@ -328,6 +332,7 @@
/subsys/storage/ @nvlsianpu
/subsys/testsuite/ @nashif
/subsys/usb/ @jfischer-phytec-iot @finikorg
/subsys/zio/ @bfrog
/tests/ @nashif
/tests/boards/native_posix/ @aescolar
/tests/boards/intel_s1000_crb/ @dcpleung @sathishkuttan
Expand All @@ -351,6 +356,7 @@
/tests/net/socket/ @jukkar @tbursztyka @pfalcon
/tests/subsys/fs/ @nashif @wentongwu
/tests/subsys/settings/ @nvlsianpu
/tests/subsys/zio/ @bfrog

# Get all docs reviewed
*.rst @dbkinder
20 changes: 20 additions & 0 deletions doc/reference/zio/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. _zio_api:

.. comment
not documenting
.. doxygengroup:: display_interfaces

ZIO APIs
########

ZIO Device API
**************

.. doxygengroup:: zio_device
:project: Zephyr

ZIO Attribute Definitions
*************************

.. doxygengroup:: zio_attributes
:project: Zephyr
1 change: 1 addition & 0 deletions drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ add_subdirectory_if_kconfig(wifi)
add_subdirectory_if_kconfig(can)
add_subdirectory_if_kconfig(audio)
add_subdirectory_if_kconfig(hwinfo)
add_subdirectory_if_kconfig(zio)

add_subdirectory_ifdef(CONFIG_FLASH_HAS_DRIVER_ENABLED flash)
add_subdirectory_ifdef(CONFIG_SERIAL_HAS_DRIVER serial)
Expand Down
3 changes: 3 additions & 0 deletions drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,7 @@ source "drivers/neural_net/Kconfig"

source "drivers/hwinfo/Kconfig"

source "drivers/zio/Kconfig"


endmenu
3 changes: 3 additions & 0 deletions drivers/zio/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: Apache-2.0

add_subdirectory_ifdef(CONFIG_SYNTH synth)
30 changes: 30 additions & 0 deletions drivers/zio/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Kconfig - zio configuration options

#
# Copyright (c) 2019 Thomas Burdick <thomas.burdick@gmail.com>
#
# SPDX-License-Identifier: Apache-2.0
#

menuconfig ZIO
bool "ZIO Drivers"
help
Include zio drivers in system config

if ZIO

module = ZIO
module-str = zio
source "subsys/logging/Kconfig.template.log_config"

config ZIO_INIT_PRIORITY
int "Zio init priority"
default 90
help
Zio initialization priority.

comment "Device Drivers"

source "drivers/zio/synth/Kconfig"

endif # ZIO
5 changes: 5 additions & 0 deletions drivers/zio/synth/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_library()

zephyr_library_sources_ifdef(CONFIG_SYNTH synth.c)
56 changes: 56 additions & 0 deletions drivers/zio/synth/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

# Copyright (c) 2019 Thomas Burdick <thomas.burdick@gmail.com>
#
# SPDX-License-Identifier: Apache-2.0
#

menuconfig SYNTH
bool "Synthesized Signal Generator"
help
Enable zio driver for signal generator.

if SYNTH

config SYNTH_FIFO_SIZE
int "FIFO power of 2 size, pow(2,SYNTH_FIFO_SIZE), defaults to pow(2,9)=512"
default 9
depends on SYNTH
help
The size of the internal FIFO for synthesized samples

config SYNTH_SAMPLE_RATE
int "Samples to generate per second, defaults to 44.100kHz (CD sample rate)"
default 44100
depends on SYNTH
help
Number of samples to generate per second.

config SYNTH_0_FREQ
int "Frequency of first channel"
default 440
depends on SYNTH
help
The signal frequency in hertz of the zeroth channel

config SYNTH_0_PHASE
int "Phase of first channel in degrees"
default 0
depends on SYNTH
help
The signal phase in degress of the zeroth channel

config SYNTH_1_FREQ
int "Frequency of second channel"
default 880
depends on SYNTH
help
The signal frequency in hertz of the first channel

config SYNTH_1_PHASE
int "Phase of second channel in degrees"
default 45
depends on SYNTH
help
The signal phase in degrees of the first channel

endif # SYNTH
Loading