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

WIP: Add in 'adrv9364' SDR (ADRV9364-Z7020) #24

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
45 changes: 45 additions & 0 deletions adrv9364/adrv9364.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// {{{ Copyright (c) Paul R. Tagliamonte <[email protected]>, 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
25 changes: 25 additions & 0 deletions adrv9364/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// {{{ Copyright (c) Paul R. Tagliamonte <[email protected]>, 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
10 changes: 8 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -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
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pluto/pluto.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion pluto/rx.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"unsafe"

"hz.tools/sdr"
"hz.tools/sdr/pluto/iio"
"hz.tools/sdr/internal/iio"
"hz.tools/sdr/stream"
)

Expand Down
2 changes: 1 addition & 1 deletion pluto/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"unsafe"

"hz.tools/sdr"
"hz.tools/sdr/pluto/iio"
"hz.tools/sdr/internal/iio"
)

type tx struct {
Expand Down
2 changes: 1 addition & 1 deletion pluto/tx_cyclic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down