Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,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 @@ -212,6 +213,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 @@ -244,6 +246,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 @@ -318,6 +322,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 @@ -340,6 +345,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
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 <[email protected]>
#
# 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 <[email protected]>
#
# 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider adding "range" entry to this option and the ones below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would the range entry be for out of curiousity?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that there is no point to specify 432 degrees of phase. Also, is there any limitation in min/max frequency or FIFO size?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see what your saying now, yes I'll add some sensible ranges

int "FIFO power of 2 size, pow(2,SYNTH_FIFO_SIZE), defaults to pow(2,9)=512"
default 9
depends on SYNTH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove depends on SYNTH here and throughout, since you've already wrapped everything with if SYNTH..endif

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