Help us shape the future of Go! Take the 2026 Go Developer Survey

hackrf

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VendorRequestSetTransceiverMode uint8 = iota + 1
	VendorRequestMax2837Write
	VendorRequestMax2837Read
	VendorRequestSi5351CWrite
	VendorRequestSi5351CRead
	VendorRequestSampleRateSet
	VendorRequestBasebandFilterBandwidthSet
	VendorRequestRFFC5071Write
	VendorRequestRFFC5071Read
	VendorRequestSPIFlashErase
	VendorRequestSPIFlashWrite
	VendorRequestSPIFlashRead
	VendorRequestBoardIDRead = iota + 2
	VendorRequestVersionStringRead
	VendorRequestSetFreq
	VendorRequestAmpEnable
	VendorRequestBoardPartIDSerialNoRead
	VendorRequestSetLNAGain
	VendorRequestSetVGAGain
	VendorRequestSetTXVGAGain
	VendorRequestAntennaEnable = iota + 3
	VendorRequestSetFreqExplicit
	VendorRequestUSBWCIDVendorReq
	VendorRequestInitSweep
	VendorRequestOperacakeGetBoards
	VendorRequestOperacakeSetPorts
	VendorRequestSetHWSyncMode
	VendorRequestReset
	VendorRequestOperacakeSetRanges
	VendorRequestClkoutEnable
	VendorRequestSPIFlashStatus
	VendorRequestSPIFlashClearStatus
	VendorRequestOperacakeGPIOTest
	VendorRequestCPLDChecksum
	VendorRequestUIEnable
	VendorRequestOperacakeSetMode
	VendorRequestOperacakeGetMode
	VendorRequestOperacakeSetDwellTimes
	VendorRequestGetM0State
	VendorRequestSetTXUnderrunLimit
	VendorRequestSetRXOverrunLimit
	VendorRequestGetCLKINStatus
	VendorRequestBoardRevRead
	VendorRequestSupportedPlatformRead
)
View Source
const (
	TranceiverModeOff uint16 = iota
	TranceiverModeReceive
	TranceiverModeTransmit
	TranceiverModeSS
	TranceiverModeCPLDUpdate
	TranceiverModeRxSweep
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HackRF

type HackRF struct {
	// contains filtered or unexported fields
}

func FindAllDevices

func FindAllDevices() ([]*HackRF, error)

FindAllDevices finds all devices HackRF available for interaction and returns a list of them

func NewHackRF

func NewHackRF(dev *gousb.Device) *HackRF

NewHackRF constructor

func (*HackRF) Disable

func (d *HackRF) Disable() error

Disable turns off any interaction with the environment

func (*HackRF) EnableRx

func (d *HackRF) EnableRx(callback func([]byte)) error

EnableRx turns on the receiver

func (*HackRF) EnableTx

func (d *HackRF) EnableTx() error

EnableTx turns on the transmission

func (*HackRF) Init

func (d *HackRF) Init() error

Init init hackrf device (read interfaces and endpoints)

func (*HackRF) SetCenterFrequency

func (d *HackRF) SetCenterFrequency(freq uint64) error

SetCenterFrequency sets the central operating frequency

func (*HackRF) SetLNA

func (d *HackRF) SetLNA(lna uint16) error

SetLNA sets the gain factor for the LNA

func (*HackRF) SetSampleRate

func (d *HackRF) SetSampleRate(sr float64) error

SetSampleRate setting the sampling frequency with automatic calculation of the synthesizer frequency and the divider coefficient

func (*HackRF) SetSampleRateManual

func (d *HackRF) SetSampleRateManual(freq uint32, div uint32) error

SetSampleRateManual manually sets the values ​​of the synthesizer frequency and the divider coefficient

func (*HackRF) SetTxVGA

func (d *HackRF) SetTxVGA(txVga uint16) error

SetTxVGA sets the gain for the VGA of the transmit path

func (*HackRF) SetVGA

func (d *HackRF) SetVGA(vga uint16) error

SetVGA sets the gain for the VGA of the receive path

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL