diff --git a/adrv9364/adrv9364.go b/adrv9364/adrv9364.go new file mode 100644 index 0000000..d03646a --- /dev/null +++ b/adrv9364/adrv9364.go @@ -0,0 +1,45 @@ +// {{{ Copyright (c) Paul R. Tagliamonte , 2020-2023 +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. }}} + +package adrv9364 + +import ( + "hz.tools/sdr/debug" +) + +func init() { + debug.RegisterRadioDriver("hz.tools/sdr/adrv9364.Sdr") +} + +var ( + // adrv9364PhyName is the name of the transceiver itself, used for control + // over things like samples per second or frequency. + adrv9364PhyName = "ad9361-phy" + + // adrv9364RxName is the name of the RX ADC, to read samples from the rx + // antenna. + adrv9364RxName = "cf-ad9361-lpc" + + // adrv9364TxName is the name of the TX DAC, to write samples to the + // tx side of the house. + adrv9364TxName = "cf-ad9361-dds-core-lpc" +) + +// vim: foldmethod=marker diff --git a/adrv9364/doc.go b/adrv9364/doc.go new file mode 100644 index 0000000..948eea9 --- /dev/null +++ b/adrv9364/doc.go @@ -0,0 +1,25 @@ +// {{{ Copyright (c) Paul R. Tagliamonte , 2020-2023 +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. }}} + +// Package adrv9364 contains an sdr.Sdr implementation for the Analog Devices +// ADRV9364-Z7020 (Z7020/AD9364) mounted on a ADRV1CRR-BOB. +package adrv9364 + +// vim: foldmethod=marker diff --git a/go.mod b/go.mod index 18bf9fe..c016aa7 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,15 @@ module hz.tools/sdr -go 1.14 +go 1.19 require ( github.com/mattn/go-pointer v0.0.1 - github.com/stretchr/testify v1.8.1 + github.com/stretchr/testify v1.8.3 hz.tools/rf v0.0.7 ) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum index 61a5064..8723c47 100644 --- a/go.sum +++ b/go.sum @@ -13,6 +13,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/pluto/iio/buffer.go b/internal/iio/buffer.go similarity index 100% rename from pluto/iio/buffer.go rename to internal/iio/buffer.go diff --git a/pluto/iio/channel.go b/internal/iio/channel.go similarity index 100% rename from pluto/iio/channel.go rename to internal/iio/channel.go diff --git a/pluto/iio/context.go b/internal/iio/context.go similarity index 100% rename from pluto/iio/context.go rename to internal/iio/context.go diff --git a/pluto/iio/device.go b/internal/iio/device.go similarity index 100% rename from pluto/iio/device.go rename to internal/iio/device.go diff --git a/pluto/iio/doc.go b/internal/iio/doc.go similarity index 100% rename from pluto/iio/doc.go rename to internal/iio/doc.go diff --git a/pluto/iio/static.go b/internal/iio/static.go similarity index 100% rename from pluto/iio/static.go rename to internal/iio/static.go diff --git a/pluto/pluto.go b/pluto/pluto.go index 4e14a0e..a30a29e 100644 --- a/pluto/pluto.go +++ b/pluto/pluto.go @@ -26,7 +26,7 @@ import ( "hz.tools/rf" "hz.tools/sdr" "hz.tools/sdr/debug" - "hz.tools/sdr/pluto/iio" + "hz.tools/sdr/internal/iio" ) func init() { diff --git a/pluto/rx.go b/pluto/rx.go index 4520349..0c665ed 100644 --- a/pluto/rx.go +++ b/pluto/rx.go @@ -25,7 +25,7 @@ import ( "unsafe" "hz.tools/sdr" - "hz.tools/sdr/pluto/iio" + "hz.tools/sdr/internal/iio" "hz.tools/sdr/stream" ) diff --git a/pluto/tx.go b/pluto/tx.go index a8aed00..eaccc6f 100644 --- a/pluto/tx.go +++ b/pluto/tx.go @@ -25,7 +25,7 @@ import ( "unsafe" "hz.tools/sdr" - "hz.tools/sdr/pluto/iio" + "hz.tools/sdr/internal/iio" ) type tx struct { diff --git a/pluto/tx_cyclic.go b/pluto/tx_cyclic.go index 81d79dc..2e3a302 100644 --- a/pluto/tx_cyclic.go +++ b/pluto/tx_cyclic.go @@ -26,7 +26,7 @@ import ( "unsafe" "hz.tools/sdr" - "hz.tools/sdr/pluto/iio" + "hz.tools/sdr/internal/iio" ) // CyclicTx will transmit a specific buffer in a loop. If the buffer is to be