Copy disabled (too large)
Download .txt
Showing preview only (17,202K chars total). Download the full file to get everything.
Repository: greatscottgadgets/hackrf
Branch: main
Commit: 73694ccf4408
Files: 448
Total size: 16.3 MB
Directory structure:
gitextract_go_tk_2v/
├── .clang-format
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug-report.yml
│ │ ├── config.yml
│ │ ├── documentation-request.yml
│ │ ├── feature-request.yml
│ │ ├── question.yml
│ │ └── technical-support.yml
│ └── workflows/
│ ├── build.yml
│ └── clang-format-check.yml
├── .gitignore
├── .gitmodules
├── .readthedocs.yaml
├── CODE_OF_CONDUCT.md
├── COPYING
├── Dockerfile
├── Jenkinsfile
├── Readme.md
├── TRADEMARK
├── ci-scripts/
│ ├── build_h1_firmware.sh
│ ├── build_hpro_firmware.sh
│ ├── hackrf_pro_test.py
│ ├── hackrf_test.py
│ ├── install_host.sh
│ ├── test-debug.py
│ ├── test-firmware-flash.sh
│ ├── test-firmware-program.sh
│ ├── test-transfer.py
│ ├── test_host.sh
│ └── test_sgpio_debug.py
├── docs/
│ ├── .readthedocs.yaml
│ ├── Makefile
│ ├── doxygen/
│ │ └── Doxyfile
│ ├── make.bat
│ ├── requirements.txt
│ └── source/
│ ├── LPC43XX_Debugging.rst
│ ├── LPC43XX_SGPIO_Configuration.rst
│ ├── conf.py
│ ├── enclosure_options.rst
│ ├── expansion_interface.rst
│ ├── external_clock_interface.rst
│ ├── firmware_development_setup.rst
│ ├── getting_help.rst
│ ├── hackrf_connectors.rst
│ ├── hackrf_minimum_requirements.rst
│ ├── hackrf_one.rst
│ ├── hackrf_pro.rst
│ ├── hackrf_projects_mentions.rst
│ ├── hackrf_tools.rst
│ ├── hackrfs_buttons.rst
│ ├── hardware_components.rst
│ ├── hardware_triggering.rst
│ ├── index.rst
│ ├── installing_hackrf_software.rst
│ ├── jawbreaker.rst
│ ├── leds.rst
│ ├── list_of_hardware_revisions.rst
│ ├── opera_cake.rst
│ ├── opera_cake_board_addressing.rst
│ ├── opera_cake_faq.rst
│ ├── opera_cake_hardware.rst
│ ├── opera_cake_modes_of_operation.rst
│ ├── opera_cake_port_configuration.rst
│ ├── rad1o.rst
│ ├── rf_shield_installation.rst
│ ├── sampling_rate.rst
│ ├── setting_gain.rst
│ ├── software_support.rst
│ ├── synchronization_checklist.rst
│ ├── troubleshooting.rst
│ ├── updating_firmware.rst
│ ├── usb_cables.rst
│ └── virtual_machines.rst
├── firmware/
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── README
│ ├── appveyor.sh
│ ├── blinky/
│ │ ├── CMakeLists.txt
│ │ ├── README
│ │ └── blinky.c
│ ├── common/
│ │ ├── LPC4320_M4_memory.ld
│ │ ├── LPC4330_M4_memory.ld
│ │ ├── LPC43xx_M0_memory.ld
│ │ ├── LPC43xx_M4_M0_image_from_text.ld
│ │ ├── LPC43xx_M4_memory.ld
│ │ ├── LPC43xx_M4_memory_rom_only.ld
│ │ ├── README
│ │ ├── adc.c
│ │ ├── adc.h
│ │ ├── bitband.c
│ │ ├── bitband.h
│ │ ├── clkin.c
│ │ ├── clkin.h
│ │ ├── configure_file.cmake
│ │ ├── cpld_jtag.c
│ │ ├── cpld_jtag.h
│ │ ├── cpld_xc2c.c
│ │ ├── cpld_xc2c.h
│ │ ├── crc.c
│ │ ├── crc.h
│ │ ├── delay.c
│ │ ├── delay.h
│ │ ├── fault_handler.c
│ │ ├── fault_handler.h
│ │ ├── firmware_info.c
│ │ ├── firmware_info.h
│ │ ├── fixed_point.h
│ │ ├── fpga.c
│ │ ├── fpga.h
│ │ ├── fpga_image.c
│ │ ├── fpga_regs.def
│ │ ├── fpga_selftest.c
│ │ ├── gpdma.c
│ │ ├── gpdma.h
│ │ ├── gpio.h
│ │ ├── gpio_lpc.c
│ │ ├── gpio_lpc.h
│ │ ├── hackrf_core.c
│ │ ├── hackrf_core.h
│ │ ├── hackrf_ui.c
│ │ ├── hackrf_ui.h
│ │ ├── i2c_bus.c
│ │ ├── i2c_bus.h
│ │ ├── i2c_lpc.c
│ │ ├── i2c_lpc.h
│ │ ├── ice40_spi.c
│ │ ├── ice40_spi.h
│ │ ├── locking.h
│ │ ├── lz4_blk.c
│ │ ├── lz4_blk.h
│ │ ├── lz4_buf.h
│ │ ├── m0_bin.s.cmake
│ │ ├── m0_sleep.c
│ │ ├── m0_state.c
│ │ ├── m0_state.h
│ │ ├── max2831.c
│ │ ├── max2831.h
│ │ ├── max2831_regs.def
│ │ ├── max2831_target.c
│ │ ├── max2831_target.h
│ │ ├── max2837.c
│ │ ├── max2837.h
│ │ ├── max2837_regs.def
│ │ ├── max2837_target.c
│ │ ├── max2837_target.h
│ │ ├── max2839.c
│ │ ├── max2839.h
│ │ ├── max2839_regs.def
│ │ ├── max2839_target.c
│ │ ├── max2839_target.h
│ │ ├── max283x.c
│ │ ├── max283x.h
│ │ ├── max2871.c
│ │ ├── max2871.h
│ │ ├── max2871_regs.c
│ │ ├── max2871_regs.h
│ │ ├── max5864.c
│ │ ├── max5864.h
│ │ ├── max5864_target.c
│ │ ├── max5864_target.h
│ │ ├── mixer.c
│ │ ├── mixer.h
│ │ ├── operacake.c
│ │ ├── operacake.h
│ │ ├── operacake_sctimer.c
│ │ ├── operacake_sctimer.h
│ │ ├── platform_detect.c
│ │ ├── platform_detect.h
│ │ ├── portapack.c
│ │ ├── portapack.h
│ │ ├── rad1o/
│ │ │ ├── decoder.c
│ │ │ ├── decoder.h
│ │ │ ├── display.c
│ │ │ ├── display.h
│ │ │ ├── draw.c
│ │ │ ├── draw.h
│ │ │ ├── fonts.h
│ │ │ ├── print.c
│ │ │ ├── print.h
│ │ │ ├── render.c
│ │ │ ├── render.h
│ │ │ ├── smallfonts.c
│ │ │ ├── smallfonts.h
│ │ │ ├── ubuntu18.c
│ │ │ └── ubuntu18.h
│ │ ├── radio.c
│ │ ├── radio.h
│ │ ├── rf_path.c
│ │ ├── rf_path.h
│ │ ├── rffc5071.c
│ │ ├── rffc5071.h
│ │ ├── rffc5071_regs.def
│ │ ├── rffc5071_spi.c
│ │ ├── rffc5071_spi.h
│ │ ├── rom_iap.c
│ │ ├── rom_iap.h
│ │ ├── sct.h
│ │ ├── selftest.c
│ │ ├── selftest.h
│ │ ├── sgpio.c
│ │ ├── sgpio.h
│ │ ├── si5351c.c
│ │ ├── si5351c.h
│ │ ├── spi_bus.c
│ │ ├── spi_bus.h
│ │ ├── spi_ssp.c
│ │ ├── spi_ssp.h
│ │ ├── streaming.c
│ │ ├── streaming.h
│ │ ├── tune_config.h
│ │ ├── tuning.c
│ │ ├── tuning.h
│ │ ├── ui_portapack.c
│ │ ├── ui_portapack.h
│ │ ├── ui_rad1o.c
│ │ ├── ui_rad1o.h
│ │ ├── usb.c
│ │ ├── usb.h
│ │ ├── usb_queue.c
│ │ ├── usb_queue.h
│ │ ├── usb_request.c
│ │ ├── usb_request.h
│ │ ├── usb_standard_request.c
│ │ ├── usb_standard_request.h
│ │ ├── usb_type.h
│ │ ├── w25q80bv.c
│ │ ├── w25q80bv.h
│ │ ├── w25q80bv_target.c
│ │ ├── w25q80bv_target.h
│ │ └── xapp058/
│ │ ├── README
│ │ ├── lenval.c
│ │ ├── lenval.h
│ │ ├── micro.c
│ │ ├── micro.h
│ │ ├── ports.c
│ │ └── ports.h
│ ├── cpld/
│ │ ├── README
│ │ ├── sgpio_debug/
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ ├── batch_svf
│ │ │ ├── batch_xsvf
│ │ │ ├── default.xsvf
│ │ │ ├── sgpio_debug.xise
│ │ │ ├── top.jed
│ │ │ ├── top.ucf
│ │ │ ├── top.vhd
│ │ │ └── top_tb.vhd
│ │ └── sgpio_if/
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── batch_svf
│ │ ├── batch_xsvf
│ │ ├── default.xsvf
│ │ ├── sgpio_if.xise
│ │ ├── top.jed
│ │ ├── top.ucf
│ │ ├── top.vhd
│ │ └── top_tb.vhd
│ ├── dfu-util.cmake
│ ├── dfu.py
│ ├── fpga/
│ │ ├── amaranth_future/
│ │ │ └── fixed.py
│ │ ├── board.py
│ │ ├── build.py
│ │ ├── dsp/
│ │ │ ├── __init__.py
│ │ │ ├── cic.py
│ │ │ ├── dc_block.py
│ │ │ ├── fir.py
│ │ │ ├── fir_mac16.py
│ │ │ ├── mcm.py
│ │ │ ├── nco.py
│ │ │ ├── quarter_shift.py
│ │ │ ├── round.py
│ │ │ └── sb_mac16.py
│ │ ├── interface/
│ │ │ ├── __init__.py
│ │ │ ├── max586x.py
│ │ │ ├── sgpio.py
│ │ │ └── spi.py
│ │ ├── requirements.txt
│ │ ├── top/
│ │ │ ├── ext_precision_rx.py
│ │ │ ├── ext_precision_tx.py
│ │ │ ├── half_precision.py
│ │ │ └── standard.py
│ │ └── util/
│ │ ├── __init__.py
│ │ ├── _stream.py
│ │ └── lfsr.py
│ ├── hackrf-common.cmake
│ ├── hackrf_usb/
│ │ ├── CMakeLists.txt
│ │ ├── hackrf_usb.c
│ │ ├── sgpio_m0.s
│ │ ├── usb_api_adc.c
│ │ ├── usb_api_adc.h
│ │ ├── usb_api_board_info.c
│ │ ├── usb_api_board_info.h
│ │ ├── usb_api_cpld.c
│ │ ├── usb_api_cpld.h
│ │ ├── usb_api_m0_state.c
│ │ ├── usb_api_m0_state.h
│ │ ├── usb_api_operacake.c
│ │ ├── usb_api_operacake.h
│ │ ├── usb_api_praline.c
│ │ ├── usb_api_praline.h
│ │ ├── usb_api_register.c
│ │ ├── usb_api_register.h
│ │ ├── usb_api_selftest.c
│ │ ├── usb_api_selftest.h
│ │ ├── usb_api_spiflash.c
│ │ ├── usb_api_spiflash.h
│ │ ├── usb_api_sweep.c
│ │ ├── usb_api_sweep.h
│ │ ├── usb_api_transceiver.c
│ │ ├── usb_api_transceiver.h
│ │ ├── usb_api_ui.c
│ │ ├── usb_api_ui.h
│ │ ├── usb_bulk_buffer.h
│ │ ├── usb_descriptor.c
│ │ ├── usb_descriptor.h
│ │ ├── usb_device.c
│ │ ├── usb_device.h
│ │ ├── usb_endpoint.c
│ │ └── usb_endpoint.h
│ ├── toolchain-arm-cortex-m.cmake
│ └── tools/
│ ├── check_clock.py
│ ├── cpld_bitstream.py
│ ├── dumb_crc32.py
│ ├── dump_cgu.py
│ └── xsvf.py
├── hardware/
│ ├── .gitignore
│ ├── LNA915/
│ │ ├── LNA915-cache.lib
│ │ ├── LNA915.kicad_pcb
│ │ ├── LNA915.lib
│ │ ├── LNA915.pro
│ │ ├── LNA915.sch
│ │ ├── README
│ │ ├── fp-lib-table
│ │ └── sym-lib-table
│ ├── bubblegum/
│ │ ├── bubblegum-cache.lib
│ │ ├── bubblegum.brd
│ │ ├── bubblegum.pro
│ │ └── bubblegum.sch
│ ├── hackrf-one/
│ │ ├── 74AUP2G58GU.kicad_sym
│ │ ├── LICENSE
│ │ ├── PlasticCase_CAD/
│ │ │ └── README
│ │ ├── README
│ │ ├── acrylic_case/
│ │ │ └── README.md
│ │ ├── baseband.kicad_sch
│ │ ├── fp-lib-table
│ │ ├── frontend.kicad_sch
│ │ ├── hackrf-one-cache.lib
│ │ ├── hackrf-one.kicad_pcb
│ │ ├── hackrf-one.kicad_pro
│ │ ├── hackrf-one.kicad_sch
│ │ ├── mcu.kicad_sch
│ │ └── sym-lib-table
│ ├── jawbreaker/
│ │ ├── README
│ │ ├── SoBv1_DP17298/
│ │ │ ├── README
│ │ │ ├── SoBv1-DP17298-jawbreaker-Bottom.skp
│ │ │ ├── SoBv1-DP17298-jawbreaker-Bottom_laser_cutting_493.3mm_Easy.txt
│ │ │ ├── SoBv1-DP17298-jawbreaker-Top.skp
│ │ │ └── SoBv1-DP17298-jawbreaker-Top_laser_cutting_1153.3mm_Normal.txt
│ │ ├── baseband.sch
│ │ ├── frontend.sch
│ │ ├── jawbreaker-cache.lib
│ │ ├── jawbreaker.brd
│ │ ├── jawbreaker.pro
│ │ ├── jawbreaker.sch
│ │ └── mcu.sch
│ ├── jellybean/
│ │ ├── JellyBean_PinMux.pmx
│ │ ├── JellyBean_TPS62410.ods
│ │ ├── README
│ │ ├── jellybean-cache.lib
│ │ ├── jellybean.brd
│ │ ├── jellybean.pro
│ │ ├── jellybean.sch
│ │ └── jellybean_BOM.ods
│ ├── kicad/
│ │ ├── hackrf.dcm
│ │ ├── hackrf.lib
│ │ └── hackrf.mod
│ ├── lemondrop/
│ │ ├── README
│ │ ├── lemondrop-cache.lib
│ │ ├── lemondrop.brd
│ │ ├── lemondrop.pro
│ │ └── lemondrop.sch
│ ├── licorice/
│ │ ├── licorice-cache.lib
│ │ ├── licorice.brd
│ │ ├── licorice.pro
│ │ └── licorice.sch
│ ├── lollipop/
│ │ ├── lollipop-cache.lib
│ │ ├── lollipop.brd
│ │ ├── lollipop.pro
│ │ ├── lollipop.sch
│ │ └── lollipop_logic.py
│ ├── marzipan/
│ │ ├── README
│ │ ├── baseband.sch
│ │ ├── fp-lib-table
│ │ ├── frontend.sch
│ │ ├── marzipan-cache.lib
│ │ ├── marzipan.kicad_pcb
│ │ ├── marzipan.pro
│ │ ├── marzipan.sch
│ │ └── mcu.sch
│ ├── neapolitan/
│ │ ├── README
│ │ ├── baseband.sch
│ │ ├── fp-lib-table
│ │ ├── frontend.sch
│ │ ├── mcu.sch
│ │ ├── neapolitan-cache.lib
│ │ ├── neapolitan.kicad_pcb
│ │ ├── neapolitan.pro
│ │ └── neapolitan.sch
│ ├── operacake/
│ │ ├── README
│ │ ├── fp-lib-table
│ │ ├── operacake-cache.lib
│ │ ├── operacake.kicad_pcb
│ │ ├── operacake.pro
│ │ └── operacake.sch
│ └── test/
│ └── si5351-configure.py
├── host/
│ ├── CMakeLists.txt
│ ├── README.md
│ ├── cmake/
│ │ ├── cmake_uninstall.cmake.in
│ │ ├── modules/
│ │ │ ├── FindFFTW3f.cmake
│ │ │ └── FindLIBUSB.cmake
│ │ └── set_release.cmake
│ ├── hackrf-tools/
│ │ ├── CMakeLists.txt
│ │ ├── getopt/
│ │ │ ├── getopt.c
│ │ │ └── getopt.h
│ │ └── src/
│ │ ├── CMakeLists.txt
│ │ ├── hackrf_biast.c
│ │ ├── hackrf_clock.c
│ │ ├── hackrf_cpldjtag.c
│ │ ├── hackrf_debug.c
│ │ ├── hackrf_info.c
│ │ ├── hackrf_operacake.c
│ │ ├── hackrf_spiflash.c
│ │ ├── hackrf_sweep.c
│ │ └── hackrf_transfer.c
│ └── libhackrf/
│ ├── 53-hackrf.rules
│ ├── 53-hackrf.rules.in
│ ├── CMakeLists.txt
│ ├── HackRFConfig.cmake
│ ├── libhackrf.pc.in
│ └── src/
│ ├── CMakeLists.txt
│ ├── hackrf.c
│ └── hackrf.h
└── tools/
├── add-braces.sh
├── deploy-nightly.sh
├── reformat-source.sh
└── sgpio_debug/
├── create_tx_counter.py
├── sgpio_debug_rx.grc
└── sgpio_debug_tx.sh
================================================
FILE CONTENTS
================================================
================================================
FILE: .clang-format
================================================
# clang-format configuration file. Intended for clang-format >= 14.
#
# For more information, see:
#
# Documentation/process/clang-format.rst
# https://clang.llvm.org/docs/ClangFormat.html
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
#
---
AlignAfterOpenBracket: AlwaysBreak
AlignArrayOfStructures: None
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: true
AlignEscapedNewlines: Left
AlignOperands: DontAlign
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AttributeMacros: ['ADDAPI', 'ADDCALL']
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterStruct: false
AfterUnion: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: false
BreakStringLiterals: false
ColumnLimit: 90
ContinuationIndentWidth: 8
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '.*'
Priority: 1
IndentCaseLabels: false
IndentGotoLabels: false
IndentPPDirectives: BeforeHash
IndentWidth: 8
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
PenaltyBreakAssignment: 0
PenaltyBreakBeforeFirstCallParameter: 0
PenaltyBreakOpenParenthesis: 0
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 1000
PointerAlignment: Left
ReflowComments: false
SeparateDefinitionBlocks: Always
SortIncludes: false
SpaceAfterCStyleCast: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 8
UseTab: ForContinuationAndIndentation
...
================================================
FILE: .gitattributes
================================================
*.brd linguist-language=KiCad
================================================
FILE: .github/ISSUE_TEMPLATE/bug-report.yml
================================================
name: Bug Report
description: Submit a bug report
labels: ["bug report"]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out this bug report!
- type: dropdown
id: issue-type
attributes:
label: What type of issue is this?
options:
- transient - occurring only once
- intermittent - occurring irregularly
- permanent - occurring repeatedly
validations:
required: true
- type: textarea
id: issue
attributes:
label: What issue are you facing?
placeholder: Please describe what you have encountered
validations:
required: true
- type: textarea
id: reproduce-issue
attributes:
label: What are the steps to reproduce this?
placeholder: Please provide the steps to reproduce this issue
validations:
required: true
- type: textarea
id: logs
attributes:
label: Can you provide any logs? (output, errors, etc.)
placeholder: Please provide any logs you might have that illustrate the issue
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
================================================
FILE: .github/ISSUE_TEMPLATE/documentation-request.yml
================================================
name: Documentation
description: Make a request regarding HackRF documentation
labels: ["documentation"]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to help Great Scott Gadgets improve the HackRF One documentation!
- type: textarea
id: documentation-request
attributes:
label: What would you like us to add to or change about the HackRF One documentation?
validations:
required: true
================================================
FILE: .github/ISSUE_TEMPLATE/feature-request.yml
================================================
name: Feature Request
description: File a feature request
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out this feature request form!
- type: textarea
id: feature-request
attributes:
label: What feature would you like to see and why?
description: Please be as detailed as possible with your feature request.
validations:
required: true
================================================
FILE: .github/ISSUE_TEMPLATE/question.yml
================================================
name: Question
description: Ask a question not covered by current hackrf.rtfd.io documentation
labels: ["question"]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to ask your question! If you need technical support, want to open a feature request, or need to file a bug report, please abandon this issue, open a new issue, and choose the correct template. If you do not choose the correct template, you will be asked to re-open your issue with the correct template.
- type: textarea
id: question
attributes:
label: What would you like to know?
validations:
required: true
================================================
FILE: .github/ISSUE_TEMPLATE/technical-support.yml
================================================
name: Technical Support Request
description: File a technical support request
labels: ["technical support"]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out this technical support request form! Please note that technical support requests can expect a response time of two weeks.
- type: textarea
id: expected-outcome
attributes:
label: What outcome were you hoping for?
placeholder: Please be detailed in what you expected to happen
validations:
required: true
- type: textarea
id: actual-outcome
attributes:
label: What outcome actually happened?
placeholder: Please be detailed in what did happen
validations:
required: true
- type: textarea
id: operating-systems
attributes:
label: What operating systems are you seeing the problem on?
validations:
required: true
- type: textarea
id: hackrf_info-output
attributes:
label: What is the output of ```hackrf_info```?
description: Please put the output of the command in the box below or indicate N/A.
validations:
required: true
- type: textarea
id: third-party-software
attributes:
label: Are you using any third-party software?
description: Please list the software you are using with your HackRF or indicate N/A. Please list version numbers where possible.
placeholder: GNU Radio, GQRX, etc.
validations:
required: true
- type: textarea
id: third-party-hardware
attributes:
label: Are you using any third-party hardware?
description: Please list any hardware you are using with your HackRF or indicate N/A.
placeholder: portapack, specialized antenna, etc.
validations:
required: true
================================================
FILE: .github/workflows/build.yml
================================================
name: Build
on:
push:
pull_request:
# Run automatically every monday
schedule:
- cron: 1 12 * * 1
env:
# Override OSX architecture detection. Required for CMake versions < 3.19.2.
CMAKE_OSX_ARCHITECTURES: arm64
jobs:
host:
strategy:
matrix:
sys:
- {os: 'macos', shell: 'bash'}
- {os: 'ubuntu', shell: 'bash'}
- {os: 'windows', shell: 'pwsh'}
- {os: 'windows', shell: 'msys2'}
cmake: ['3.10.0', '3.16.0', '3.21.0', '4.0.0', 'latest']
exclude:
# GitHub runners use Visual Studio 2022. Support added in CMake 3.21.
- sys: {os: 'windows', shell: 'pwsh'}
cmake: '3.10.0'
- sys: {os: 'windows', shell: 'pwsh'}
cmake: '3.16.0'
# MSYS2 always supplies the latest cmake.
- sys: {os: 'windows', shell: 'msys2'}
cmake: '3.10.0'
- sys: {os: 'windows', shell: 'msys2'}
cmake: '3.16.0'
- sys: {os: 'windows', shell: 'msys2'}
cmake: '3.21.0'
- sys: {os: 'windows', shell: 'msys2'}
cmake: '4.0.0'
include:
- sys: {os: 'windows', shell: 'pwsh'}
cmake_args: >-
-DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
--install-prefix=$env:GITHUB_WORKSPACE/install
- sys: {os: 'windows', shell: 'msys2'}
cmake_args: >-
--install-prefix=/usr/local
# Don't cancel all builds when one fails
fail-fast: false
runs-on: ${{ matrix.sys.os }}-latest
defaults:
run:
shell: '${{ matrix.sys.shell }} {0}'
steps:
- uses: actions/checkout@v4
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: ${{ matrix.cmake }}
if: matrix.sys.shell != 'msys2'
- name: Install dependencies (macOS)
run: brew install fftw
if: matrix.sys.os == 'macos'
- name: Install dependencies (Ubuntu)
run: |
sudo apt update
sudo apt install libfftw3-dev libusb-1.0-0-dev
if: matrix.sys.os == 'ubuntu'
- name: Install dependencies (Windows)
run: vcpkg install --triplet=x64-windows libusb fftw3 pthreads pkgconf
if: matrix.sys.os == 'windows' && matrix.sys.shell != 'msys2'
- name: Setup MSYS (Windows)
if: matrix.sys.os == 'windows' && matrix.sys.shell == 'msys2'
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
install: >-
git
make
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-toolchain
mingw-w64-ucrt-x86_64-libusb
mingw-w64-ucrt-x86_64-fftw
# Build libhackrf and hackrf-tools together
- name: Configure & Build
run: |
cmake -E make_directory host/build
cd host/build
cmake .. -DCMAKE_BUILD_TYPE=Release ${{matrix.cmake_args}}
cmake --build . --config Release
# Build libhackrf ONLY
- name: Configure & Build (libhackrf)
run: |
cmake -E make_directory host/libhackrf/build
cd host/libhackrf/build
cmake .. -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_args }}
cmake --build . --config Release
- name: Install (libhackrf)
run: |
sudo cmake --install host/libhackrf/build --config Release
if: matrix.sys.os != 'windows' && matrix.cmake != '3.10.0'
- name: Install (libhackrf, CMake 3.10)
run: |
sudo cmake --build host/libhackrf/build --target install --config Release
if: matrix.sys.os != 'windows' && matrix.cmake == '3.10.0'
- name: Install (libhackrf, Windows)
run: cmake --install host/libhackrf/build --config Release
if: matrix.sys.os == 'windows'
# Build hackrf-tools ONLY
- name: Configure & Build (hackrf-tools)
run: |
cmake -E make_directory host/hackrf-tools/build
cd host/hackrf-tools/build
cmake .. -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_args }}
cmake --build . --config Release
- name: Install (hackrf-tools)
run: |
sudo cmake --install host/hackrf-tools/build --config Release
if: matrix.sys.os != 'windows' && matrix.cmake != '3.10.0'
- name: Install (hackrf-tools, CMake 3.10)
run: |
sudo cmake --build host/hackrf-tools/build --target install --config Release
if: matrix.sys.os != 'windows' && matrix.cmake == '3.10.0'
- name: Install (hackrf-tools, Windows)
run: cmake --install host/hackrf-tools/build --config Release
if: matrix.sys.os == 'windows'
# Publish the contents of install/bin (which should be the combination libhackrf and host-tools) for Windows
- name: Publish Artifacts (Windows)
uses: actions/upload-artifact@v4
with:
name: hackrf-tools-windows
path: ${{github.workspace}}/install/bin
if: matrix.sys.os == 'windows' && matrix.cmake == 'latest' && matrix.sys.shell == 'pwsh'
firmware:
strategy:
matrix:
os: ['macos', 'ubuntu', 'windows']
board: ['HACKRF_ONE', 'JAWBREAKER', 'RAD1O', 'PRALINE']
cmake: ['3.10.0', 'latest']
exclude:
- os: 'windows'
cmake: '3.10.0'
# Don't cancel all builds when one fails
fail-fast: false
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: ${{ matrix.cmake }}
if: matrix.os != 'windows'
- name: Install Arm GNU Toolchain
uses: carlosperate/arm-none-eabi-gcc-action@v1
if: matrix.os != 'windows'
- name: Install dependencies (macOS)
run: |
brew install dfu-util
python3 -m venv environment && source environment/bin/activate
python3 -m pip install PyYAML
if: matrix.os == 'macos'
- name: Install dependencies (Ubuntu)
run: |
python3 -m venv environment && source environment/bin/activate
python3 -m pip install PyYAML
sudo apt install dfu-util
if: matrix.os == 'ubuntu'
- name: Build libopencm3
shell: bash
working-directory: ${{github.workspace}}/firmware/libopencm3/
run: |
source ../../environment/bin/activate
make
if: matrix.os != 'windows'
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/firmware/build
if: matrix.os != 'windows'
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/firmware/build
run: cmake $GITHUB_WORKSPACE/firmware/ -DCMAKE_BUILD_TYPE=Release -DBOARD=${{ matrix.board }}
if: matrix.os != 'windows'
- name: Build
working-directory: ${{github.workspace}}/firmware/build
shell: bash
run: |
source ../../environment/bin/activate
cmake --build . --config Release
if: matrix.os != 'windows'
- name: Setup MSYS (Windows)
if: matrix.os == 'windows'
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
git
make
mingw-w64-ucrt-x86_64-arm-none-eabi-gcc
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-dfu-util
mingw-w64-ucrt-x86_64-python-yaml
- name: Build with MSYS (Windows)
if: matrix.os == 'windows'
shell: msys2 {0}
run: |
mkdir firmware/build
cd firmware/build
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DBOARD=${{ matrix.board }} ..
make
================================================
FILE: .github/workflows/clang-format-check.yml
================================================
name: Check code style
on: [push, pull_request]
jobs:
formatting-check:
name: clang-format
runs-on: ubuntu-latest
strategy:
matrix:
path:
- check: 'host/libhackrf/src'
exclude: ''
- check: 'host/hackrf-tools/src'
exclude: ''
- check: 'firmware/common'
exclude: 'firmware/common/xapp058'
- check: 'firmware/hackrf_usb'
exclude: ''
steps:
- uses: actions/checkout@v4
- name: Run clang-format-action
uses: jidicula/clang-format-action@v4.6.2
with:
clang-format-version: '14'
check-path: ${{ matrix.path['check'] }}
exclude-regex: ${{ matrix.path['exclude'] }}
================================================
FILE: .gitignore
================================================
# Compiled output
*.bin
*.d
*.elf
*.hex
*.srec
host/build/
host/**/build
install/
# Operating system spew
.DS_Store
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Editor junk
*.swp
*.sublime-project
*.sublime-workspace
.vscode*
# Documentation Stuff
docs/build/
# Xilinx tools create an enormous amount of poop:
firmware/cpld/**/isim/
firmware/cpld/**/_ngo/
firmware/cpld/**/_xmsgs/
firmware/cpld/**/iseconfig/
firmware/cpld/**/*_html/
firmware/cpld/**/xlnx_auto_0_xdb/
firmware/cpld/**/xst/
firmware/cpld/**/_*.cmd
firmware/cpld/**/_*.log
firmware/cpld/**/*.bld
firmware/cpld/**/*.chk
firmware/cpld/**/*.cmd
firmware/cpld/**/*.cmd_log
firmware/cpld/**/*.csv
firmware/cpld/**/*.cxt
firmware/cpld/**/*.dat
firmware/cpld/**/*.err
firmware/cpld/**/*.exe
firmware/cpld/**/*.gise
firmware/cpld/**/*.gyd
firmware/cpld/**/*.html
firmware/cpld/**/*.ini
firmware/cpld/**/*.ipf
firmware/cpld/**/*.log
firmware/cpld/**/*.lso
firmware/cpld/**/*.mfd
firmware/cpld/**/*.ng[acdr]
firmware/cpld/**/*.pad
firmware/cpld/**/*.phd
firmware/cpld/**/*.pnx
firmware/cpld/**/*.prj
firmware/cpld/**/*.rpt
firmware/cpld/**/*.stx
firmware/cpld/**/*.syr
firmware/cpld/**/*.tim
firmware/cpld/**/*.tspec
firmware/cpld/**/*.vm6
firmware/cpld/**/*.wcfg
firmware/cpld/**/*.wdb
firmware/cpld/**/*.xml
firmware/cpld/**/*.xmsgs
firmware/cpld/**/*.xrpt
firmware/cpld/**/*.xsl
firmware/cpld/**/*.xst
firmware/cpld/**/*.xwbt
firmware/**/build
*.pyc
================================================
FILE: .gitmodules
================================================
[submodule "firmware/libopencm3"]
path = firmware/libopencm3
url = https://github.com/mossmann/libopencm3.git
[submodule "hardware/gsg-kicad-lib"]
path = hardware/gsg-kicad-lib
url = https://github.com/greatscottgadgets/gsg-kicad-lib.git
================================================
FILE: .readthedocs.yaml
================================================
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the OS, Python version and other tools
build:
os: ubuntu-22.04
tools:
python: "3.12"
# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# Build PDF for docs
formats:
- pdf
python:
install:
- requirements: docs/requirements.txt
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
straithe@greatscottgadgets.com.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
================================================
FILE: COPYING
================================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
================================================
FILE: Dockerfile
================================================
# Environment for HackRF HIL testing with Jenkins CI
FROM ubuntu:22.04
USER root
# Copy usb hub script from Jenkins' container
COPY --from=gsg-jenkins /startup/hubs.py /startup/hubs.py
COPY --from=gsg-jenkins /startup/.hubs /startup/.hubs
RUN ln -s /startup/hubs.py /usr/local/bin/hubs
# Override interactive installations and install software dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
curl \
dfu-util \
gcc-arm-none-eabi \
git \
libfftw3-dev \
libusb-1.0-0-dev \
pkg-config \
python3 \
python3-pip \
python3-yaml \
usbutils \
&& rm -rf /var/lib/apt/lists/*
# Install USB hub PPPS dependencies
RUN pip3 install numpy python-dotenv git+https://github.com/CapableRobot/CapableRobot_USBHub_Driver --upgrade
RUN curl -L https://github.com/mvp/uhubctl/archive/refs/tags/v2.5.0.tar.gz > uhubctl-2.5.0.tar.gz \
&& mkdir uhubctl-2.5.0 \
&& tar -xvzf uhubctl-2.5.0.tar.gz -C uhubctl-2.5.0 --strip-components 1 \
&& rm uhubctl-2.5.0.tar.gz \
&& cd uhubctl-2.5.0 \
&& make \
&& make install
# Inform Docker that the container is listening on port 8080 at runtime
EXPOSE 8080
================================================
FILE: Jenkinsfile
================================================
import org.jenkinsci.plugins.workflow.steps.FlowInterruptedException
pipeline {
agent any
stages {
stage('Build Docker Image') {
steps {
sh 'docker build -t hackrf https://github.com/greatscottgadgets/hackrf.git'
}
}
stage('Test HackRF One') {
agent {
docker {
image 'hackrf'
reuseNode true
args '''--group-add=20 --group-add=46 --device-cgroup-rule="c 189:* rmw" \
--device-cgroup-rule="c 166:* rmw" -v /dev/bus/usb:/dev/bus/usb \
-v /tmp/req_pipe:/tmp/req_pipe -v /tmp/res_pipe:/tmp/res_pipe'''
}
}
steps {
sh './ci-scripts/install_host.sh'
sh './ci-scripts/build_h1_firmware.sh'
script {
try {
// Allow 20 seconds for the USB hub port power server to respond
timeout(time: 20, unit: 'SECONDS') {
sh 'hubs all off'
}
} catch (FlowInterruptedException err) {
// Check if the cause was specifically an exceeded timeout
def cause = err.getCauses().get(0)
if (cause instanceof org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.ExceededTimeout) {
echo "USB hub port power server command timeout reached."
throw err // Re-throw the exception to fail the build
} else {
echo "Build interrupted for another reason."
throw err // Re-throw the exception to fail the build
}
} catch (Exception err) {
echo "An unrelated error occurred: ${err.getMessage()}"
throw err
}
}
retry(3) {
script {
try {
// Allow 20 seconds for the USB hub port power server to respond
timeout(time: 20, unit: 'SECONDS') {
sh 'hubs h1_eut reset'
}
} catch (FlowInterruptedException err) {
// Check if the cause was specifically an exceeded timeout
def cause = err.getCauses().get(0)
if (cause instanceof org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.ExceededTimeout) {
echo "USB hub port power server command timeout reached."
throw err // Re-throw the exception to fail the build
} else {
echo "Build interrupted for another reason."
throw err // Re-throw the exception to fail the build
}
} catch (Exception err) {
echo "An unrelated error occurred: ${err.getMessage()}"
throw err
}
}
sh 'sleep 1s'
sh './ci-scripts/test_host.sh'
}
retry(3) {
script {
try {
// Allow 20 seconds for the USB hub port power server to respond
timeout(time: 20, unit: 'SECONDS') {
sh 'hubs h1_tester h1_eut reset'
}
} catch (FlowInterruptedException err) {
// Check if the cause was specifically an exceeded timeout
def cause = err.getCauses().get(0)
if (cause instanceof org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.ExceededTimeout) {
echo "USB hub port power server command timeout reached."
throw err // Re-throw the exception to fail the build
} else {
echo "Build interrupted for another reason."
throw err // Re-throw the exception to fail the build
}
} catch (Exception err) {
echo "An unrelated error occurred: ${err.getMessage()}"
throw err
}
}
sh 'sleep 1s'
script {
try {
// Allow 5 minutes for the test to run
timeout(time: 5, unit: 'MINUTES') {
sh '''python3 ci-scripts/hackrf_test.py --ci --log log \
--hostdir host/build/hackrf-tools/src/ \
--fwupdate firmware/hackrf_usb/build/ \
--tester 0000000000000000325866e629a25623 \
--eut RunningFromRAM --unattended --rev r4'''
}
} catch (FlowInterruptedException err) {
// Check if the cause was specifically an exceeded timeout
def cause = err.getCauses().get(0)
if (cause instanceof org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.ExceededTimeout) {
echo "HackRF One Test timeout limit reached."
throw err // Re-throw the exception to fail the build
} else {
echo "Build interrupted for another reason."
throw err // Re-throw the exception to fail the build
}
} catch (Exception err) {
echo "An unrelated error occurred: ${err.getMessage()}"
throw err
}
}
script {
try {
// Allow 20 seconds for the USB hub port power server to respond
timeout(time: 20, unit: 'SECONDS') {
sh 'hubs all off'
}
} catch (FlowInterruptedException err) {
// Check if the cause was specifically an exceeded timeout
def cause = err.getCauses().get(0)
if (cause instanceof org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.ExceededTimeout) {
echo "USB hub port power server command timeout reached."
throw err // Re-throw the exception to fail the build
} else {
echo "Build interrupted for another reason."
throw err // Re-throw the exception to fail the build
}
} catch (Exception err) {
echo "An unrelated error occurred: ${err.getMessage()}"
throw err
}
}
}
retry(3) {
script {
try {
// Allow 20 seconds for the USB hub port power server to respond
timeout(time: 20, unit: 'SECONDS') {
sh 'hubs h1_eut reset'
}
} catch (FlowInterruptedException err) {
// Check if the cause was specifically an exceeded timeout
def cause = err.getCauses().get(0)
if (cause instanceof org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.ExceededTimeout) {
echo "USB hub port power server command timeout reached."
throw err // Re-throw the exception to fail the build
} else {
echo "Build interrupted for another reason."
throw err // Re-throw the exception to fail the build
}
} catch (Exception err) {
echo "An unrelated error occurred: ${err.getMessage()}"
throw err
}
}
sh 'sleep 1s'
sh 'python3 ci-scripts/test_sgpio_debug.py'
}
}
}
stage('Test HackRF Pro') {
agent {
docker {
image 'hackrf'
reuseNode true
args '''--group-add=20 --group-add=46 --device-cgroup-rule="c 189:* rmw" \
--device-cgroup-rule="c 166:* rmw" -v /dev/bus/usb:/dev/bus/usb \
-v /tmp/req_pipe:/tmp/req_pipe -v /tmp/res_pipe:/tmp/res_pipe'''
}
}
steps {
sh './ci-scripts/install_host.sh'
sh './ci-scripts/build_hpro_firmware.sh'
script {
try {
// Allow 20 seconds for the USB hub port power server to respond
timeout(time: 20, unit: 'SECONDS') {
sh 'hubs all off'
}
} catch (FlowInterruptedException err) {
// Check if the cause was specifically an exceeded timeout
def cause = err.getCauses().get(0)
if (cause instanceof org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.ExceededTimeout) {
echo "USB hub port power server command timeout reached."
throw err // Re-throw the exception to fail the build
} else {
echo "Build interrupted for another reason."
throw err // Re-throw the exception to fail the build
}
} catch (Exception err) {
echo "An unrelated error occurred: ${err.getMessage()}"
throw err
}
}
retry(3) {
script {
try {
// Allow 20 seconds for the USB hub port power server to respond
timeout(time: 20, unit: 'SECONDS') {
sh 'hubs hpro_eut reset'
}
} catch (FlowInterruptedException err) {
// Check if the cause was specifically an exceeded timeout
def cause = err.getCauses().get(0)
if (cause instanceof org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.ExceededTimeout) {
echo "USB hub port power server command timeout reached."
throw err // Re-throw the exception to fail the build
} else {
echo "Build interrupted for another reason."
throw err // Re-throw the exception to fail the build
}
} catch (Exception err) {
echo "An unrelated error occurred: ${err.getMessage()}"
throw err
}
}
sh 'sleep 1s'
sh './ci-scripts/test_host.sh'
}
retry(3) {
script {
try {
// Allow 10 seconds for the USB hub port power server to respond
timeout(time: 20, unit: 'SECONDS') {
sh 'hubs hpro_tester hpro_eut reset'
}
} catch (FlowInterruptedException err) {
// Check if the cause was specifically an exceeded timeout
def cause = err.getCauses().get(0)
if (cause instanceof org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.ExceededTimeout) {
echo "USB hub port power server command timeout reached."
throw err // Re-throw the exception to fail the build
} else {
echo "Build interrupted for another reason."
throw err // Re-throw the exception to fail the build
}
} catch (Exception err) {
echo "An unrelated error occurred: ${err.getMessage()}"
throw err
}
}
sh 'sleep 1s'
script {
try {
// Allow 5 minutes for the test to run
timeout(time: 5, unit: 'MINUTES') {
sh '''python3 ci-scripts/hackrf_pro_test.py --ci --log log \
--hostdir host/build/hackrf-tools/src \
--fwupdate firmware/hackrf_usb/build \
--tester 0000000000000000a06063c82338145f \
--eut RunningFromRAM -p --rev r1.2'''
}
} catch (FlowInterruptedException err) {
// Check if the cause was specifically an exceeded timeout
def cause = err.getCauses().get(0)
if (cause instanceof org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.ExceededTimeout) {
echo "HackRF Pro Test timeout limit reached."
throw err // Re-throw the exception to fail the build
} else {
echo "Build interrupted for another reason."
throw err // Re-throw the exception to fail the build
}
} catch (Exception err) {
echo "An unrelated error occurred: ${err.getMessage()}"
throw err
}
}
}
}
}
}
post {
always {
cleanWs(cleanWhenNotBuilt: false,
deleteDirs: true,
disableDeferredWipeout: true,
notFailBuild: true)
}
}
}
================================================
FILE: Readme.md
================================================
# HackRF
This repository contains hardware designs and software for HackRF,
a low cost, open source Software Defined Radio platform.

(photo by fd0 from https://github.com/fd0/hackrf-one-pictures)
principal author: Michael Ossmann <mike@ossmann.com>
Information on HackRF and purchasing HackRF: https://greatscottgadgets.com/hackrf/
--------------------
# Documentation
Documentation for HackRF can be viewed on [Read the Docs](https://hackrf.readthedocs.io/en/latest/). The raw documentation files for HackRF are in the [docs folder](https://github.com/mossmann/hackrf/tree/master/docs) in this repository and can be built locally by installing [Sphinx Docs](https://www.sphinx-doc.org/en/master/usage/installation.html) and running `make html`. Documentation changes can be submitted through pull request and suggestions can be made as GitHub issues.
To create a PDF of the HackRF documentation from the HackRF repository while on Ubuntu:
* run `sudo apt install latexmk texlive-latex-extra`
* navigate to hackrf/docs on command line
* run the command `make latex`
* run the command `make latexpdf`
--------------------
# Getting Help
Before asking for help with HackRF, check to see if your question is listed on the [troubleshooting page](https://hackrf.readthedocs.io/en/latest/troubleshooting.html).
For assistance with HackRF general use or development, please look at the [issues on the GitHub project](https://github.com/greatscottgadgets/hackrf/issues). This is the preferred place to ask questions so that others may locate the answer to your question in the future.
We invite you to join our community discussions on [Discord](https://discord.gg/rsfMw3rsU8). Note that while technical support requests are welcome here, we do not have support staff on duty at all times. Be sure to also submit an issue on GitHub if you've found a bug or if you want to ensure that your request will be tracked and not overlooked.
If you wish to see past discussions and questions about HackRF, you may also view the [mailing list archives](https://pairlist9.pair.net/pipermail/hackrf-dev/).
GitHub issues on this repository that are labelled "technical support" by Great Scott Gadgets employees can expect a response time of two weeks. We currently do not have expected response times for other GitHub issues or pull requests for this repository.
================================================
FILE: TRADEMARK
================================================
"HackRF" is a trademark of Great Scott Gadgets. Permission to use the trademark
with attribution to Great Scott Gadgets is granted to all licensees of HackRF for
the sole purpose of naming or describing copies or derived works. (See COPYING.)
================================================
FILE: ci-scripts/build_h1_firmware.sh
================================================
#!/bin/bash
set -e
git submodule init
git submodule update
cd firmware/hackrf_usb
cmake -B build
cmake --build build
cd ../..
================================================
FILE: ci-scripts/build_hpro_firmware.sh
================================================
#!/bin/bash
set -e
git submodule init
git submodule update
cd firmware/hackrf_usb
cmake -DBOARD=PRALINE -B build
cmake --build build
cd ../..
================================================
FILE: ci-scripts/hackrf_pro_test.py
================================================
#!/usr/bin/env python3
import sys
import subprocess
import time
import os, shutil
import usb
from datetime import datetime
from dataclasses import dataclass
import argparse
import numpy as np
import traceback
import re
DFU_UTIL = "/usr/bin/dfu-util"
TMP_DIR = "/tmp/"
WAVEFORM = TMP_DIR + "waveform100"
NOISE = TMP_DIR + "noise"
VENDOR_ID = 0x1d50
PRODUCT_ID = 0x6089
DFU_VENDOR_ID = 0x1fc9
DFU_PRODUCT_ID = 0x000c
ONE_MHZ = 1000000
TIMEOUT = 5
MAX_PPM = 20
MAX_BASELINE = -20
SIGNAL_THRESHOLD = -25
MAX_DC_DBC = -27
MAX_M_DBC = -27
MAX_MH2_DBC = -40
MAX_H2_DBC = -39
MAX_OTHER_DBC = -34
LP2_CORRECTION = 10
MAX_POWER = -10
IF_REQUIRED_MIN = 2320
IF_REQUIRED_MAX = 2580
IF_TEST_RANGE = 256
SLEEP_TIME = 0.05 # seconds to wait between start of TX and start of RX
@dataclass
class TestCase():
name: str
freq: int
amp: bool
direction: str
base_ecode: int
rx_lna_gain: int
rx_vga_gain: int
tx_gain: int
# Try to keep rx_lna_gain and rx_vga_gain between 8 and 32.
bp1txamp = TestCase(name="BP1-TX-amp", freq=2500, amp=True, direction="tx",
base_ecode=320, rx_lna_gain=8, rx_vga_gain=16, tx_gain=5)
lp1txamp = TestCase(name="LP1-TX-amp", freq=915, amp=True, direction="tx",
base_ecode=420, rx_lna_gain=8, rx_vga_gain=16, tx_gain=14)
lp2txamp = TestCase(name="LP2-TX-amp", freq=12, amp=True, direction="tx",
base_ecode=2420, rx_lna_gain=8, rx_vga_gain=16, tx_gain=13)
hp1txamp = TestCase(name="HP1-TX-amp", freq=5995, amp=True, direction="tx",
base_ecode=520, rx_lna_gain=32, rx_vga_gain=16, tx_gain=18)
bp1txnoamp = TestCase(name="BP1-TX-noamp", freq=2500, amp=False, direction="tx",
base_ecode=350, rx_lna_gain=16, rx_vga_gain=16, tx_gain=14)
lp1txnoamp = TestCase(name="LP1-TX-noamp", freq=915, amp=False, direction="tx",
base_ecode=450, rx_lna_gain=16, rx_vga_gain=12, tx_gain=27)
lp2txnoamp = TestCase(name="LP2-TX-noamp", freq=12, amp=False, direction="tx",
base_ecode=2450, rx_lna_gain=16, rx_vga_gain=18, tx_gain=20)
hp1txnoamp = TestCase(name="HP1-TX-noamp", freq=5995, amp=False, direction="tx",
base_ecode=550, rx_lna_gain=32, rx_vga_gain=24, tx_gain=19)
# Much of the information in the RX test cases is a duplication of information
# in the TX test cases, but it's easier to keep legacy error codes this way.
bp1rxamp = TestCase(name="BP1-RX-amp", freq=2500, amp=True, direction="rx",
base_ecode=620, rx_lna_gain=8, rx_vga_gain=16, tx_gain=16)
lp1rxamp = TestCase(name="LP1-RX-amp", freq=915, amp=True, direction="rx",
base_ecode=720, rx_lna_gain=16, rx_vga_gain=16, tx_gain=18)
lp2rxamp = TestCase(name="LP2-RX-amp", freq=12, amp=True, direction="rx",
base_ecode=2720, rx_lna_gain=16, rx_vga_gain=16, tx_gain=18)
hp1rxamp = TestCase(name="HP1-RX-amp", freq=5995, amp=True, direction="rx",
base_ecode=820, rx_lna_gain=16, rx_vga_gain=28, tx_gain=38)
bp1rxnoamp = TestCase(name="BP1-RX-noamp", freq=2500, amp=False, direction="rx",
base_ecode=650, rx_lna_gain=16, rx_vga_gain=16, tx_gain=15)
lp1rxnoamp = TestCase(name="LP1-RX-noamp", freq=915, amp=False, direction="rx",
base_ecode=750, rx_lna_gain=16, rx_vga_gain=16, tx_gain=35)
lp2rxnoamp = TestCase(name="LP2-RX-noamp", freq=12, amp=False, direction="rx",
base_ecode=2750, rx_lna_gain=16, rx_vga_gain=16, tx_gain=38)
hp1rxnoamp = TestCase(name="HP1-RX-noamp", freq=5995, amp=False, direction="rx",
base_ecode=850, rx_lna_gain=16, rx_vga_gain=36, tx_gain=46)
praline_rf_test_cases = (
bp1txamp, lp1txamp, lp2txamp, hp1txamp,
bp1txnoamp, lp1txnoamp, lp2txnoamp, hp1txnoamp,
bp1rxamp, lp1rxamp, lp2rxamp, hp1rxamp,
bp1rxnoamp, lp1rxnoamp, lp2rxnoamp, hp1rxnoamp)
# Praline r1.1.0 requires different gain configuration
r110_bp1rxnoamp = TestCase(name="BP1-RX-noamp", freq=2500, amp=False, direction="rx",
base_ecode=650, rx_lna_gain=16, rx_vga_gain=16, tx_gain=15)
r110_lp1rxnoamp = TestCase(name="LP1-RX-noamp", freq=915, amp=False, direction="rx",
base_ecode=750, rx_lna_gain=16, rx_vga_gain=16, tx_gain=35)
r110_lp2rxnoamp = TestCase(name="LP2-RX-noamp", freq=12, amp=False, direction="rx",
base_ecode=2750, rx_lna_gain=16, rx_vga_gain=16, tx_gain=38)
r110_hp1rxnoamp = TestCase(name="HP1-RX-noamp", freq=5995, amp=False, direction="rx",
base_ecode=850, rx_lna_gain=16, rx_vga_gain=36, tx_gain=46)
r110_bp1txamp = TestCase(name="BP1-TX-amp", freq=2500, amp=True, direction="tx",
base_ecode=320, rx_lna_gain=8, rx_vga_gain=16, tx_gain=5)
r110_lp1txamp = TestCase(name="LP1-TX-amp", freq=915, amp=True, direction="tx",
base_ecode=420, rx_lna_gain=8, rx_vga_gain=16, tx_gain=10)
r110_lp2txamp = TestCase(name="LP2-TX-amp", freq=12, amp=True, direction="tx",
base_ecode=2420, rx_lna_gain=8, rx_vga_gain=16, tx_gain=12)
r110_hp1txamp = TestCase(name="HP1-TX-amp", freq=5995, amp=True, direction="tx",
base_ecode=520, rx_lna_gain=32, rx_vga_gain=16, tx_gain=17)
r110_bp1txnoamp = TestCase(name="BP1-TX-noamp", freq=2500, amp=False, direction="tx",
base_ecode=350, rx_lna_gain=16, rx_vga_gain=16, tx_gain=13)
r110_lp1txnoamp = TestCase(name="LP1-TX-noamp", freq=915, amp=False, direction="tx",
base_ecode=450, rx_lna_gain=16, rx_vga_gain=12, tx_gain=23)
r110_lp2txnoamp = TestCase(name="LP2-TX-noamp", freq=12, amp=False, direction="tx",
base_ecode=2450, rx_lna_gain=16, rx_vga_gain=18, tx_gain=18)
r110_hp1txnoamp = TestCase(name="HP1-TX-noamp", freq=5995, amp=False, direction="tx",
base_ecode=550, rx_lna_gain=32, rx_vga_gain=24, tx_gain=18)
r110_bp1rxamp = TestCase(name="BP1-RX-amp", freq=2500, amp=True, direction="rx",
base_ecode=620, rx_lna_gain=8, rx_vga_gain=16, tx_gain=16)
r110_lp1rxamp = TestCase(name="LP1-RX-amp", freq=915, amp=True, direction="rx",
base_ecode=720, rx_lna_gain=16, rx_vga_gain=16, tx_gain=8)
r110_lp2rxamp = TestCase(name="LP2-RX-amp", freq=12, amp=True, direction="rx",
base_ecode=2720, rx_lna_gain=16, rx_vga_gain=16, tx_gain=10)
r110_hp1rxamp = TestCase(name="HP1-RX-amp", freq=5995, amp=True, direction="rx",
base_ecode=820, rx_lna_gain=16, rx_vga_gain=28, tx_gain=25)
r110_bp1rxnoamp = TestCase(name="BP1-RX-noamp", freq=2500, amp=False, direction="rx",
base_ecode=650, rx_lna_gain=16, rx_vga_gain=16, tx_gain=15)
r110_lp1rxnoamp = TestCase(name="LP1-RX-noamp", freq=915, amp=False, direction="rx",
base_ecode=750, rx_lna_gain=16, rx_vga_gain=16, tx_gain=24)
r110_lp2rxnoamp = TestCase(name="LP2-RX-noamp", freq=12, amp=False, direction="rx",
base_ecode=2750, rx_lna_gain=16, rx_vga_gain=16, tx_gain=28)
r110_hp1rxnoamp = TestCase(name="HP1-RX-noamp", freq=5995, amp=False, direction="rx",
base_ecode=850, rx_lna_gain=16, rx_vga_gain=36, tx_gain=30)
praline_r110_rf_test_cases = (
r110_bp1txamp, r110_lp1txamp, r110_lp2txamp, r110_hp1txamp,
r110_bp1txnoamp, r110_lp1txnoamp, r110_lp2txnoamp, r110_hp1txnoamp,
r110_bp1rxamp, r110_lp1rxamp, r110_lp2rxamp, r110_hp1rxamp,
r110_bp1rxnoamp, r110_lp1rxnoamp, r110_lp2rxnoamp, r110_hp1rxnoamp)
ifmin = TestCase(name="IF-min", freq=IF_REQUIRED_MIN, amp=None, direction=None,
base_ecode=None, rx_lna_gain=16, rx_vga_gain=16, tx_gain=12)
ifmax = TestCase(name="IF-max", freq=IF_REQUIRED_MAX, amp=None, direction=None,
base_ecode=None, rx_lna_gain=16, rx_vga_gain=16, tx_gain=18)
ppm = TestCase(name="PPM", freq=2507, amp=False, direction=None,
base_ecode=None, rx_lna_gain=16, rx_vga_gain=16, tx_gain=18)
noise = TestCase(name="Noise", freq=2550, amp=True, direction=None,
base_ecode=None, rx_lna_gain=40, rx_vga_gain=52, tx_gain=None)
r9_tester_cal = [1.1, 0.4, 0.4, 1.1, 0.8, 0.2, 0.6, 1.6, -0.4, -1.2, -1.1, 1.1, -1.4, -0.9, 0.1, 1.8]
r9_eut_cal = [-1.1, -1.6, -1.4, -1.3, -1.3, -0.9, 0.1, 1.8, 0.8, 1.1, 0.9, -0.2, 0.9, 0.2, 0.6, 1.5]
og_tester_cal = [-0.4, -0.3, -0.2, -0.4, -0.8, -0.5, -0., -0.1, 1.4, 2., 1.6, -0.1, 1.5, 0.7, 0.5, -0.3]
og_eut_cal = [1.8, 1.8, 1.6, 2., 1.3, 0.7, 0.5, -0.3, 0.2, -0.3, -0.5, 1.2, -0.8, -0.5, -0., -0.1]
emessages = {
1: "Wrong device placed in DFU mode",
2: "DFU device not found",
3: "Failed to parse a serial number from hackrf_info",
4: "No path to hackrf host tools found. Please provide a directory via --hostdir",
5: """Specified TESTER binary directory must be different from the found EUT bin directory
If shared TESTER/EUT binary directory is intended, omit --testerdir""",
6: "Unable to parse valid serial number from connected devices",
7: "TESTER and EUT cannot be the same device",
8: "Invalid TESTER unit, please use a HackRF One",
9: "Invalid EUT unit, please use a HackRF Pro",
10: "Clock readback failed",
11: "SGPIO RX test failed",
12: "Loopback test failed",
13: "Self-test failed, see above",
14: "FPGA configuration failed",
15: "Multiple self-test failures, see above",
16: "Mixer self-test failed",
17: "Transceiver self-test failed",
18: "32kHz oscillator test failed",
19: "Too many devices found using unique host tool directory",
20: "Factory TESTER device not found",
21: "Factory EUT device not found",
22: "SGPIO RX test timed out",
23: "Loopback test timed out",
24: "FPGA SPI test failed",
60: "Unable to program firmware via DFU",
65: "EUT not detected after DFU programming",
70: "Unable to program SPI flash",
75: "EUT not detected after flashing",
76: "Unable to reset EUT",
77: "Unable to reset TESTER",
78: "EUT not detected after reset",
79: "TESTER not detected after reset",
80: "Could not find EUT",
81: "Could not find TESTER",
82: "Found multiple candidate EUTs",
83: "Found multiple candidate TESTERs",
84: "EUT running from RAM instead of flash",
85: "TESTER running from RAM instead of flash",
86: "Couldn't parse hackrf_info output",
87: "hackrf_info command failed",
88: "Incorrect EUT hardware revision",
89: "Incorrect TESTER hardware revision",
90: "EUT has incorrect manufacturer pin strap",
91: "TESTER has incorrect manufacturer pin strap",
92: "No HackRFs found",
99: "Incorrect device name",
100: "EUT couldn't verify clkgen register",
101: "TESTER couldn't verify clkgen register",
120: "EUT couldn't verify xcvr register",
121: "TESTER couldn't verify xcvr register",
140: "EUT couldn't verify mixer register",
141: "TESTER couldn't verify mixer register",
150: "Failed RX for IF verification",
152: "Couldn't parse received power",
154: "Received power out of bounds",
160: "Insufficient IF range",
170: "RX operation failed",
172: "Couldn't parse hackrf_sweep output",
180: "Subprocess timed out",
190: "Failed to configure LEDs",
200: "hackrf_clock command failed",
210: "TESTER failed to detect EUT CLKOUT",
211: "EUT failed to detect TESTER CLKOUT",
212: "TESTER detected spurious CLKIN",
213: "EUT detected spurious CLKIN",
220: "Failed TESTER CLKIN activation RX",
221: "Failed EUT CLKIN activation RX",
230: "Failed TESTER PLL check",
231: "Failed EUT PLL check",
232: "TESTER PLL failed to lock",
233: "EUT PLL failed to lock",
240: "Clock synchronization failure",
250: "Failed PPM detection sweep",
252: "Couldn't parse PPM test sweep data",
254: "TESTER couldn't detect PPM test transmission",
255: "EUT couldn't detect PPM test transmission",
260: "Frequency error exceeds limit",
300: "Failed baseline RX",
302: "Couldn't parse baseline RX power",
306: "Baseline RX power too high",
310: "Failed noise RX",
311: "Couldn't parse noise RX power",
312: "Noise RX power out of range",
313: "Required noise gain out of range",
315: "Couldn't read noise RX file",
316: "Too little variation in ADC bit",
317: "ADC bit correlates strongly with another bit",
321: "Excessive TX DC offset in AMP txbp1",
322: "insufficient signal strength in AMP txbp1",
323: "AMP txbp1 clipping",
325: "peak found at unexpected frequency in AMP txbp1",
330: "harmonics detected in AMP txbp1",
335: "neighbor magnitude exceeded in AMP txbp1",
340: "neighbor magnitude exceeded in AMP txbp1",
345: "spectrum mirrored or inverted in AMP txbp1",
350: "excessive power out of channel in AMP txbp1",
351: "Excessive TX DC offset in NOAMP txbp1",
352: "insufficient signal strength in NOAMP txbp1",
353: "NOAMP txbp1 clipping",
355: "peak found at unexpected frequency in NOAMP txbp1",
360: "harmonics detected in NOAMP txbp1",
365: "neighbor magnitude exceeded in NOAMP txbp1",
370: "neighbor magnitude exceeded in NOAMP txbp1",
375: "spectrum mirrored or inverted in NOAMP txbp1",
380: "excessive power out of channel in NOAMP txbp1",
421: "Excessive TX DC offset in AMP txlp1",
422: "insufficient signal strength in AMP txlp1",
423: "AMP txlp1 clipping",
425: "peak found at unexpected frequency in AMP txlp1",
430: "harmonics detected in AMP txlp1",
435: "neighbor magnitude exceeded in AMP txlp1",
440: "neighbor magnitude exceeded in AMP txlp1",
445: "spectrum mirrored or inverted in AMP txlp1",
450: "excessive power out of channel in AMP txlp1",
451: "Excessive TX DC offset in NOAMP txlp1",
452: "insufficient signal strength in NOAMP txlp1",
453: "NOAMP txlp1 clipping",
455: "peak found at unexpected frequency in NOAMP txlp1",
460: "harmonics detected in NOAMP txlp1",
465: "neighbor magnitude exceeded in NOAMP txlp1",
470: "neighbor magnitude exceeded in NOAMP txlp1",
475: "spectrum mirrored or inverted in NOAMP txlp1",
480: "excessive power out of channel in NOAMP txlp1",
2421: "Excessive TX DC offset in AMP txlp2",
2422: "insufficient signal strength in AMP txlp2",
2423: "AMP txlp2 clipping",
2425: "peak found at unexpected frequency in AMP txlp2",
2430: "harmonics detected in AMP txlp2",
2435: "neighbor magnitude exceeded in AMP txlp2",
2440: "neighbor magnitude exceeded in AMP txlp2",
2445: "spectrum mirrored or inverted in AMP txlp2",
2450: "excessive power out of channel in AMP txlp2",
2451: "Excessive TX DC offset in NOAMP txlp2",
2452: "insufficient signal strength in NOAMP txlp2",
2453: "NOAMP txlp2 clipping",
2455: "peak found at unexpected frequency in NOAMP txlp2",
2460: "harmonics detected in NOAMP txlp2",
2465: "neighbor magnitude exceeded in NOAMP txlp2",
2470: "neighbor magnitude exceeded in NOAMP txlp2",
2475: "spectrum mirrored or inverted in NOAMP txlp2",
2480: "excessive power out of channel in NOAMP txlp2",
521: "Excessive TX DC offset in AMP txhp1",
522: "insufficient signal strength in AMP txhp1",
523: "AMP txhp1 clipping",
525: "peak found at unexpected frequency in AMP txhp1",
530: "harmonics detected in AMP txhp1",
535: "neighbor magnitude exceeded in AMP txhp1",
540: "neighbor magnitude exceeded in AMP txhp1",
545: "spectrum mirrored or inverted in AMP txhp1",
550: "excessive power out of channel in AMP txhp1",
551: "Excessive TX DC offset in NOAMP txhp1",
552: "insufficient signal strength in NOAMP txhp1",
553: "NOAMP txhp1 clipping",
555: "peak found at unexpected frequency in NOAMP txhp1",
560: "harmonics detected in NOAMP txhp1",
565: "neighbor magnitude exceeded in NOAMP txhp1",
570: "neighbor magnitude exceeded in NOAMP txhp1",
575: "spectrum mirrored or inverted in NOAMP txhp1",
580: "excessive power out of channel in NOAMP txhp1",
621: "Excessive TX DC offset in AMP rxbp1",
622: "insufficient signal strength in AMP rxbp1",
623: "AMP rxbp1 clipping",
625: "peak found at unexpected frequency in AMP rxbp1",
630: "harmonics detected in AMP rxbp1",
635: "neighbor magnitude exceeded in AMP rxbp1",
640: "neighbor magnitude exceeded in AMP rxbp1",
645: "spectrum mirrored or inverted in AMP rxbp1",
650: "excessive power out of channel in AMP rxbp1",
651: "Excessive TX DC offset in NOAMP rxbp1",
652: "insufficient signal strength in NOAMP rxbp1",
653: "NOAMP rxbp1 clipping",
655: "peak found at unexpected frequency in NOAMP rxbp1",
660: "harmonics detected in NOAMP rxbp1",
665: "neighbor magnitude exceeded in NOAMP rxbp1",
670: "neighbor magnitude exceeded in NOAMP rxbp1",
675: "spectrum mirrored or inverted in NOAMP rxbp1",
680: "excessive power out of channel in NOAMP rxbp1",
721: "Excessive TX DC offset in AMP rxlp1",
722: "insufficient signal strength in AMP rxlp1",
723: "AMP rxlp1 clipping",
725: "peak found at unexpected frequency in AMP rxlp1",
730: "harmonics detected in AMP rxlp1",
735: "neighbor magnitude exceeded in AMP rxlp1",
740: "neighbor magnitude exceeded in AMP rxlp1",
745: "spectrum mirrored or inverted in AMP rxlp1",
750: "excessive power out of channel in AMP rxlp1",
751: "Excessive TX DC offset in NOAMP rxlp1",
752: "insufficient signal strength in NOAMP rxlp1",
753: "NOAMP rxlp1 clipping",
755: "peak found at unexpected frequency in NOAMP rxlp1",
760: "harmonics detected in NOAMP rxlp1",
765: "neighbor magnitude exceeded in NOAMP rxlp1",
770: "neighbor magnitude exceeded in NOAMP rxlp1",
775: "spectrum mirrored or inverted in NOAMP rxlp1",
780: "excessive power out of channel in NOAMP rxlp1",
2721: "Excessive TX DC offset in AMP rxlp2",
2722: "insufficient signal strength in AMP rxlp2",
2723: "AMP rxlp2 clipping",
2725: "peak found at unexpected frequency in AMP rxlp2",
2730: "harmonics detected in AMP rxlp2",
2735: "neighbor magnitude exceeded in AMP rxlp2",
2740: "neighbor magnitude exceeded in AMP rxlp2",
2745: "spectrum mirrored or inverted in AMP rxlp2",
2750: "excessive power out of channel in AMP rxlp2",
2751: "Excessive TX DC offset in NOAMP rxlp2",
2752: "insufficient signal strength in NOAMP rxlp2",
2753: "NOAMP rxlp2 clipping",
2755: "peak found at unexpected frequency in NOAMP rxlp2",
2760: "harmonics detected in NOAMP rxlp2",
2765: "neighbor magnitude exceeded in NOAMP rxlp2",
2770: "neighbor magnitude exceeded in NOAMP rxlp2",
2775: "spectrum mirrored or inverted in NOAMP rxlp2",
2780: "excessive power out of channel in NOAMP rxlp2",
821: "Excessive TX DC offset in AMP rxhp1",
822: "insufficient signal strength in AMP rxhp1",
823: "AMP rxhp1 clipping",
825: "peak found at unexpected frequency in AMP rxhp1",
830: "harmonics detected in AMP rxhp1",
835: "neighbor magnitude exceeded in AMP rxhp1",
840: "neighbor magnitude exceeded in AMP rxhp1",
845: "spectrum mirrored or inverted in AMP rxhp1",
850: "excessive power out of channel in AMP rxhp1",
851: "Excessive TX DC offset in NOAMP rxhp1",
852: "insufficient signal strength in NOAMP rxhp1",
853: "NOAMP rxhp1 clipping",
855: "peak found at unexpected frequency in NOAMP rxhp1",
860: "harmonics detected in NOAMP rxhp1",
865: "neighbor magnitude exceeded in NOAMP rxhp1",
870: "neighbor magnitude exceeded in NOAMP rxhp1",
875: "spectrum mirrored or inverted in NOAMP rxhp1",
880: "excessive power out of channel in NOAMP rxhp1",
3000: "BP TX failure",
3010: "BP RX failure",
3020: "HP TX failure",
3030: "HP RX failure",
3040: "LP TX failure",
3050: "LP RX failure",
3060: "TX AMP failure",
3070: "RX AMP failure",
3080: "AMP bypass failure",
3090: "LPF failure",
3100: "HPF failure",
3110: "mixer bypass failure",
3120: "mixer failure",
3130: "TX failure",
3140: "RX failure",
3150: "mixer TX failure",
3160: "mixer RX failure",
3170: "LP2 TX failure",
3180: "LP2 RX failure",
3190: "LP2 TX/RX failure",
3200: "total RF failure",
3210: "multiple RF failures, see list above",
3220: "multiple clipping failures",
3230: "TX clipping failure",
3240: "RX clipping failure"
}
def fail_rf(errors):
# check for combinations of RF errors
ecode = 0
eset = set(errors)
# error affects only bp tx
if ((322 in eset) and (422 not in eset) and (2422 not in eset) and (522 not in eset) and (622 not in eset) and (722 not in eset) and (2722 not in eset) and (822 not in eset)):
ecode = 3000
errors.append(ecode)
# error affects only bp rx
if ((322 not in eset) and (422 not in eset) and (2422 not in eset) and (522 not in eset) and (622 in eset) and (722 not in eset) and (2722 not in eset) and (822 not in eset)):
ecode = 3010
errors.append(ecode)
# error affects only hp tx
if ((322 not in eset) and (422 not in eset) and (2422 not in eset) and (522 in eset) and (622 not in eset) and (722 not in eset) and (2722 not in eset) and (822 not in eset)):
ecode = 3020
errors.append(ecode)
# error affects only hp rx
if ((322 not in eset) and (422 not in eset) and (2422 not in eset) and (522 not in eset) and (622 not in eset) and (722 not in eset) and (2722 not in eset) and (822 in eset)):
ecode = 3030
errors.append(ecode)
# error affects only lp tx (both lp1 and lp2)
if ((322 not in eset) and (422 in eset) and (2422 in eset) and (522 not in eset) and (622 not in eset) and (722 not in eset) and (2722 not in eset) and (822 not in eset)):
ecode = 3040
errors.append(ecode)
# error affects only lp rx (both lp1 and lp2)
if ((322 not in eset) and (422 not in eset) and (2422 not in eset) and (522 not in eset) and (622 not in eset) and (722 in eset) and (2722 in eset) and (822 not in eset)):
ecode = 3050
errors.append(ecode)
# error in tx amp path
if ((2422 in eset) and (352 not in eset) and (452 not in eset) and (2452 not in eset)):
ecode = 3060
errors.append(ecode)
# error in rx amp path
if ((2722 in eset) and (652 not in eset) and (752 not in eset) and (2752 not in eset)):
ecode = 3070
errors.append(ecode)
# error in amp bypass path
if ((352 in eset) and (452 in eset) and (2452 in eset) and (652 in eset) and (752 in eset) and (2752 in eset) and (322 not in eset) and (422 not in eset) and (2422 not in eset) and (622 not in eset) and (722 not in eset) and (2722 not in eset)):
ecode = 3080
errors.append(ecode)
# error in lpf path
if (((422 in eset) and (2422 in eset)) and ((722 in eset) and (2722 in eset)) and ((322 not in eset) and (622 not in eset)) and ((522 not in eset) and (822 not in eset))):
ecode = 3090
errors.append(ecode)
# error in hpf path
if (((522 in eset) and (822 in eset)) and ((322 not in eset) and (622 not in eset)) and ((422 not in eset) and (2422 not in eset) and (722 not in eset) and (2722 not in eset))):
ecode = 3100
errors.append(ecode)
# error affects both mixer bypass paths
if ((322 in eset) and (422 not in eset) and (2422 not in eset) and (522 not in eset) and (622 in eset) and (722 not in eset) and (2722 not in eset) and (822 not in eset)):
ecode = 3110
errors.append(ecode)
# error in mixer tx/rx
if ((322 not in eset) and ((422 in eset) or (2422 in eset)) and (522 in eset) and (622 not in eset) and ((722 in eset) or (2722 in eset) or (822 in eset))):
ecode = 3120
errors.append(ecode)
if ((322 not in eset) and ((422 in eset) or (2422 in eset) or (522 in eset)) and (622 not in eset) and ((722 in eset) and (2722 in eset) and (822 in eset))):
ecode = 3120
errors.append(ecode)
# error in all tx, no rx
if ((322 in eset) and (422 in eset) and (2422 in eset) and (522 in eset) and (622 not in eset) and (722 not in eset) and (2722 not in eset) and (822 not in eset) and (352 in eset) and (452 in eset) and (2452 in eset) and (552 in eset)):
ecode = 3130
errors.append(ecode)
# error in all rx, no tx
if ((322 not in eset) and (422 not in eset) and (2422 not in eset) and (522 not in eset) and (622 in eset) and (722 in eset) and (2722 in eset) and (822 in eset) and (652 in eset) and (752 in eset) and (2752 in eset) and (852 in eset)):
ecode = 3140
errors.append(ecode)
# error in all mixer tx
if ((322 not in eset) and (422 in eset) and (2422 in eset) and (522 in eset) and (622 not in eset) and (722 not in eset) and (2722 not in eset) and (822 not in eset)):
ecode = 3150
errors.append(ecode)
# error in all mixer rx
if ((322 not in eset) and (422 not in eset) and (2422 not in eset) and (522 not in eset) and (622 not in eset) and (722 in eset) and (2722 in eset) and (822 in eset)):
ecode = 3160
errors.append(ecode)
# error affecting only lp2 tx
if ((322 not in eset) and (422 not in eset) and (2422 in eset) and (522 not in eset) and (622 not in eset) and (722 not in eset) and (2722 not in eset) and (822 not in eset) and (2752 in eset)):
ecode = 3170
errors.append(ecode)
# error affecting only lp2 rx
if ((322 not in eset) and (422 not in eset) and (2422 not in eset) and (522 not in eset) and (622 not in eset) and (722 not in eset) and (2722 in eset) and (822 not in eset) and (2752 in eset)):
ecode = 3180
errors.append(ecode)
# error affecting only lp2 rx/tx
if ((322 not in eset) and (422 not in eset) and (2422 in eset) and (522 not in eset) and (622 not in eset) and (722 not in eset) and (2722 in eset) and (822 not in eset)):
ecode = 3190
errors.append(ecode)
# error in all rx/tx
if ((322 in eset) and (422 in eset) and (2422 in eset) and (522 in eset) and (622 in eset) and (722 in eset) and (2722 in eset) and (822 in eset)):
ecode = 3200
errors.append(ecode)
# If there are clipping failures, we can't trust the other RF results, so fail().
tx_clipping_count = 0
rx_clipping_count = 0
for code in (323, 353, 423, 453, 2423, 2453, 523, 553):
if code in eset:
tx_clipping_count += 1
for code in (623, 653, 723, 753, 2723, 2753, 823, 853):
if code in eset:
rx_clipping_count += 1
if tx_clipping_count > 1 and rx_clipping_count == 0:
fail(3230)
elif tx_clipping_count == 0 and rx_clipping_count > 1:
fail(3240)
elif tx_clipping_count > 0 and rx_clipping_count > 0:
fail(3220)
elif (not ecode) and (len(errors) > 1):
# multiple failures without a logical grouping
ecode = 3210
errors.append(ecode)
for error in errors[:-1]:
out(f"RF failure {error}: {emessages[error]}")
fail(errors[-1])
def log(message=""):
if args.log:
with open(args.log, "a") as log_file:
print(message, file=log_file)
return
def out(message=""):
log(message)
print(message)
def fail(error_code):
out(f"FAIL {error_code}: {emessages[error_code]}")
sys.exit(2)
class HackRF:
def __init__(self, name, bin_dir, serial, mf_check, id=None, revision=None, unique_bin=False, factory_test=False):
self.name = name
self.bin_dir = bin_dir
self.unique_bin = unique_bin
self.id = None
self.revision = None
self.serial = None
self.clkout_connected = False
self.tester_cal = [0] * 16
self.eut_cal = [0] * 16
self.errors = []
self.unit_number = 0
self.partner = None
if self.name == "TESTER":
self.unit_number = 1
elif self.name == "EUT":
self.rf_test_cases = praline_rf_test_cases
else:
fail(99)
info = subprocess.run([bin_dir + "/hackrf_info"], capture_output=True,
encoding="utf-8", timeout=TIMEOUT)
log(info.stdout + info.stderr)
if info.returncode != 0 or "failed" in info.stderr:
fail(87)
# parse the hackrf_info output
count = info.stdout.count("Found HackRF")
if count < 1:
fail(92)
if count > 1 and self.name == "TESTER" and self.unique_bin:
fail(83)
if mf_check and "does not appear to have been manufactured by Great Scott Gadgets" in info.stdout:
fail(90 + self.unit_number)
try:
sn = ""
devices_list = [d.strip() for d in info.stdout.split("Found HackRF") if d.strip()]
for device in devices_list:
sn_found = re.search(r'Serial number: \w+', device)
if sn_found:
sn = sn_found.group(0).split(': ')[1]
id_found = re.search(r'Board ID Number: .', device)
if id_found:
id = id_found.group(0).split(': ')[1]
rev_found = re.search(r'Hardware Revision: .+', device)
if rev_found:
rev = rev_found.group(0).split(': ')[1]
if sn == serial:
self.serial = sn
self.id = id
self.revision = rev
break
out(f"{self.name} Serial number: {self.serial}")
out(f"{self.name} Board ID: {self.id}")
out(f"{self.name} Hardware Revision: {self.revision}")
out(f"{self.name} binary directory {self.bin_dir}")
except:
out(traceback.format_exc())
fail(6)
if self.serial == None:
fail(80 + self.unit_number)
if self.name == "TESTER" and factory_test and (self.id != "2" and self.id != "4"):
fail(8)
elif self.name == "EUT" and factory_test and self.id != "5":
fail(9)
if revision and self.revision != revision:
fail(88 + self.unit_number)
if self.revision == "r9":
self.tester_cal = r9_tester_cal
self.eut_cal = r9_eut_cal
else:
self.tester_cal = og_tester_cal
self.eut_cal = og_eut_cal
if self.name == "EUT" and self.id == "5" and self.revision == "r1.1":
self.rf_test_cases = praline_r110_rf_test_cases
def clkin(self):
if self.name == "EUT" and self.id == "5":
debug = subprocess.run([self.bin_dir + "/hackrf_debug", "-d", self.serial,
"-C", "0"])
command = subprocess.run([self.bin_dir + "/hackrf_clock", "-i", "-d",
self.serial], capture_output=True, encoding="utf-8",
timeout=TIMEOUT)
if command.returncode != 0:
log(command.stdout + command.stderr)
out(f"{self.name} CLKIN request failed")
fail(200)
if "no clock signal detected" in command.stdout:
log(f"{self.name}: no clock signal detected")
return False
elif "clock signal detected" in command.stdout:
log(f"{self.name}: clock signal detected")
return True
else:
log(command.stdout + command.stderr)
out(f"Couldn't parse {self.name} CLKIN status")
fail(200)
# Warning: Avoid clock loops by disabling your partner's CLKOUT before
# enabling your own.
def clkout(self, enable):
command = subprocess.run([self.bin_dir + "/hackrf_clock", "-o",
"1" if enable else "0", "-d", self.serial], capture_output=True,
encoding="utf-8", timeout=TIMEOUT)
if command.returncode != 0:
log(command.stdout + command.stderr)
out(f"{self.name} CLKOUT control failed")
fail(200)
if self.partner and self.clkout_connected:
timeout = time.time() + 1
while time.time() < timeout:
if self.partner.clkin() == enable:
break
if self.partner.clkin() != enable:
if enable:
fail(210 + self.unit_number)
else:
if self.name == "EUT":
out("Note: use --tcxo to use TCXO or external reference on TESTER")
fail(212 + self.unit_number)
# transceiver operation to switch clock source
source = "CLKIN" if enable else "crystal"
log(f"switching {self.partner.name} to {source}")
receive = subprocess.run([self.partner.bin_dir + "/hackrf_transfer", "-d",
self.partner.serial, "-n1", "-r", "/dev/null", "-f", "2500000000",
"-a", "0", "-l", "0", "-g", "0"], capture_output=True,
encoding="utf-8", timeout=TIMEOUT)
if receive.returncode != 0:
log(receive.stdout + receive.stderr)
fail(220 + self.unit_number)
# confirm that PLL locked to new source
expected_value = "0x01" if (enable and self.partner.revision != "r9") else "0x51"
timeout = time.time() + 1
while time.time() < timeout:
debug = subprocess.run([self.partner.bin_dir + "/hackrf_debug", "-d",
self.partner.serial, "-srn0"], capture_output=True,
encoding="utf-8", timeout=TIMEOUT)
log(debug.stdout)
if debug.returncode != 0:
log(debug.stderr)
fail(230 + self.unit_number)
if expected_value in debug.stdout:
break
if expected_value not in debug.stdout:
fail(232 + self.unit_number)
time.sleep(0.1)
else:
time.sleep(0.2)
def test_clkout(self):
assert self.clkout_connected
self.partner.clkout(False)
self.clkout(True)
frequency_error_ppm = self.clock_error_ppm()
log(f"{self.name}->{self.partner.name} CLK: {frequency_error_ppm} ppm")
if abs(frequency_error_ppm) > 1:
out(f"{self.partner.name} CLKIN: unexpected frequency error while synchronized")
fail(240)
def test_clkin(self):
self.partner.test_clkout()
def clock_error_ppm(self):
# ppm.freq is in MHz, but we use it as Hz for the FFT bin width,
# resulting in bins with a width of 1 ppm of the transmission
# frequency.
bin_width = str(ppm.freq)
tx_frequency = str(ppm.freq * ONE_MHZ)
sweep_range = f"{ppm.freq-1}:{ppm.freq+19}"
expected_bin = round(ONE_MHZ/ppm.freq)
log(f"{self.name} transmitting to {self.partner.name} for PPM measurement")
transmit = subprocess.Popen([self.bin_dir + "/hackrf_transfer", "-d",
self.serial, "-c", "127", "-a", "0", "-x", f"{ppm.tx_gain}", "-f",
tx_frequency], stdout=subprocess.PIPE, stderr=subprocess.PIPE,
encoding="utf-8")
time.sleep(SLEEP_TIME)
sweep = subprocess.run([self.partner.bin_dir + "/hackrf_sweep", "-d",
self.partner.serial, "-N", "13", "-w", bin_width, "-f", sweep_range, "-a",
"0", "-l", f"{ppm.rx_lna_gain}", "-g", f"{ppm.rx_vga_gain}"],
capture_output=True, encoding="utf-8", timeout=TIMEOUT)
if sweep.returncode != 0:
log(sweep.stdout + sweep.stderr)
fail(250)
# parse the hackrf_sweep output
try:
rows = sweep.stdout.split("\n")
# Note: skipping data from the first twelve sweeps until issue #1230 is resolved.
row = rows[48].split(", ")
bins = [float(bin) for bin in row[6:]]
peak_bin = bins.index(max(bins))
frequency_error_ppm = peak_bin - expected_bin
except:
log(sweep.stdout + sweep.stderr)
log(traceback.format_exc())
fail(252)
log(f"PPM max bin {peak_bin} power: {bins[peak_bin]}")
for row in rows[0:49:4]:
bins = [float(bin) for bin in row.split(", ")[6:]]
peak_bin = bins.index(max(bins))
log(f"peak bin {peak_bin}: {bins[peak_bin]}")
if max(bins) < SIGNAL_THRESHOLD:
fail(254 + self.unit_number)
transmit.terminate()
tx_out, tx_err = transmit.communicate(timeout=TIMEOUT)
if transmit.returncode != 0:
log(tx_out + tx_err)
out(f"Warning: {self.name} PPM test transmit failed")
return frequency_error_ppm
def test_xtal(self):
self.clkout(False)
self.partner.clkout(False)
frequency_error_ppm = self.clock_error_ppm()
out(f"{self.name} crystal frequency error: {frequency_error_ppm} ppm")
if abs(frequency_error_ppm) > MAX_PPM:
fail(260)
def verify_register(self, target, address, value):
command = subprocess.run([self.bin_dir + "/hackrf_debug",
f"--{target}", "--register", address, "--read", "--device",
self.serial], capture_output=True, encoding="UTF-8")
log(f"Checking {target} register {address}")
if value in command.stdout:
return True
else:
log("Unexpected result:")
log(command.stdout + command.stderr)
return False
def test_clkgen(self):
if not self.verify_register("si5351", "2", "0x03"):
fail(100 + self.unit_number)
def test_mixer(self):
if not self.verify_register("rffc5072", "2", "0x9055"):
fail(140 + self.unit_number)
def test_xcvr(self):
if not self.verify_register("max283", "28", "0x0c0"):
fail(120 + self.unit_number)
def test_serial(self):
log(f"Testing {self.name} serial communications")
self.test_clkgen()
self.test_mixer()
self.test_xcvr()
# Ensure that hackrf_transfer works and that the received power is within
# the expected range with no transmission active.
def baseline_rx(self, test_case):
# Test at the TX tuning frequency of measure_rf()
center_freq = (test_case.freq * ONE_MHZ) + 1500000
receive = subprocess.run([self.bin_dir + "/hackrf_transfer", "-d",
self.serial, "-n10000", "-r", "/dev/null", "-f",
f"{center_freq}", "-a", "0", "-l", f"{test_case.rx_lna_gain}",
"-g", f"{test_case.rx_vga_gain}", "-b",
"1750000"], capture_output=True, encoding="utf-8", timeout=TIMEOUT)
if receive.returncode != 0:
log(receive.stdout + receive.stderr)
log(f"Failed {self.name} {test_case.name} baseline RX")
fail(300)
output = str(receive.stderr).split()
try:
power = float(output[output.index("power") + 1])
except:
log(receive.stdout + receive.stderr)
log(traceback.format_exc())
log(f"Couldn't parse {self.name} {test_case.name} baseline RX power")
fail(302)
# The theoretical minimum power is about -48 dB. The expected power is
# about -30 dB.
log(f"{self.name} {test_case.name} baseline power: {power}")
if power > MAX_BASELINE:
fail(306)
# Check the ADC for shorts or other unexpected behavior by sampling
# amplified noise.
def noise_rx(self, test_case):
num_samples = 1000
log(f"Testing {self.name} {test_case.name}")
center_freq = test_case.freq * ONE_MHZ
low_gain = 0
high_gain = 16
while high_gain > low_gain:
gain = (high_gain + low_gain) // 2
receive = subprocess.run([self.bin_dir + "/hackrf_transfer", "-d",
self.serial, "-n", f"{num_samples*10}", "-r", f"{NOISE}", "-f",
f"{center_freq}", "-a", "1" if test_case.amp else "0", "-l",
f"{test_case.rx_lna_gain}", "-g", f"{gain*2 + 32}", "-b",
"28000000"], capture_output=True, encoding="utf-8", timeout=TIMEOUT)
if receive.returncode != 0:
log(receive.stdout + receive.stderr)
fail(310)
output = str(receive.stderr).split()
try:
power = float(output[output.index("power") + 1])
except:
log(receive.stdout + receive.stderr)
log(traceback.format_exc())
fail(311)
log(f"{self.name} {test_case.name} RX power at -g {gain*2 + 32}: {power}")
if power > -2:
high_gain = gain
elif power > -5:
break
else:
low_gain = gain + 1
# We want the power to be between -1 and -9 dB to ensure that all eight
# bits are flipped without much clipping.
if power < -9 or power > -1:
fail(312)
elif gain > 16 or gain < 4:
fail(313)
bit_count = [0] * 8
matches = []
for bit in range(8):
matches.append([0] * 8)
try:
file = open(f"{NOISE}", "rb")
data = file.read()
assert len(data) == num_samples * 20
data = data[-num_samples*2:]
for byte in data:
for bit in range(8):
bit_count[bit] += (byte>>bit)&1
for match_bit in range(bit + 1, 8):
if (byte>>bit)&1 == (byte>>match_bit)&1:
matches[bit][match_bit] += 1
except:
fail(315)
log(f"{self.name} ADC bit counts: {bit_count}")
log(f"{self.name} ADC bit matches: {matches}")
for bit in range(7):
if bit_count[bit] < (0.2 * len(data)) or bit_count[bit] > (0.8 * len(data)):
log(f"{self.name} ADC bit {bit} set in {bit_count[bit]} out of {len(data)} bytes")
fail(316)
# Check for correlations between adjacent bits except between 6 and 7 (highest).
#for match_bit in range(bit + 1, 7):
for match_bit in range(bit + 1, 8):
if matches[bit][match_bit] > (0.999 * len(data)):
out(f"{self.name} ADC bit {bit} correlates with bit {match_bit}")
fail(317)
# DC bias can cause bit 7 to be predominantly unchanged, so only
# error if there is less than 1% variation.
if bit_count[7] < (0.001 * len(data)) or bit_count[bit] > (0.999 * len(data)):
out(f"{self.name} ADC bit 7 set in {bit_count[7]} out of {len(data)} bytes")
fail(316)
def analyze_transfer(self, transfer, test_case):
# parse the hackrf_transfer output
output = str(transfer.stderr).split()
try:
power = float(output[output.index("power") + 1])
except:
log(transfer.stdout + transfer.stderr)
log(traceback.format_exc())
fail(152)
log(f"{test_case.name} power at {test_case.freq} MHz: {power}")
if test_case.base_ecode:
if power < SIGNAL_THRESHOLD:
log(f"{test_case.name} signal not strong enough")
self.errors.append(test_case.base_ecode + 2)
if power > -3:
log(f"{test_case.name} signal clipping")
self.errors.append(test_case.base_ecode + 3)
elif power < -48 or power > 0:
fail(154)
return power
# Verify that signal power at a given IF in MHz is detected.
def verify_if_tuning(self, test_case):
transmit = subprocess.Popen([self.bin_dir + "/hackrf_transfer", "-d",
self.serial, "-c", "127", "-a", "0", "-x", f"{test_case.tx_gain}",
"-i", f"{test_case.freq*ONE_MHZ}", "-m", "0", "-F"],
stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8")
time.sleep(SLEEP_TIME)
receive = subprocess.run([self.partner.bin_dir + "/hackrf_transfer", "-d",
self.partner.serial, "-n10000", "-r", "/dev/null", "-f",
f"{(test_case.freq+1)*ONE_MHZ}", "-a", "0", "-l",
f"{test_case.rx_lna_gain}", "-g", f"{test_case.rx_vga_gain}", "-b",
"2500000"], capture_output=True, encoding="utf-8", timeout=TIMEOUT)
transmit.terminate()
if receive.returncode != 0:
log(receive.stdout + receive.stderr)
fail(150)
power = self.analyze_transfer(receive, test_case)
tx_out, tx_err = transmit.communicate(timeout=TIMEOUT)
if transmit.returncode != 0:
log(tx_out + tx_err)
out(f"Warning: {self.name} IF transmit failed")
return power > SIGNAL_THRESHOLD
def test_if_range(self, min_case, max_case):
low_end = IF_REQUIRED_MIN - (IF_TEST_RANGE // 2)
min_freq = IF_REQUIRED_MIN + (IF_TEST_RANGE // 2)
while min_freq > low_end:
min_case.freq = (min_freq + low_end) // 2
if self.verify_if_tuning(min_case):
min_freq = min_case.freq
else:
low_end = min_case.freq + 1
high_end = IF_REQUIRED_MAX + (IF_TEST_RANGE // 2)
max_freq = IF_REQUIRED_MAX - (IF_TEST_RANGE // 2)
while max_freq < high_end:
max_case.freq = (max_freq + high_end + 1) // 2
if self.verify_if_tuning(max_case):
max_freq = max_case.freq
else:
high_end = max_case.freq - 1
out(f"{self.name} IF range: {min_freq}-{max_freq} MHz")
if min_freq > IF_REQUIRED_MIN or max_freq < IF_REQUIRED_MAX:
fail(160)
def analyze_sweep(self, sweep, test_case):
eut_cal = self.eut_cal[self.rf_test_cases.index(test_case)]
tester_cal = self.partner.tester_cal[self.rf_test_cases.index(test_case)]
correction = LP2_CORRECTION if test_case.freq < 30 else 0
# parse the hackrf_sweep output
try:
rows = sweep.stdout.split("\n")
# Note: skipping data from the first twelve sweeps until issue #1230 is resolved.
bins = np.zeros(225)
# average 10 sweeps
row_count = 0
for row in rows[48:88:4]:
bins += np.array([float(x) for x in row.split(", ")[6:231]])
row_count += 1
assert row_count == 10
bins /= 10
# log the raw hackrf_sweep data before calibration
log(f"{', '.join(rows[12].split(', ')[:6])}, {np.array2string(bins, separator=', ', max_line_width=3000)[1:-1]}")
# apply calibration
bins -= eut_cal
bins -= tester_cal
peak_bin = bins.argmax()
except:
log(sweep.stdout + sweep.stderr)
log(traceback.format_exc())
out(f"Couldn't parse {test_case.name} sweep data")
fail(172)
# ensure acceptable performance
log(f"peak ({peak_bin}) {test_case.name}: {bins[peak_bin]:.2f}")
if bins[peak_bin] < SIGNAL_THRESHOLD:
for row in rows[0:88:4]:
bins = [float(bin) for bin in row.split(", ")[6:]]
peak_bin = bins.index(max(bins))
log(f"peak bin {peak_bin}: {bins[peak_bin]}")
log(f"{test_case.name} signal not strong enough")
self.errors.append(test_case.base_ecode + 2)
return bins[peak_bin]
elif bins[peak_bin] > MAX_POWER:
log(f"{test_case.name} signal clipping")
self.errors.append(test_case.base_ecode + 3)
return bins[peak_bin]
tx_dc_power_dbc = bins[112] - bins[peak_bin]
if tx_dc_power_dbc > MAX_DC_DBC + correction:
log(f"{test_case.name} excessive TX DC offset {tx_dc_power_dbc:.1f} dBc")
self.errors.append(test_case.base_ecode + 1)
if peak_bin == 157:
log(f"{test_case.name} TX spectrum inverted")
self.errors.append(test_case.base_ecode + 25)
return bins[peak_bin]
elif peak_bin == 112:
log(f"{test_case.name} peak found at DC")
self.errors.append(test_case.base_ecode + 1)
return bins[peak_bin]
elif peak_bin >= 52 and peak_bin < 67:
log(f"{test_case.name} peak found at adjacent frequency")
self.errors.append(test_case.base_ecode + 15)
return bins[peak_bin]
elif peak_bin > 67 and peak_bin <= 82:
log(f"{test_case.name} peak found at adjacent frequency")
self.errors.append(test_case.base_ecode + 20)
return bins[peak_bin]
elif peak_bin != 67:
log(f"{test_case.name} peak found at unexpected frequency")
self.errors.append(test_case.base_ecode + 5)
return bins[peak_bin]
if bins[157] - bins[67] > MAX_M_DBC + correction:
log(f"{test_case.name} TX spectrum mirrored")
self.errors.append(test_case.base_ecode + 25)
if (bins[22] - bins[67]) > MAX_H2_DBC + correction:
log(f"{test_case.name} excessive TX harmonic (bin 22): {bins[22]}")
self.errors.append(test_case.base_ecode + 10)
if (bins[202] - bins[67]) > MAX_MH2_DBC + correction:
log(f"{test_case.name} excessive TX harmonic (bin 202): {bins[202]}")
self.errors.append(test_case.base_ecode + 10)
worst_other_dbc = -999
worst_other_bin = 999
for i in range(225):
# Skip various frequencies where spurs are expected (most of which have their own tests above).
if (i < 52 and i != 22) or (i > 82 and i < 111) or (i > 113 and i < 156) or (i > 158 and i != 202):
other_dbc = bins[i] - bins[67]
if other_dbc > worst_other_dbc:
worst_other_dbc = other_dbc
worst_other_bin = i
if worst_other_dbc > MAX_OTHER_DBC + correction:
log(f"{test_case.name} excessive power at unexpected frequency ({worst_other_bin}: {bins[worst_other_bin]})")
self.errors.append(test_case.base_ecode + 30)
log(f"h2 (22) {test_case.name}: {(bins[22] - bins[67]):.2f}")
log(f"DC (112) {test_case.name}: {(bins[112] - bins[67]):.2f}")
log(f"m (157) {test_case.name}: {(bins[157] - bins[67]):.2f}")
log(f"mh2 (202) {test_case.name}: {(bins[202] - bins[67]):.2f}")
log(f"other ({worst_other_bin}) {test_case.name}: {worst_other_dbc:.2f}")
#FIXME look in another row for RX inversion?
return bins[peak_bin]
def measure_rf(self, test_case, sweep=True):
log(f"Executing RF test case {test_case.name}, sweep={sweep}")
if test_case.direction == "tx":
transmitter = self
tx_amp = "1" if test_case.amp else "0"
receiver = self.partner
rx_amp = "0"
elif test_case.direction == "rx":
transmitter = self.partner
tx_amp = "0"
receiver = self
rx_amp = "1" if test_case.amp else "0"
else:
out(f"Error: Invalid direction in {test_case.name}")
sys.exit(1)
# The nominal test frequency (as specified in test_case) is 1 MHz above
# the low end of the sweep range. The transmitted signal is 500 kHz
# above the nominal frequency, and the tuning (center) frequency of the
# transmitting device is 1 MHz above that.
tx_center_freq = (test_case.freq * ONE_MHZ) + 1500000
sweep_range = f"{test_case.freq-1}:{test_case.freq+19}"
transmit = subprocess.Popen([transmitter.bin_dir + "/hackrf_transfer", "-d",
transmitter.serial, "-R", "-t", WAVEFORM, "-a", tx_amp, "-x",
f"{test_case.tx_gain}", "-f", str(tx_center_freq)],
stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8")
time.sleep(SLEEP_TIME)
if sweep:
receive = subprocess.run([receiver.bin_dir + "/hackrf_sweep",
"-d", receiver.serial, "-N", "22", "-w", "22222", "-f",
sweep_range, "-a", rx_amp, "-l", f"{test_case.rx_lna_gain}",
"-g", f"{test_case.rx_vga_gain}"], capture_output=True,
encoding="utf-8", timeout=TIMEOUT)
else:
receive = subprocess.run([receiver.bin_dir + "/hackrf_transfer",
"-d", receiver.serial, "-n10000", "-r", "/dev/null", "-f",
f"{(test_case.freq)*ONE_MHZ}", "-a", rx_amp, "-l",
f"{test_case.rx_lna_gain}", "-g", f"{test_case.rx_vga_gain}",
"-b", "2500000"], capture_output=True, encoding="utf-8",
timeout=TIMEOUT)
transmit.terminate()
if receive.returncode != 0:
log(receive.stdout + receive.stderr)
log(f"{receiver.name} Failed RX, sweep={sweep}")
fail(170)
if sweep:
rssi = self.analyze_sweep(receive, test_case)
else:
rssi = self.analyze_transfer(receive, test_case)
tx_out, tx_err = transmit.communicate(timeout=TIMEOUT)
if transmit.returncode != 0:
out(tx_out + tx_err)
out(f"Warning: {transmitter.name} transmit failed")
return rssi
def test_rf_preliminary(self):
results = []
for test_case in (self.rf_test_cases):
if test_case.amp == False:
if test_case.direction == "rx":
self.baseline_rx(test_case)
elif self.partner:
self.partner.baseline_rx(test_case)
self.noise_rx(noise)
# FIXME test for RX DC offset?
if not self.partner:
out("Skipping RF tests")
return
for test_case in (self.rf_test_cases):
results.append(int(round(self.measure_rf(test_case, sweep=False) - (SIGNAL_THRESHOLD + 11))))
log(f"Preliminary results: {results}")
if self.errors:
fail_rf(self.errors)
def test_rf(self):
assert self.partner
results = []
for test_case in (self.rf_test_cases):
results.append(int(round(self.measure_rf(test_case, sweep=True) - (SIGNAL_THRESHOLD + 5))))
out(f"RF results summary: {results}")
if self.errors:
fail_rf(self.errors)
def activate_leds(self, enable):
if enable:
out(f"Activating {self.name} LEDs")
state = 7
else:
state = 1
# Always illuminate MCU LED on Praline.
if self.id == "5":
state |= 8
command = subprocess.run([self.bin_dir + "/hackrf_debug", "-d", self.serial, "--leds",
f"{state}"], capture_output=True, encoding="utf-8", timeout=TIMEOUT)
if command.returncode != 0:
log(command.stdout + command.stderr)
log(f"Failed to configure {self.name} LEDs ({state})")
fail(190)
def debug_selftest(self):
errors = []
debug = subprocess.run([self.bin_dir + "/hackrf_debug", "-to", "-d", self.serial],
capture_output=True, encoding="utf-8", timeout=TIMEOUT)
log(debug.stdout + debug.stderr)
fpga_test_found = re.search(r'FPGA configuration: \w+', debug.stdout)
if fpga_test_found:
if fpga_test_found.group(0).split(': ')[-1] != "PASS":
errors.append(14)
else:
out("Failure to find FPGA configuration result. Wrong firmware version? Continuing...")
# Check for FPGA SPI result only if FPGA configuration passed.
if len(errors) == 0:
sgpio_test_found = re.search(r'FPGA SPI: \w+', debug.stdout)
if sgpio_test_found:
if sgpio_test_found.group(0).split(': ')[-1] != "PASS":
errors.append(24)
else:
out("Failure to find FPGA SPI test result. Wrong firmware version? Continuing...")
# Check for SGPIO result only if FPGA configuration and SPI passed.
if len(errors) == 0:
sgpio_test_found = re.search(r'SGPIO RX test: \w+', debug.stdout)
if sgpio_test_found:
if sgpio_test_found.group(0).split(': ')[-1] == "TIMEOUT":
errors.append(22)
elif sgpio_test_found.group(0).split(': ')[-1] == "FAIL":
errors.append(11)
else:
out("Failure to find sgpio test result. Wrong firmware version? Continuing...")
# Check for loopback result only if FPGA, SPI, and SGPIO passed.
if len(errors) == 0:
loopback_test_found = re.search(r'Loopback test: \w+', debug.stdout)
if loopback_test_found:
if loopback_test_found.group(0).split(': ')[-1] == "TIMEOUT":
errors.append(23)
elif loopback_test_found.group(0).split(': ')[-1] == "FAIL":
errors.append(12)
else:
out("Failure to find loopback test result. Wrong firmware version? Continuing...")
clock_found = re.search(r'Clock: \w+, \w+: \d, readback: \w+', debug.stdout)
if clock_found:
if clock_found.group(0).split(': ')[-1] != "OK":
errors.append(10)
else:
out("Failure to find clock results. Wrong firmware version? Continuing...")
mixer_found = re.search(r'Mixer: \w+, ID: \d+', debug.stdout)
if mixer_found:
if mixer_found.group(0).split(': ')[-1] != "4416":
errors.append(16)
else:
out("Failure to find mixer results. Wrong firmware version? Continuing...")
# Check for transceiver result only if FPGA configuration passed.
if 14 not in errors:
xcvr_found = re.search(r'Transceiver: \w+, RSSI mux test: \w+', debug.stdout)
if xcvr_found:
if xcvr_found.group(0).split(': ')[-1] != "PASS":
errors.append(17)
else:
out("Failure to find transceiver results. Wrong firmware version? Continuing...")
rtc_found = re.search(r'RTC test result: \w+', debug.stdout)
if rtc_found:
if rtc_found.group(0).split(': ')[-1] != "PASS":
errors.append(18)
else:
out("Failure to find 32kHz oscillator results. Wrong firmware version? Continuing...")
# Provide entire self-test report if there is an unrecognized self-test failure
if len(errors) == 0:
selftest_found = re.search(r'Self-test result: \w+', debug.stdout)
if selftest_found:
if selftest_found.group(0).split(': ')[-1] != "PASS":
out(debug.stdout)
fail(13)
else:
out("Failure to find selftest results. Wrong firmware version? Continuing...")
# Report multiple self-test failures
if len(errors) > 1:
for error in errors:
out(f"Self-test failure {error}: {emessages[error]}")
fail(15)
if len(errors) > 0:
fail(errors[-1])
def reset(self):
out(f"Resetting {self.name}")
spiflash = subprocess.run([self.bin_dir + "/hackrf_spiflash", "-d", self.serial, "-R"],
capture_output=True, encoding="utf-8", timeout=TIMEOUT)
if spiflash.returncode != 0:
out(spiflash.stdout + spiflash.stderr)
fail(76 + self.unit_number)
then = time.time()
device_found = False
while time.time() < (then + 5):
time.sleep(1)
info = subprocess.run([self.bin_dir + "/hackrf_info"],
capture_output=True, timeout=TIMEOUT)
if self.serial in info.stdout.decode('utf-8', errors='ignore'):
device_found = True
break
time.sleep(0.1)
if not device_found:
fail(78 + self.unit_number)
# This waveform is a full-scale complex exponential with a frequency of -1/10 the
# sample rate. When transmitted at 10 Msps, the frequency is 1 MHz below the
# center frequency.
def write_waveform():
tx_bytes = b'\x7f\x00\x67\xb5\x27\x87\xd9\x87\x99\xb5\x81\x00\x99\x4b\xd9\x79\x27\x79\x67\x4b'
# defective waveform with DC offset:
#tx_bytes = b'\x7f\x10\x67\xa5\x27\x97\xd9\x97\x99\xc5\x81\x10\x99\x5b\xd9\x7f\x27\x7f\x67\x5b'
# defective waveform with missing Q channel:
#tx_bytes = b'\x7f\x00\x67\x00\x27\x00\xd9\x00\x99\x00\x81\x00\x99\x00\xd9\x00\x27\x00\x67\x00'
with open(WAVEFORM, "wb") as bin_file:
for i in range(50000): # 1MB file size
bin_file.write(tx_bytes)
def program(bin_dir, fw_dir, serial, unattended=False):
binary = "hackrf_usb.bin"
dfu_stub = "hackrf_usb.dfu"
# EUTs in unattended (including Jenkins CI) setups have pins jumped to always boot into DFU mode, so resetting is undesirable
if unattended:
reset_write = "-w"
else:
reset_write = "-Rw"
if not usb.core.find(idVendor=DFU_VENDOR_ID, idProduct=DFU_PRODUCT_ID):
print("ACTION REQUIRED: Press and release EUT RESET button while holding DFU button.")
while not usb.core.find(idVendor=DFU_VENDOR_ID, idProduct=DFU_PRODUCT_ID):
time.sleep(0.1)
out("Programming EUT in DFU mode")
dfu = subprocess.run([f"{DFU_UTIL}", "--device",
f"{DFU_VENDOR_ID}:{DFU_PRODUCT_ID}", "--alt", "0", "--download",
f"{fw_dir}/{dfu_stub}"], capture_output=True, encoding="utf-8",
timeout=TIMEOUT)
out(dfu.stdout + dfu.stderr)
#dfu-util: unable to read DFU status after completion (LIBUSB_ERROR_IO)
# despite successful download; present as of at least dfu-util 0.11
if "Download done." not in dfu.stdout:
fail(60)
# Wait for device to boot from DFU.
then = time.time()
dfu_device_found = False
while time.time() < (then + 50):
dfu_info = subprocess.run([bin_dir + "/hackrf_info"], capture_output=True,
encoding="utf-8", timeout=TIMEOUT)
if "RunningFromRAM" in dfu_info.stdout:
if serial in dfu_info.stdout and serial != "RunningFromRAM":
fail(1)
else:
dfu_device_found = True
break
time.sleep(0.1)
if not dfu_device_found:
fail(2)
out("Programming EUT SPI flash")
spiflash = subprocess.run([bin_dir + "/hackrf_spiflash", "-d",
"RunningFromRAM", reset_write, f"{fw_dir}/{binary}"],
capture_output=True, encoding="utf-8", timeout=TIMEOUT+20)
if spiflash.returncode != 0:
log(spiflash.stdout + spiflash.stderr)
fail(70)
then = time.time()
device_found = False
while time.time() < (then + 5):
time.sleep(1)
flash_info = subprocess.run([bin_dir + "/hackrf_info"], capture_output=True,
timeout=TIMEOUT)
if serial == "RunningFromRAM" and not unattended:
try:
devices_list = [d.strip() for d in flash_info.stdout.decode('utf-8', errors='ignore').split("Found HackRF") if d.strip()]
for device in devices_list:
sn_found = re.search(r'Serial number: \w+', device)
if sn_found:
serial = sn_found.group(0).split(': ')[1]
except:
log(traceback.format_exc())
fail(6)
if serial in flash_info.stdout.decode('utf-8', errors='ignore'):
device_found = True
break
time.sleep(0.1)
if not device_found:
fail(75)
def find_sn(name, bin_dir, factory_test, claimed_sns=[]):
while True:
sn_list = []
info = subprocess.run([bin_dir + "/hackrf_info"], capture_output=True,
encoding="utf-8", timeout=TIMEOUT)
try:
sn = ""
devices_list = [d.strip() for d in info.stdout.split("Found HackRF") if d.strip()]
for device in devices_list:
sn_found = re.search(r'Serial number: \w+', device)
if sn_found:
new_sn = sn_found.group(0).split(': ')[1]
if new_sn not in claimed_sns:
sn_list.append(new_sn)
except:
log(traceback.format_exc())
fail(6)
if factory_test:
if len(sn_list) > 1:
fail(19)
elif len(sn_list) < 1:
if name == "TESTER":
fail(20)
elif name == "EUT":
fail(21)
else:
sn = sn_list[0]
break
else:
if len(sn_list) > 1:
out(f"\nPotential {name}(s) found:\n")
for i in range(len(sn_list)):
out(f"{i}: {sn_list[i]}")
choice = int(input(f"\nEnter the index of your target {name}s serial number: "))
if 0 <= choice < len(sn_list):
sn = sn_list[choice]
break
else:
out("Incorrect choice, try again.")
elif len(sn_list) == 1:
sn = sn_list[0]
break
else:
fail(3)
return sn
def get_version():
version = subprocess.run(["git", "log", "-n" "1", "--format=%h"],
capture_output=True, encoding="utf-8", timeout=TIMEOUT)
if version.returncode != 0:
return "2026.01.3+"
elif version.returncode == 0:
dirty = subprocess.run(["git", "status", "-s", "--untracked-files=no"],
capture_output=True, encoding="utf-8", timeout=TIMEOUT)
if dirty.stdout != "":
dirty_flag = "*"
else:
dirty_flag = ""
return f"git-{version.stdout.strip()}{dirty_flag}"
def main():
write_waveform()
parser = argparse.ArgumentParser(description="Utility for testing HackRF One")
parser.add_argument("-c", "--noclk", action="store_true", help="skip CLKIN, CLKOUT, and PPM tests")
parser.add_argument("-i", "--noif", action="store_true", help="skip IF tuning range test")
parser.add_argument("-l", "--loop", action="store_true", help="repeat the test until terminated with ctrl-c")
parser.add_argument("-m", "--manufacturer", action="store_true", help="check the manufacturer of target devices")
parser.add_argument("-r", "--rev", metavar="<hardware rev> or \"any\"", type=str,
help="check EUT pin straps for specific hardware revision (default: \"r9\")",
default="r9")
parser.add_argument("-s", "--solo", action="store_true", help="perform limited tests on a single EUT with no TESTER")
parser.add_argument("-t", "--tcxo", action="store_true", help="skip CLKIN/CLKOUT tests and use TCXO instead")
parser.add_argument("-E", "--eut", metavar="<EUT SN>", type=str,
help="EUT serial number")
parser.add_argument("-T", "--tester", metavar="<TESTER SN>", type=str,
help="TESTER serial number")
parser.add_argument("-f", "--fwupdate", metavar="<path to firmware binaries>", type=str,
help="update firmware with binaries from specified directory")
parser.add_argument("-H", "--hostdir", metavar="<path to installed host tools>", type=str,
help="location of installed hackrf host tools, will attempt to find them if omitted")
parser.add_argument("-b", "--testerdir", metavar="<separate path to TESTER host tools>", type=str,
help="necessary only if EUT/TESTER have separate host binaries")
parser.add_argument("-C", "--ci", action="store_true", help="For use with Jenkins CI user")
parser.add_argument("-p", "--praline", action="store_true", help="Force Praline mode")
parser.add_argument("-F", "--factory", action="store_true", help="Force factory test mode")
parser.add_argument("-u", "--unattended", action="store_true", help="For use with unattended hardware")
parser.add_argument("-L", "--log", metavar="<log file>", type=str,
help="log file location")
global args
args = parser.parse_args()
if args.ci:
user = "jenkins"
else:
user = os.getlogin()
if "any" in args.rev.lower():
args.rev = None
elif args.rev.lower() == "r1" or args.rev.lower() == "r4":
args.rev = "older than r6"
if args.hostdir:
eut_host_dir = args.hostdir
else:
try:
eut_host_dir = os.path.dirname(shutil.which('hackrf_info'))
except:
fail(4)
if args.testerdir:
if args.testerdir == eut_host_dir:
fail(5)
else:
tester_host_dir = args.testerdir
else:
tester_host_dir = eut_host_dir
unique_bin = (tester_host_dir != eut_host_dir)
count = 0
while True:
log()
log("================================")
log(datetime.now())
log(sys.argv)
log(f"user: {user}")
log(f"version: {get_version()}")
log(f"pid: {os.getpid()}")
if args.loop:
log(f"repeat count: {count}")
log("================================")
log()
if args.eut:
eut_sn = args.eut
else:
if args.tester:
eut_sn = find_sn("EUT", eut_host_dir, args.factory, [args.tester])
else:
eut_sn = find_sn("EUT", eut_host_dir, args.factory)
if args.tester:
tester_sn = args.tester
else:
tester_sn = find_sn("TESTER", tester_host_dir, args.factory, [eut_sn])
if eut_sn == tester_sn:
fail(7)
# TODO: check if the provided firmware directory exists
if args.fwupdate:
program(eut_host_dir, args.fwupdate, eut_sn, args.unattended)
eut_sn = find_sn("EUT", eut_host_dir, args.factory, [tester_sn])
if not args.rev:
out("Skipping EUT hardware revision check")
eut = HackRF("EUT", eut_host_dir, eut_sn, args.manufacturer, revision=args.rev, factory_test=args.factory)
if args.solo:
tester = None
else:
tester = HackRF("TESTER", tester_host_dir, tester_sn, args.manufacturer, unique_bin=unique_bin, factory_test=args.factory)
tester.partner = eut
eut.partner = tester
out("\nTest started, please wait...")
if args.solo:
eut.clkout_connected = False
elif args.noclk:
eut.clkout_connected = False
tester.clkout_connected = False
elif args.tcxo:
eut.clkout_connected = False
tester.clkout_connected = True
else:
eut.clkout_connected = True
tester.clkout_connected = True
if count > 0 and not args.fwupdate:
eut.activate_leds(False)
if not args.unattended:
eut.reset()
eut.debug_selftest()
# limited RF test without clock synchronization
eut.test_rf_preliminary()
if args.noclk or args.solo:
out("Skipping CLKIN, CLKOUT, and PPM tests")
else:
eut.test_xtal()
if not args.tcxo:
eut.test_clkout()
eut.test_clkin()
eut.clkout(False)
if tester:
tester.clkout(True)
if args.tcxo:
if args.solo:
out("Error: --solo is incompatible with --tcxo")
sys.exit(1)
if tester.clkin():
out("Using TCXO on TESTER")
else:
out("Warning: No TCXO or external clock detected on TESTER")
out("Skipping CLKOUT test")
if not args.noclk and not eut.clkin():
fail(211)
# full RF test with clock synchronization
if tester:
eut.test_rf()
if args.noif or args.solo:
out("Skipping IF tuning range test")
else:
eut.test_if_range(ifmin, ifmax)
eut.activate_leds(True)
if (args.solo or args.noif or args.noclk or args.tcxo or not args.rev):
out("Limited test complete")
else:
out("PASS if all 6 LEDs active with correct color")
count += 1
if not args.loop:
break
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
print()
out("KeyboardInterrupt")
sys.exit(0)
except subprocess.TimeoutExpired:
log(traceback.format_exc())
fail(180)
================================================
FILE: ci-scripts/hackrf_test.py
================================================
#!/usr/bin/env python3
import sys
import subprocess
import time
import os, shutil
import usb
from datetime import datetime
from dataclasses import dataclass
import argparse
import numpy as np
import traceback
import re
DFU_UTIL = "/usr/bin/dfu-util"
TMP_DIR = "/tmp/"
WAVEFORM = TMP_DIR + "waveform100"
NOISE = TMP_DIR + "noise"
VENDOR_ID = 0x1d50
PRODUCT_ID = 0x6089
DFU_VENDOR_ID = 0x1fc9
DFU_PRODUCT_ID = 0x000c
ONE_MHZ = 1000000
TIMEOUT = 5
MAX_PPM = 40
MAX_BASELINE = -20
SIGNAL_THRESHOLD = -25
MAX_DC_DBC = -33
MAX_M_DBC = -27
MAX_MH2_DBC = -40
MAX_H2_DBC = -39
MAX_OTHER_DBC = -34
LP2_CORRECTION = 10
MAX_POWER = -10
IF_REQUIRED_MIN = 2300
IF_REQUIRED_MAX = 2700
IF_TEST_RANGE = 256
SLEEP_TIME = 0.05 # seconds to wait between start of TX and start of RX
@dataclass
class TestCase():
name: str
freq: int
amp: bool
direction: str
base_ecode: int
rx_lna_gain: int
rx_vga_gain: int
tx_gain: int
# Try to keep rx_lna_gain and rx_vga_gain between 8 and 32.
bp1txamp = TestCase(name="BP1-TX-amp", freq=2665, amp=True, direction="tx",
base_ecode=320, rx_lna_gain=16, rx_vga_gain=16, tx_gain=14)
lp1txamp = TestCase(name="LP1-TX-amp", freq=915, amp=True, direction="tx",
base_ecode=420, rx_lna_gain=16, rx_vga_gain=16, tx_gain=27)
lp2txamp = TestCase(name="LP2-TX-amp", freq=2, amp=True, direction="tx",
base_ecode=2420, rx_lna_gain=8, rx_vga_gain=16, tx_gain=30)
hp1txamp = TestCase(name="HP1-TX-amp", freq=5995, amp=True, direction="tx",
base_ecode=520, rx_lna_gain=32, rx_vga_gain=28, tx_gain=37)
bp1txnoamp = TestCase(name="BP1-TX-noamp", freq=2665, amp=False, direction="tx",
base_ecode=350, rx_lna_gain=16, rx_vga_gain=16, tx_gain=23)
lp1txnoamp = TestCase(name="LP1-TX-noamp", freq=915, amp=False, direction="tx",
base_ecode=450, rx_lna_gain=16, rx_vga_gain=16, tx_gain=39)
lp2txnoamp = TestCase(name="LP2-TX-noamp", freq=2, amp=False, direction="tx",
base_ecode=2450, rx_lna_gain=8, rx_vga_gain=16, tx_gain=47)
hp1txnoamp = TestCase(name="HP1-TX-noamp", freq=5995, amp=False, direction="tx",
base_ecode=550, rx_lna_gain=32, rx_vga_gain=32, tx_gain=44)
# Much of the information in the RX test cases is a duplication of information
# in the TX test cases, but it's easier to keep legacy error codes this way.
bp1rxamp = TestCase(name="BP1-RX-amp", freq=2665, amp=True, direction="rx",
base_ecode=620, rx_lna_gain=16, rx_vga_gain=16, tx_gain=14)
lp1rxamp = TestCase(name="LP1-RX-amp", freq=915, amp=True, direction="rx",
base_ecode=720, rx_lna_gain=16, rx_vga_gain=16, tx_gain=29)
lp2rxamp = TestCase(name="LP2-RX-amp", freq=2, amp=True, direction="rx",
base_ecode=2720, rx_lna_gain=8, rx_vga_gain=16, tx_gain=33)
hp1rxamp = TestCase(name="HP1-RX-amp", freq=5995, amp=True, direction="rx",
base_ecode=820, rx_lna_gain=32, rx_vga_gain=28, tx_gain=39)
bp1rxnoamp = TestCase(name="BP1-RX-noamp", freq=2665, amp=False, direction="rx",
base_ecode=650, rx_lna_gain=16, rx_vga_gain=16, tx_gain=23)
lp1rxnoamp = TestCase(name="LP1-RX-noamp", freq=915, amp=False, direction="rx",
base_ecode=750, rx_lna_gain=16, rx_vga_gain=16, tx_gain=39)
lp2rxnoamp = TestCase(name="LP2-RX-noamp", freq=2, amp=False, direction="rx",
base_ecode=2750, rx_lna_gain=8, rx_vga_gain=16, tx_gain=47)
hp1rxnoamp = TestCase(name="HP1-RX-noamp", freq=5995, amp=False, direction="rx",
base_ecode=850, rx_lna_gain=32, rx_vga_gain=32, tx_gain=44)
ifmin = TestCase(name="IF-min", freq=IF_REQUIRED_MIN, amp=None, direction=None,
base_ecode=None, rx_lna_gain=16, rx_vga_gain=16, tx_gain=33)
ifmax = TestCase(name="IF-max", freq=IF_REQUIRED_MAX, amp=None, direction=None,
base_ecode=None, rx_lna_gain=16, rx_vga_gain=16, tx_gain=33)
ppm = TestCase(name="PPM", freq=2707, amp=False, direction=None,
base_ecode=None, rx_lna_gain=16, rx_vga_gain=16, tx_gain=26)
noise = TestCase(name="Noise", freq=6000, amp=True, direction=None,
base_ecode=None, rx_lna_gain=40, rx_vga_gain=52, tx_gain=None)
all_rf_test_cases = (
bp1txamp, lp1txamp, lp2txamp, hp1txamp,
bp1txnoamp, lp1txnoamp, lp2txnoamp, hp1txnoamp,
bp1rxamp, lp1rxamp, lp2rxamp, hp1rxamp,
bp1rxnoamp, lp1rxnoamp, lp2rxnoamp, hp1rxnoamp)
r9_tester_cal = [1.1, 0.4, 0.4, 1.1, 0.8, 0.2, 0.6, 1.6, -0.4, -1.2, -1.1, 1.1, -1.4, -0.9, 0.1, 1.8]
r9_eut_cal = [-1.1, -1.6, -1.4, -1.3, -1.3, -0.9, 0.1, 1.8, 0.8, 1.1, 0.9, -0.2, 0.9, 0.2, 0.6, 1.5]
og_tester_cal = [-0.4, -0.3, -0.2, -0.4, -0.8, -0.5, -0., -0.1, 1.4, 2., 1.6, -0.1, 1.5, 0.7, 0.5, -0.3]
og_eut_cal = [1.8, 1.8, 1.6, 2., 1.3, 0.7, 0.5, -0.3, 0.2, -0.3, -0.5, 1.2, -0.8, -0.5, -0., -0.1]
emessages = {
# TODO: replace the placeholder code according to each fail instance
1: "Placeholder error code",
60: "Unable to program firmware via DFU",
65: "EUT not detected after DFU programming",
70: "Unable to program SPI flash",
75: "EUT not detected after flashing",
80: "Could not find EUT",
81: "Could not find TESTER",
82: "Found multiple candidate EUTs",
83: "Found multiple candidate TESTERs",
84: "EUT running from RAM instead of flash",
85: "TESTER running from RAM instead of flash",
86: "Couldn't parse hackrf_info output",
88: "Incorrect EUT hardware revision",
89: "Incorrect TESTER hardware revision",
90: "EUT has incorrect manufacturer pin strap",
91: "TESTER has incorrect manufacturer pin strap",
99: "Incorrect device name",
100: "EUT couldn't verify clkgen register",
101: "TESTER couldn't verify clkgen register",
120: "EUT couldn't verify xcvr register",
121: "TESTER couldn't verify xcvr register",
140: "EUT couldn't verify mixer register",
141: "TESTER couldn't verify mixer register",
150: "Failed RX for IF verification",
152: "Couldn't parse received power",
154: "Received power out of bounds",
160: "Insufficient IF range",
170: "RX operation failed",
172: "Couldn't parse hackrf_sweep output",
180: "Subprocess timed out",
190: "Failed to configure LEDs",
200: "hackrf_clock command failed",
210: "TESTER failed to detect EUT CLKOUT",
211: "EUT failed to detect TESTER CLKOUT",
212: "TESTER detected spurious CLKIN",
213: "EUT detected spurious CLKIN",
220: "Failed TESTER CLKIN activation RX",
221: "Failed EUT CLKIN activation RX",
230: "Failed TESTER PLL check",
231: "Failed EUT PLL check",
232: "TESTER PLL failed to lock",
233: "EUT PLL failed to lock",
240: "Clock synchronization failure",
250: "Failed PPM detection sweep",
252: "Couldn't parse PPM test sweep data",
254: "TESTER couldn't detect PPM test transmission",
255: "EUT couldn't detect PPM test transmission",
260: "Frequency error exceeds limit",
300: "Failed baseline RX",
302: "Couldn't parse baseline RX power",
306: "Baseline RX power too high",
310: "Failed noise RX",
311: "Couldn't parse noise RX power",
312: "Noise RX power out of range",
313: "Required noise gain out of range",
315: "Couldn't read noise RX file",
316: "Too little variation in ADC bit",
317: "ADC bit correlates strongly with another bit",
321: "Excessive TX DC offset in AMP txbp1",
322: "insufficient signal strength in AMP txbp1",
323: "AMP txbp1 clipping",
325: "peak found at unexpected frequency in AMP txbp1",
330: "harmonics detected in AMP txbp1",
335: "neighbor magnitude exceeded in AMP txbp1",
340: "neighbor magnitude exceeded in AMP txbp1",
345: "spectrum mirrored or inverted in AMP txbp1",
350: "excessive power out of channel in AMP txbp1",
351: "Excessive TX DC offset in NOAMP txbp1",
352: "insufficient signal strength in NOAMP txbp1",
353: "NOAMP txbp1 clipping",
355: "peak found at unexpected frequency in NOAMP txbp1",
360: "harmonics detected in NOAMP txbp1",
365: "neighbor magnitude exceeded in NOAMP txbp1",
370: "neighbor magnitude exceeded in NOAMP txbp1",
375: "spectrum mirrored or inverted in NOAMP txbp1",
380: "excessive power out of channel in NOAMP txbp1",
421: "Excessive TX DC offset in AMP txlp1",
422: "insufficient signal strength in AMP txlp1",
423: "AMP txlp1 clipping",
425: "peak found at unexpected frequency in AMP txlp1",
430: "harmonics detected in AMP txlp1",
435: "neighbor magnitude exceeded in AMP txlp1",
440: "neighbor magnitude exceeded in AMP txlp1",
445: "spectrum mirrored or inverted in AMP txlp1",
450: "excessive power out of channel in AMP txlp1",
451: "Excessive TX DC offset in NOAMP txlp1",
452: "insufficient signal strength in NOAMP txlp1",
453: "NOAMP txlp1 clipping",
455: "peak found at unexpected frequency in NOAMP txlp1",
460: "harmonics detected in NOAMP txlp1",
465: "neighbor magnitude exceeded in NOAMP txlp1",
470: "neighbor magnitude exceeded in NOAMP txlp1",
475: "spectrum mirrored or inverted in NOAMP txlp1",
480: "excessive power out of channel in NOAMP txlp1",
2421: "Excessive TX DC offset in AMP txlp2",
2422: "insufficient signal strength in AMP txlp2",
2423: "AMP txlp2 clipping",
2425: "peak found at unexpected frequency in AMP txlp2",
2430: "harmonics detected in AMP txlp2",
2435: "neighbor magnitude exceeded in AMP txlp2",
2440: "neighbor magnitude exceeded in AMP txlp2",
2445: "spectrum mirrored or inverted in AMP txlp2",
2450: "excessive power out of channel in AMP txlp2",
2451: "Excessive TX DC offset in NOAMP txlp2",
2452: "insufficient signal strength in NOAMP txlp2",
2453: "NOAMP txlp2 clipping",
2455: "peak found at unexpected frequency in NOAMP txlp2",
2460: "harmonics detected in NOAMP txlp2",
2465: "neighbor magnitude exceeded in NOAMP txlp2",
2470: "neighbor magnitude exceeded in NOAMP txlp2",
2475: "spectrum mirrored or inverted in NOAMP txlp2",
2480: "excessive power out of channel in NOAMP txlp2",
521: "Excessive TX DC offset in AMP txhp1",
522: "insufficient signal strength in AMP txhp1",
523: "AMP txhp1 clipping",
525: "peak found at unexpected frequency in AMP txhp1",
530: "harmonics detected in AMP txhp1",
535: "neighbor magnitude exceeded in AMP txhp1",
540: "neighbor magnitude exceeded in AMP txhp1",
545: "spectrum mirrored or inverted in AMP txhp1",
550: "excessive power out of channel in AMP txhp1",
551: "Excessive TX DC offset in NOAMP txhp1",
552: "insufficient signal strength in NOAMP txhp1",
553: "NOAMP txhp1 clipping",
555: "peak found at unexpected frequency in NOAMP txhp1",
560: "harmonics detected in NOAMP txhp1",
565: "neighbor magnitude exceeded in NOAMP txhp1",
570: "neighbor magnitude exceeded in NOAMP txhp1",
575: "spectrum mirrored or inverted in NOAMP txhp1",
580: "excessive power out of channel in NOAMP txhp1",
621: "Excessive TX DC offset in AMP rxbp1",
622: "insufficient signal strength in AMP rxbp1",
623: "AMP rxbp1 clipping",
625: "peak found at unexpected frequency in AMP rxbp1",
630: "harmonics detected in AMP rxbp1",
635: "neighbor magnitude exceeded in AMP rxbp1",
640: "neighbor magnitude exceeded in AMP rxbp1",
645: "spectrum mirrored or inverted in AMP rxbp1",
650: "excessive power out of channel in AMP rxbp1",
651: "Excessive TX DC offset in NOAMP rxbp1",
652: "insufficient signal strength in NOAMP rxbp1",
653: "NOAMP rxbp1 clipping",
655: "peak found at unexpected frequency in NOAMP rxbp1",
660: "harmonics detected in NOAMP rxbp1",
665: "neighbor magnitude exceeded in NOAMP rxbp1",
670: "neighbor magnitude exceeded in NOAMP rxbp1",
675: "spectrum mirrored or inverted in NOAMP rxbp1",
680: "excessive power out of channel in NOAMP rxbp1",
721: "Excessive TX DC offset in AMP rxlp1",
722: "insufficient signal strength in AMP rxlp1",
723: "AMP rxlp1 clipping",
725: "peak found at unexpected frequency in AMP rxlp1",
730: "harmonics detected in AMP rxlp1",
735: "neighbor magnitude exceeded in AMP rxlp1",
740: "neighbor magnitude exceeded in AMP rxlp1",
745: "spectrum mirrored or inverted in AMP rxlp1",
750: "excessive power out of channel in AMP rxlp1",
751: "Excessive TX DC offset in NOAMP rxlp1",
752: "insufficient signal strength in NOAMP rxlp1",
753: "NOAMP rxlp1 clipping",
755: "peak found at unexpected frequency in NOAMP rxlp1",
760: "harmonics detected in NOAMP rxlp1",
765: "neighbor magnitude exceeded in NOAMP rxlp1",
770: "neighbor magnitude exceeded in NOAMP rxlp1",
775: "spectrum mirrored or inverted in NOAMP rxlp1",
780: "excessive power out of channel in NOAMP rxlp1",
2721: "Excessive TX DC offset in AMP rxlp2",
2722: "insufficient signal strength in AMP rxlp2",
2723: "AMP rxlp2 clipping",
2725: "peak found at unexpected frequency in AMP rxlp2",
2730: "harmonics detected in AMP rxlp2",
2735: "neighbor magnitude exceeded in AMP rxlp2",
2740: "neighbor magnitude exceeded in AMP rxlp2",
2745: "spectrum mirrored or inverted in AMP rxlp2",
2750: "excessive power out of channel in AMP rxlp2",
2751: "Excessive TX DC offset in NOAMP rxlp2",
2752: "insufficient signal strength in NOAMP rxlp2",
2753: "NOAMP rxlp2 clipping",
2755: "peak found at unexpected frequency in NOAMP rxlp2",
2760: "harmonics detected in NOAMP rxlp2",
2765: "neighbor magnitude exceeded in NOAMP rxlp2",
2770: "neighbor magnitude exceeded in NOAMP rxlp2",
2775: "spectrum mirrored or inverted in NOAMP rxlp2",
2780: "excessive power out of channel in NOAMP rxlp2",
821: "Excessive TX DC offset in AMP rxhp1",
822: "insufficient signal strength in AMP rxhp1",
823: "AMP rxhp1 clipping",
825: "peak found at unexpected frequency in AMP rxhp1",
830: "harmonics detected in AMP rxhp1",
835: "neighbor magnitude exceeded in AMP rxhp1",
840: "neighbor magnitude exceeded in AMP rxhp1",
845: "spectrum mirrored or inverted in AMP rxhp1",
850: "excessive power out of channel in AMP rxhp1",
851: "Excessive TX DC offset in NOAMP rxhp1",
852: "insufficient signal strength in NOAMP rxhp1",
853: "NOAMP rxhp1 clipping",
855: "peak found at unexpected frequency in NOAMP rxhp1",
860: "harmonics detected in NOAMP rxhp1",
865: "neighbor magnitude exceeded in NOAMP rxhp1",
870: "neighbor magnitude exceeded in NOAMP rxhp1",
875: "spectrum mirrored or inverted in NOAMP rxhp1",
880: "excessive power out of channel in NOAMP rxhp1",
3000: "BP TX failure",
3010: "BP RX failure",
3020: "HP TX failure",
3030: "HP RX failure",
3040: "LP TX failure",
3050: "LP RX failure",
3060: "TX AMP failure",
3070: "RX AMP failure",
3080: "AMP bypass failure",
3090: "LPF failure",
3100: "HPF failure",
3110: "mixer bypass failure",
3120: "mixer failure",
3130: "TX failure",
3140: "RX failure",
3150: "mixer TX failure",
3160: "mixer RX failure",
3170: "LP2 TX failure",
3180: "LP2 RX failure",
3190: "LP2 TX/RX failure",
3200: "total RF failure",
3210: "multiple RF failures, see list above",
3220: "multiple clipping failures"
}
def fail_rf(errors):
# check for combinations of RF errors
ecode = 0
eset = set(errors)
# error affects only bp tx
if ((322 in eset) and (422 not in eset) and (2422 not in eset) and (522 not in eset) and (622 not in eset) and (722 not in eset) and (2722 not in eset) and (822 not in eset)):
ecode = 3000
errors.append(ecode)
# error affects only bp rx
if ((322 not in eset) and (422 not in eset) and (2422 not in eset) and (522 not in eset) and (622 in eset) and (722 not in eset) and (2722 not in eset) and (822 not in eset)):
ecode = 3010
errors.append(ecode)
# error affects only hp tx
if ((322 not in eset) and (422 not in eset) and (2422 not in eset) and (522 in eset) and (622 not in eset) and (722 not in eset) and (2722 not in eset) and (822 not in eset)):
ecode = 3020
errors.append(ecode)
# error affects only hp rx
if ((322 not in eset) and (422 not in eset) and (2422 not in eset) and (522 not in eset) and (622 not in eset) and (722 not in eset) and (2722 not in eset) and (822 in eset)):
ecode = 3030
errors.append(ecode)
# error affects only lp tx (both lp1 and lp2)
if ((322 not in eset) and (422 in eset) and (2422 in eset) and (522 not in eset) and (622 not in eset) and (722 not in eset) and (2722 not in eset) and (822 not in eset)):
ecode = 3040
errors.append(ecode)
# error affects only lp rx (both lp1 and lp2)
if ((322 not in eset) and (422 not in eset) and (2422 not in eset) and (522 not in eset) and (622 not in eset) and (722 in eset) and (2722 in eset) and (822 not in eset)):
ecode = 3050
errors.append(ecode)
# error in tx amp path
if ((2422 in eset) and (352 not in eset) and (452 not in eset) and (2452 not in eset)):
ecode = 3060
errors.append(ecode)
# error in rx amp path
if ((2722 in eset) and (652 not in eset) and (752 not in eset) and (2752 not in eset)):
ecode = 3070
errors.append(ecode)
# error in amp bypass path
if ((352 in eset) and (452 in eset) and (2452 in eset) and (652 in eset) and (752 in eset) and (2752 in eset) and (322 not in eset) and (422 not in eset) and (2422 not in eset) and (622 not in eset) and (722 not in eset) and (2722 not in eset)):
ecode = 3080
errors.append(ecode)
# error in lpf path
if (((422 in eset) and (2422 in eset)) and ((722 in eset) and (2722 in eset)) and ((322 not in eset) and (622 not in eset)) and ((522 not in eset) and (822 not in eset))):
ecode = 3090
errors.append(ecode)
# error in hpf path
if (((522 in eset) and (822 in eset)) and ((322 not in eset) and (622 not in eset)) and ((422 not in eset) and (2422 not in eset) and (722 not in eset) and (2722 not in eset))):
ecode = 3100
errors.append(ecode)
# error affects both mixer bypass paths
if ((322 in eset) and (422 not in eset) and (2422 not in eset) and (522 not in eset) and (622 in eset) and (722 not in eset) and (2722 not in eset) and (822 not in eset)):
ecode = 3110
errors.append(ecode)
# error in mixer tx/rx
if ((322 not in eset) and ((422 in eset) or (2422 in eset)) and (522 in eset) and (622 not in eset) and ((722 in eset) or (2722 in eset) or (822 in eset))):
ecode = 3120
errors.append(ecode)
if ((322 not in eset) and ((422 in eset) or (2422 in eset) or (522 in eset)) and (622 not in eset) and ((722 in eset) and (2722 in eset) and (822 in eset))):
ecode = 3120
errors.append(ecode)
# error in all tx, no rx
if ((322 in eset) and (422 in eset) and (2422 in eset) and (522 in eset) and (622 not in eset) and (722 not in eset) and (2722 not in eset) and (822 not in eset) and (352 in eset) and (452 in eset) and (2452 in eset) and (552 in eset)):
ecode = 3130
errors.append(ecode)
# error in all rx, no tx
if ((322 not in eset) and (422 not in eset) and (2422 not in eset) and (522 not in eset) and (622 in eset) and (722 in eset) and (2722 in eset) and (822 in eset) and (652 in eset) and (752 in eset) and (2752 in eset) and (852 in eset)):
ecode = 3140
errors.append(ecode)
# error in all mixer tx
if ((322 not in eset) and (422 in eset) and (2422 in eset) and (522 in eset) and (622 not in eset) and (722 not in eset) and (2722 not in eset) and (822 not in eset)):
ecode = 3150
errors.append(ecode)
# error in all mixer rx
if ((322 not in eset) and (422 not in eset) and (2422 not in eset) and (522 not in eset) and (622 not in eset) and (722 in eset) and (2722 in eset) and (822 in eset)):
ecode = 3160
errors.append(ecode)
# error affecting only lp2 tx
if ((322 not in eset) and (422 not in eset) and (2422 in eset) and (522 not in eset) and (622 not in eset) and (722 not in eset) and (2722 not in eset) and (822 not in eset) and (2752 in eset)):
ecode = 3170
errors.append(ecode)
# error affecting only lp2 rx
if ((322 not in eset) and (422 not in eset) and (2422 not in eset) and (522 not in eset) and (622 not in eset) and (722 not in eset) and (2722 in eset) and (822 not in eset) and (2752 in eset)):
ecode = 3180
errors.append(ecode)
# error affecting only lp2 rx/tx
if ((322 not in eset) and (422 not in eset) and (2422 in eset) and (522 not in eset) and (622 not in eset) and (722 not in eset) and (2722 in eset) and (822 not in eset)):
ecode = 3190
errors.append(ecode)
# error in all rx/tx
if ((322 in eset) and (422 in eset) and (2422 in eset) and (522 in eset) and (622 in eset) and (722 in eset) and (2722 in eset) and (822 in eset)):
ecode = 3200
errors.append(ecode)
clipping_count = 0
for code in (323, 423, 2423, 523, 353, 453, 2453, 553, 623, 723, 2723, 823, 653, 753, 2753, 853):
if code in eset:
clipping_count += 1
if clipping_count > 2:
ecode = 3220
errors.append(ecode)
elif (not ecode) and (len(errors) > 1):
# multiple failures without a logical grouping
ecode = 3210
errors.append(ecode)
for error in errors[:-1]:
out(f"RF failure {error}: {emessages[error]}")
fail(errors[-1])
def log(message=""):
if args.log:
with open(args.log, "a") as log_file:
print(message, file=log_file)
return
def out(message=""):
log(message)
print(message)
def fail(error_code):
out(f"FAIL {error_code}: {emessages[error_code]}")
sys.exit(2)
class HackRF:
def __init__(self, name, bin_dir, serial, mf_check, revision=None, unique_bin=False):
self.name = name
self.bin_dir = bin_dir
self.unique_bin = unique_bin
self.revision = None
self.serial = None
self.clkout_connected = False
self.tester_cal = [0] * 16
self.eut_cal = [0] * 16
self.errors = []
self.unit_number = 0
self.partner = None
if self.name == "TESTER":
self.unit_number = 1
elif self.name != "EUT":
fail(99)
info = subprocess.run([bin_dir + "hackrf_info"], capture_output=True,
encoding="utf-8", timeout=TIMEOUT)
log(info.stdout + info.stderr)
if info.returncode != 0 or "failed" in info.stderr:
fail(80 + self.unit_number)
# parse the hackrf_info output
count = info.stdout.count("Found HackRF")
if count < 1:
fail(80 + self.unit_number)
if count > 1 and self.name == "TESTER" and self.unique_bin:
fail(83)
if mf_check and "does not appear to have been manufactured by Great Scott Gadgets" in info.stdout:
fail(90 + self.unit_number)
try:
devices_list = re.findall(r'Found HackRF\n.+\n.+\n.+\n.+\n.+\n.+', info.stdout)
for device in devices_list:
sn = re.search(r'Serial number: \w+', device).group().split(': ')[1]
rev = re.search(r'Hardware Revision: .+', device).group().split(': ')[1]
if sn == serial:
self.serial = sn
self.revision = rev
break
out(f"{self.name} serial number: {self.serial}")
out(f"{self.name} revision: {self.revision}")
out(f"{self.name} binary directory {self.bin_dir}")
except:
log(traceback.format_exc())
fail(1)
if revision and self.revision != revision:
fail(88 + self.unit_number)
if self.revision == "r9":
self.tester_cal = r9_tester_cal
self.eut_cal = r9_eut_cal
else:
self.tester_cal = og_tester_cal
self.eut_cal = og_eut_cal
def clkin(self):
command = subprocess.run([self.bin_dir + "hackrf_clock", "-i", "-d",
self.serial], capture_output=True, encoding="utf-8",
timeout=TIMEOUT)
if command.returncode != 0:
log(command.stdout + command.stderr)
out(f"{self.name} CLKIN request failed")
fail(200)
if "no clock signal detected" in command.stdout:
log(f"{self.name}: no clock signal detected")
return False
elif "clock signal detected" in command.stdout:
log(f"{self.name}: clock signal detected")
return True
else:
log(command.stdout + command.stderr)
out(f"Couldn't parse {self.name} CLKIN status")
fail(200)
# Warning: Avoid clock loops by disabling your partner's CLKOUT before
# enabling your own.
def clkout(self, enable):
command = subprocess.run([self.bin_dir + "hackrf_clock", "-o",
"1" if enable else "0", "-d", self.serial], capture_output=True,
encoding="utf-8", timeout=TIMEOUT)
if command.returncode != 0:
log(command.stdout + command.stderr)
out(f"{self.name} CLKOUT control failed")
fail(200)
if self.partner and self.clkout_connected:
timeout = time.time() + 1
while time.time() < timeout:
if self.partner.clkin() == enable:
break
if self.partner.clkin() != enable:
if enable:
fail(210 + self.unit_number)
else:
if self.name == "EUT":
out("Note: use --tcxo to use TCXO or external reference on TESTER")
fail(212 + self.unit_number)
# transceiver operation to switch clock source
source = "CLKIN" if enable else "crystal"
log(f"switching {self.partner.name} to {source}")
receive = subprocess.run([self.partner.bin_dir + "hackrf_transfer", "-d",
self.partner.serial, "-n1", "-r", "/dev/null", "-f", "2500000000",
"-a", "0", "-l", "0", "-g", "0"], capture_output=True,
encoding="utf-8", timeout=TIMEOUT)
if receive.returncode != 0:
log(receive.stdout + receive.stderr)
fail(220 + self.unit_number)
# confirm that PLL locked to new source
expected_value = "0x01" if (enable and self.partner.revision != "r9") else "0x51"
timeout = time.time() + 1
while time.time() < timeout:
debug = subprocess.run([self.partner.bin_dir + "hackrf_debug", "-d",
self.partner.serial, "-srn0"], capture_output=True,
encoding="utf-8", timeout=TIMEOUT)
log(debug.stdout)
if debug.returncode != 0:
log(debug.stderr)
fail(230 + self.unit_number)
if expected_value in debug.stdout:
break
if expected_value not in debug.stdout:
fail(232 + self.unit_number)
time.sleep(0.1)
else:
time.sleep(0.2)
def test_clkout(self):
assert self.clkout_connected
self.partner.clkout(False)
self.clkout(True)
frequency_error_ppm = self.clock_error_ppm()
log(f"{self.name}->{self.partner.name} CLK: {frequency_error_ppm} ppm")
if abs(frequency_error_ppm) > 1:
out(f"{self.partner.name} CLKIN: unexpected frequency error while synchronized")
fail(240)
def test_clkin(self):
self.partner.test_clkout()
def clock_error_ppm(self):
# ppm.freq is in MHz, but we use it as Hz for the FFT bin width,
# resulting in bins with a width of 1 ppm of the transmission
# frequency.
bin_width = str(ppm.freq)
tx_frequency = str(ppm.freq * ONE_MHZ)
sweep_range = f"{ppm.freq-1}:{ppm.freq+19}"
expected_bin = round(ONE_MHZ/ppm.freq)
log(f"{self.name} transmitting to {self.partner.name} for PPM measurement")
transmit = subprocess.Popen([self.bin_dir + "hackrf_transfer", "-d",
self.serial, "-c", "127", "-a", "0", "-x", f"{ppm.tx_gain}", "-f",
tx_frequency], stdout=subprocess.PIPE, stderr=subprocess.PIPE,
encoding="utf-8")
time.sleep(SLEEP_TIME)
sweep = subprocess.run([self.partner.bin_dir + "hackrf_sweep", "-d",
self.partner.serial, "-N", "13", "-w", bin_width, "-f", sweep_range, "-a",
"0", "-l", f"{ppm.rx_lna_gain}", "-g", f"{ppm.rx_vga_gain}"],
capture_output=True, encoding="utf-8", timeout=TIMEOUT)
if sweep.returncode != 0:
log(sweep.stdout + sweep.stderr)
fail(250)
# parse the hackrf_sweep output
try:
rows = sweep.stdout.split("\n")
# Note: skipping data from the first twelve sweeps until issue #1230 is resolved.
row = rows[48].split(", ")
bins = [float(bin) for bin in row[6:]]
peak_bin = bins.index(max(bins))
frequency_error_ppm = peak_bin - expected_bin
except:
log(sweep.stdout + sweep.stderr)
log(traceback.format_exc())
fail(252)
log(f"PPM max bin {peak_bin} power: {bins[peak_bin]}")
for row in rows[0:49:4]:
bins = [float(bin) for bin in row.split(", ")[6:]]
peak_bin = bins.index(max(bins))
log(f"peak bin {peak_bin}: {bins[peak_bin]}")
if max(bins) < SIGNAL_THRESHOLD:
fail(254 + self.unit_number)
transmit.terminate()
tx_out, tx_err = transmit.communicate(timeout=TIMEOUT)
if transmit.returncode != 0:
log(tx_out + tx_err)
out(f"Warning: {self.name} PPM test transmit failed")
return frequency_error_ppm
def test_xtal(self):
self.clkout(False)
self.partner.clkout(False)
frequency_error_ppm = self.clock_error_ppm()
out(f"{self.name} crystal frequency error: {frequency_error_ppm} ppm")
if abs(frequency_error_ppm) > MAX_PPM:
fail(260)
def verify_register(self, target, address, value):
command = subprocess.run([self.bin_dir + "hackrf_debug",
f"--{target}", "--register", address, "--read", "--device",
self.serial], capture_output=True, encoding="UTF-8")
log(f"Checking {target} register {address}")
if value in command.stdout:
return True
else:
log("Unexpected result:")
log(command.stdout + command.stderr)
return False
def test_clkgen(self):
if not self.verify_register("si5351", "2", "0x03"):
fail(100 + self.unit_number)
def test_mixer(self):
if not self.verify_register("rffc5072", "2", "0x9055"):
fail(140 + self.unit_number)
def test_xcvr(self):
if not self.verify_register("max283", "28", "0x0c0"):
fail(120 + self.unit_number)
def test_serial(self):
log(f"Testing {self.name} serial communications")
self.test_clkgen()
self.test_mixer()
self.test_xcvr()
# Ensure that hackrf_transfer works and that the received power is within
# the expected range with no transmission active.
def baseline_rx(self, test_case):
# Test at the TX tuning frequency of measure_rf()
center_freq = (test_case.freq * ONE_MHZ) + 1500000
receive = subprocess.run([self.bin_dir + "hackrf_transfer", "-d",
self.serial, "-n10000", "-r", "/dev/null", "-f",
f"{center_freq}", "-a", "0", "-l", f"{test_case.rx_lna_gain}",
"-g", f"{test_case.rx_vga_gain}", "-b",
"1750000"], capture_output=True, encoding="utf-8", timeout=TIMEOUT)
if receive.returncode != 0:
log(receive.stdout + receive.stderr)
log(f"Failed {self.name} {test_case.name} baseline RX")
fail(300)
output = str(receive.stderr).split()
try:
power = float(output[output.index("power") + 1])
except:
log(receive.stdout + receive.stderr)
log(traceback.format_exc())
log(f"Couldn't parse {self.name} {test_case.name} baseline RX power")
fail(302)
# The theoretical minimum power is about -48 dB. The expected power is
# about -30 dB.
log(f"{self.name} {test_case.name} baseline power: {power}")
if power > MAX_BASELINE:
fail(306)
# Check the ADC for shorts or other unexpected behavior by sampling
# amplified noise.
def noise_rx(self, test_case):
num_samples = 1000
log(f"Testing {self.name} {test_case.name}")
center_freq = test_case.freq * ONE_MHZ
low_gain = 0
high_gain = 16
while high_gain > low_gain:
gain = (high_gain + low_gain) // 2
receive = subprocess.run([self.bin_dir + "hackrf_transfer", "-d",
self.serial, "-n", f"{num_samples*10}", "-r", f"{NOISE}", "-f",
f"{center_freq}", "-a", "1" if test_case.amp else "0", "-l",
f"{test_case.rx_lna_gain}", "-g", f"{gain*2 + 32}", "-b",
"28000000"], capture_output=True, encoding="utf-8", timeout=TIMEOUT)
if receive.returncode != 0:
log(receive.stdout + receive.stderr)
fail(310)
output = str(receive.stderr).split()
try:
power = float(output[output.index("power") + 1])
except:
log(receive.stdout + receive.stderr)
log(traceback.format_exc())
fail(311)
log(f"{self.name} {test_case.name} RX power at -g {gain*2 + 32}: {power}")
if power > -2:
high_gain = gain
elif power > -5:
break
else:
low_gain = gain + 1
# We want the power to be between -1 and -6 dB to ensure that all eight
# bits are flipped without much clipping.
if power < -6 or power > -1:
fail(312)
elif gain > 14 or gain < 4:
fail(313)
bit_count = [0] * 8
matches = []
for bit in range(8):
matches.append([0] * 8)
try:
file = open(f"{NOISE}", "rb")
data = file.read()
assert len(data) == num_samples * 20
data = data[-num_samples*2:]
for byte in data:
for bit in range(8):
bit_count[bit] += (byte>>bit)&1
for match_bit in range(bit + 1, 8):
if (byte>>bit)&1 == (byte>>match_bit)&1:
matches[bit][match_bit] += 1
except:
fail(315)
log(f"{self.name} ADC bit counts: {bit_count}")
log(f"{self.name} ADC bit matches: {matches}")
for bit in range(7):
if bit_count[bit] < (0.2 * len(data)) or bit_count[bit] > (0.8 * len(data)):
log(f"{self.name} ADC bit {bit} set in {bit_count[bit]} out of {len(data)} bytes")
fail(316)
# Check for correlations between adjacent bits except between 6 and 7 (highest).
#for match_bit in range(bit + 1, 7):
for match_bit in range(bit + 1, 8):
if matches[bit][match_bit] > (0.999 * len(data)):
out(f"{self.name} ADC bit {bit} correlates with bit {match_bit}")
fail(317)
# DC bias can cause bit 7 to be predominantly unchanged, so only
# error if there is less than 1% variation.
if bit_count[7] < (0.001 * len(data)) or bit_count[bit] > (0.999 * len(data)):
out(f"{self.name} ADC bit 7 set in {bit_count[7]} out of {len(data)} bytes")
fail(316)
def analyze_transfer(self, transfer, test_case):
# parse the hackrf_transfer output
output = str(transfer.stderr).split()
try:
power = float(output[output.index("power") + 1])
except:
log(transfer.stdout + transfer.stderr)
log(traceback.format_exc())
fail(152)
log(f"{test_case.name} power at {test_case.freq} MHz: {power}")
if test_case.base_ecode:
if power < SIGNAL_THRESHOLD:
log(f"{test_case.name} signal not strong enough")
self.errors.append(test_case.base_ecode + 2)
if power > -3:
log(f"{test_case.name} signal clipping")
self.errors.append(test_case.base_ecode + 3)
elif power < -48 or power > 0:
fail(154)
return power
# Verify that signal power at a given IF in MHz is detected.
def verify_if_tuning(self, test_case):
transmit = subprocess.Popen([self.bin_dir + "hackrf_transfer", "-d",
self.serial, "-c", "127", "-a", "0", "-x", f"{test_case.tx_gain}",
"-i", f"{test_case.freq*ONE_MHZ}", "-m", "0", "-F"],
stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8")
time.sleep(SLEEP_TIME)
receive = subprocess.run([self.partner.bin_dir + "hackrf_transfer", "-d",
self.partner.serial, "-n10000", "-r", "/dev/null", "-f",
f"{(test_case.freq+1)*ONE_MHZ}", "-a", "0", "-l",
f"{test_case.rx_lna_gain}", "-g", f"{test_case.rx_vga_gain}", "-b",
"2500000"], capture_output=True, encoding="utf-8", timeout=TIMEOUT)
transmit.terminate()
if receive.returncode != 0:
log(receive.stdout + receive.stderr)
fail(150)
power = self.analyze_transfer(receive, test_case)
tx_out, tx_err = transmit.communicate(timeout=TIMEOUT)
if transmit.returncode != 0:
log(tx_out + tx_err)
out(f"Warning: {self.name} IF transmit failed")
return power > SIGNAL_THRESHOLD
def test_if_range(self, min_case, max_case):
low_end = IF_REQUIRED_MIN - IF_TEST_RANGE + 1
min_freq = IF_REQUIRED_MIN + 1
while min_freq > low_end:
min_case.freq = (min_freq + low_end) // 2
if self.verify_if_tuning(min_case):
min_freq = min_case.freq
else:
low_end = min_case.freq + 1
high_end = IF_REQUIRED_MAX + IF_TEST_RANGE - 1
max_freq = IF_REQUIRED_MAX - 1
while max_freq < high_end:
max_case.freq = (max_freq + high_end + 1) // 2
if self.verify_if_tuning(max_case):
max_freq = max_case.freq
else:
high_end = max_case.freq - 1
out(f"{self.name} IF range: {min_freq}-{max_freq} MHz")
if min_freq > IF_REQUIRED_MIN or max_freq < IF_REQUIRED_MAX:
fail(160)
def analyze_sweep(self, sweep, test_case):
eut_cal = self.eut_cal[all_rf_test_cases.index(test_case)]
tester_cal = self.partner.tester_cal[all_rf_test_cases.index(test_case)]
correction = LP2_CORRECTION if test_case.freq < 30 else 0
# parse the hackrf_sweep output
try:
rows = sweep.stdout.split("\n")
# Note: skipping data from the first twelve sweeps until issue #1230 is resolved.
bins = np.zeros(225)
# average 10 sweeps
row_count = 0
for row in rows[48:88:4]:
bins += np.array([float(x) for x in row.split(", ")[6:231]])
row_count += 1
assert row_count == 10
bins /= 10
# log the raw hackrf_sweep data before calibration
log(f"{', '.join(rows[12].split(', ')[:6])}, {np.array2string(bins, separator=', ', max_line_width=3000)[1:-1]}")
# apply calibration
bins -= eut_cal
bins -= tester_cal
peak_bin = bins.argmax()
except:
log(sweep.stdout + sweep.stderr)
log(traceback.format_exc())
out(f"Couldn't parse {test_case.name} sweep data")
fail(172)
# ensure acceptable performance
log(f"peak ({peak_bin}) {test_case.name}: {bins[peak_bin]:.2f}")
if bins[peak_bin] < SIGNAL_THRESHOLD:
for row in rows[0:88:4]:
bins = [float(bin) for bin in row.split(", ")[6:]]
peak_bin = bins.index(max(bins))
log(f"peak bin {peak_bin}: {bins[peak_bin]}")
log(f"{test_case.name} signal not strong enough")
self.errors.append(test_case.base_ecode + 2)
return bins[peak_bin]
elif bins[peak_bin] > MAX_POWER:
log(f"{test_case.name} signal clipping")
self.errors.append(test_case.base_ecode + 3)
return bins[peak_bin]
tx_dc_power_dbc = bins[112] - bins[peak_bin]
if tx_dc_power_dbc > MAX_DC_DBC + correction:
log(f"{test_case.name} excessive TX DC offset {tx_dc_power_dbc:.1f} dBc")
self.errors.append(test_case.base_ecode + 1)
if peak_bin == 157:
log(f"{test_case.name} TX spectrum inverted")
self.errors.append(test_case.base_ecode + 25)
return bins[peak_bin]
elif peak_bin == 112:
log(f"{test_case.name} peak found at DC")
self.errors.append(test_case.base_ecode + 1)
return bins[peak_bin]
elif peak_bin >= 52 and peak_bin < 67:
log(f"{test_case.name} peak found at adjacent frequency")
self.errors.append(test_case.base_ecode + 15)
return bins[peak_bin]
elif peak_bin > 67 and peak_bin <= 82:
log(f"{test_case.name} peak found at adjacent frequency")
self.errors.append(test_case.base_ecode + 20)
return bins[peak_bin]
elif peak_bin != 67:
log(f"{test_case.name} peak found at unexpected frequency")
self.errors.append(test_case.base_ecode + 5)
return bins[peak_bin]
if bins[157] - bins[67] > MAX_M_DBC + correction:
log(f"{test_case.name} TX spectrum mirrored")
self.errors.append(test_case.base_ecode + 25)
if (bins[22] - bins[67]) > MAX_H2_DBC + correction:
log(f"{test_case.name} excessive TX harmonic (bin 22): {bins[22]}")
self.errors.append(test_case.base_ecode + 10)
if (bins[202] - bins[67]) > MAX_MH2_DBC + correction:
log(f"{test_case.name} excessive TX harmonic (bin 202): {bins[202]}")
self.errors.append(test_case.base_ecode + 10)
worst_other_dbc = -999
worst_other_bin = 999
for i in range(225):
# Skip various frequencies where spurs are expected (most of which have their own tests above).
if (i < 52 and i != 22) or (i > 82 and i < 111) or (i > 113 and i < 156) or (i > 158 and i != 202):
other_dbc = bins[i] - bins[67]
if other_dbc > worst_other_dbc:
worst_other_dbc = other_dbc
worst_other_bin = i
if worst_other_dbc > MAX_OTHER_DBC + correction:
log(f"{test_case.name} excessive power at unexpected frequency ({worst_other_bin}: {bins[worst_other_bin]})")
self.errors.append(test_case.base_ecode + 30)
log(f"h2 (22) {test_case.name}: {(bins[22] - bins[67]):.2f}")
log(f"DC (112) {test_case.name}: {(bins[112] - bins[67]):.2f}")
log(f"m (157) {test_case.name}: {(bins[157] - bins[67]):.2f}")
log(f"mh2 (202) {test_case.name}: {(bins[202] - bins[67]):.2f}")
log(f"other ({worst_other_bin}) {test_case.name}: {worst_other_dbc:.2f}")
#FIXME look in another row for RX inversion?
return bins[peak_bin]
def measure_rf(self, test_case, sweep=True):
log(f"Executing RF test case {test_case.name}, sweep={sweep}")
if test_case.direction == "tx":
transmitter = self
tx_amp = "1" if test_case.amp else "0"
receiver = self.partner
rx_amp = "0"
elif test_case.direction == "rx":
transmitter = self.partner
tx_amp = "0"
receiver = self
rx_amp = "1" if test_case.amp else "0"
else:
out(f"Error: Invalid direction in {test_case.name}")
sys.exit(1)
# The nominal test frequency (as specified in test_case) is 1 MHz above
# the low end of the sweep range. The transmitted signal is 500 kHz
# above the nominal frequency, and the tuning (center) frequency of the
# transmitting device is 1 MHz above that.
tx_center_freq = (test_case.freq * ONE_MHZ) + 1500000
sweep_range = f"{test_case.freq-1}:{test_case.freq+19}"
transmit = subprocess.Popen([transmitter.bin_dir + "hackrf_transfer", "-d",
transmitter.serial, "-R", "-t", WAVEFORM, "-a", tx_amp, "-x",
f"{test_case.tx_gain}", "-f", str(tx_center_freq)],
stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8")
time.sleep(SLEEP_TIME)
if sweep:
receive = subprocess.run([receiver.bin_dir + "hackrf_sweep",
"-d", receiver.serial, "-N", "22", "-w", "22222", "-f",
sweep_range, "-a", rx_amp, "-l", f"{test_case.rx_lna_gain}",
"-g", f"{test_case.rx_vga_gain}"], capture_output=True,
encoding="utf-8", timeout=TIMEOUT)
else:
receive = subprocess.run([receiver.bin_dir + "hackrf_transfer",
"-d", receiver.serial, "-n10000", "-r", "/dev/null", "-f",
f"{(test_case.freq)*ONE_MHZ}", "-a", rx_amp, "-l",
f"{test_case.rx_lna_gain}", "-g", f"{test_case.rx_vga_gain}",
"-b", "2500000"], capture_output=True, encoding="utf-8",
timeout=TIMEOUT)
transmit.terminate()
if receive.returncode != 0:
log(receive.stdout + receive.stderr)
log(f"{receiver.name} Failed RX, sweep={sweep}")
fail(170)
if sweep:
rssi = self.analyze_sweep(receive, test_case)
else:
rssi = self.analyze_transfer(receive, test_case)
tx_out, tx_err = transmit.communicate(timeout=TIMEOUT)
if transmit.returncode != 0:
out(tx_out + tx_err)
out(f"Warning: {transmitter.name} transmit failed")
return rssi
def test_rf_preliminary(self):
results = []
for test_case in (all_rf_test_cases):
if test_case.amp == False:
if test_case.direction == "rx":
self.baseline_rx(test_case)
elif self.partner:
self.partner.baseline_rx(test_case)
self.noise_rx(noise)
# FIXME test for RX DC offset?
if not self.partner:
out("Skipping RF tests")
return
for test_case in (all_rf_test_cases):
results.append(int(round(self.measure_rf(test_case, sweep=False) - (SIGNAL_THRESHOLD + 11))))
log(f"Preliminary results: {results}")
if self.errors:
fail_rf(self.errors)
def test_rf(self):
assert self.partner
results = []
for test_case in (all_rf_test_cases):
results.append(int(round(self.measure_rf(test_case, sweep=True) - (SIGNAL_THRESHOLD + 5))))
out(f"RF results summary: {results}")
if self.errors:
fail_rf(self.errors)
def activate_leds(self, enable):
if enable:
out(f"Activating {self.name} LEDs")
state = 7
else:
state = 1
command = subprocess.run([self.bin_dir + "hackrf_debug", "-d", self.serial, "--leds",
f"{state}"], capture_output=True, encoding="utf-8", timeout=TIMEOUT)
if command.returncode != 0:
log(command.stdout + command.stderr)
log(f"Failed to configure {self.name} LEDs ({state})")
fail(190)
# This waveform is a full-scale complex exponential with a frequency of -1/10 the
# sample rate. When transmitted at 10 Msps, the frequency is 1 MHz below the
# center frequency.
def write_waveform():
tx_bytes = b'\x7f\x00\x67\xb5\x27\x87\xd9\x87\x99\xb5\x81\x00\x99\x4b\xd9\x79\x27\x79\x67\x4b'
# defective waveform with DC offset:
#tx_bytes = b'\x7f\x10\x67\xa5\x27\x97\xd9\x97\x99\xc5\x81\x10\x99\x5b\xd9\x7f\x27\x7f\x67\x5b'
# defective waveform with missing Q channel:
#tx_bytes = b'\x7f\x00\x67\x00\x27\x00\xd9\x00\x99\x00\x81\x00\x99\x00\xd9\x00\x27\x00\x67\x00'
with open(WAVEFORM, "wb") as bin_file:
for i in range(50000): # 1MB file size
bin_file.write(tx_bytes)
def program(bin_dir, fw_dir, serial, unattended=False):
if "build" in fw_dir:
binary = "hackrf_usb.bin"
dfu_stub = "hackrf_usb.dfu"
else:
binary = "hackrf_one_usb.bin"
dfu_stub = "hackrf_one_usb.dfu"
# EUTs in unattended (including Jenkins CI) setups have pins jumped to always boot into DFU mode, so resetting is undesirable
if unattended:
reset_write = "-w"
else:
reset_write = "-Rw"
if not usb.core.find(idVendor=DFU_VENDOR_ID, idProduct=DFU_PRODUCT_ID):
print("ACTION REQUIRED: Press and release EUT RESET button while holding DFU button.")
while not usb.core.find(idVendor=DFU_VENDOR_ID, idProduct=DFU_PRODUCT_ID):
time.sleep(0.1)
out("Programming EUT in DFU mode")
dfu = subprocess.run([f"{DFU_UTIL}", "--device",
f"{DFU_VENDOR_ID}:{DFU_PRODUCT_ID}", "--alt", "0", "--download",
f"{fw_dir}{dfu_stub}"], capture_output=True, encoding="utf-8",
timeout=TIMEOUT)
#dfu-util: unable to read DFU status after completion (LIBUSB_ERROR_IO)
# despite successful download; present as of at least dfu-util 0.11
if "Download done." not in dfu.stdout:
fail(60)
# Wait for device to boot from DFU.
then = time.time()
dfu_device_found = False
while time.time() < (then + 50):
dfu_info = subprocess.run([bin_dir + "hackrf_info"], capture_output=True,
encoding="utf-8", timeout=TIMEOUT)
if "RunningFromRAM" in dfu_info.stdout:
if serial in dfu_info.stdout and serial != "RunningFromRAM":
out("wrong device in DFU mode")
fail(1)
else:
dfu_device_found = True
break
time.sleep(0.1)
if not dfu_device_found:
out("DFU device not found")
fail(1)
out("Programming EUT SPI flash")
spiflash = subprocess.run([bin_dir + "hackrf_spiflash", "-d",
"RunningFromRAM", reset_write, f"{fw_dir}{binary}"],
capture_output=True, encoding="utf-8", timeout=TIMEOUT)
if spiflash.returncode != 0:
log(spiflash.stdout + spiflash.stderr)
fail(70)
then = time.time()
device_found = False
while time.time() < (then + 5):
flash_info = subprocess.run([bin_dir + "hackrf_info"], capture_output=True,
timeout=TIMEOUT)
if serial in flash_info.stdout.decode('utf-8', errors='ignore'):
device_found = True
break
time.sleep(0.1)
if not device_found:
fail(75)
def find_sn(name, bin_dir, claimed_sns=[]):
while True:
sn_list = []
info = subprocess.run([bin_dir + "hackrf_info"], capture_output=True,
encoding="utf-8", timeout=TIMEOUT)
devices_list = re.findall(r'Found HackRF\n.+\n.+\n.+\n.+\n.+\n.+', info.stdout)
out(f"\nPotential {name}(s) found:\n")
for device in devices_list:
new_sn = re.search(r'Serial number: \w+', device).group().split(': ')[1]
if new_sn not in claimed_sns:
sn_list.append(new_sn)
if len(sn_list) > 1:
for i in range(len(sn_list)):
out(f"{i}: {sn_list[i]}")
choice = int(input(f"\nEnter the index of your target {name}s serial number: "))
if 0 <= choice < len(sn_list):
sn = sn_list[choice]
break
else:
out("Incorrect choice, try again.")
elif len(sn_list) == 1:
sn = sn_list[0]
out(f"{sn}\n")
break
else:
out("Failed to parse a serial number from hackrf_info")
fail(1)
return sn
def get_version():
version = subprocess.run(["git", "log", "-n" "1", "--format=%h"],
capture_output=True, encoding="utf-8", timeout=TIMEOUT)
if version.returncode != 0:
return "2026.01.3+"
elif version.returncode == 0:
dirty = subprocess.run(["git", "status", "-s", "--untracked-files=no"],
capture_output=True, encoding="utf-8", timeout=TIMEOUT)
if dirty.stdout != "":
dirty_flag = "*"
else:
dirty_flag = ""
return f"git-{version.stdout.strip()}{dirty_flag}"
def main():
write_waveform()
parser = argparse.ArgumentParser(description="Utility for testing HackRF One")
parser.add_argument("-c", "--noclk", action="store_true", help="skip CLKIN, CLKOUT, and PPM tests")
parser.add_argument("-i", "--noif", action="store_true", help="skip IF tuning range test")
parser.add_argument("-l", "--loop", action="store_true", help="repeat the test until terminated with ctrl-c")
parser.add_argument("-m", "--manufacturer", action="store_true", help="check the manufacturer of target devices")
parser.add_argument("-r", "--rev", metavar="<hardware rev> or \"any\"", type=str,
help="check EUT pin straps for specific hardware revision (default: \"r9\")",
default="r9")
parser.add_argument("-s", "--solo", action="store_true", help="perform limited tests on a single EUT with no TESTER")
parser.add_argument("-t", "--tcxo", action="store_true", help="skip CLKIN/CLKOUT tests and use TCXO instead")
parser.add_argument("-E", "--eut", metavar="<EUT SN>", type=str,
help="EUT serial number")
parser.add_argument("-T", "--tester", metavar="<TESTER SN>", type=str,
help="TESTER serial number")
parser.add_argument("-f", "--fwupdate", metavar="<path to firmware binaries>", type=str,
help="update firmware with binaries from specified directory")
parser.add_argument("-H", "--hostdir", metavar="<path to installed host tools>", type=str,
help="location of installed hackrf host tools, will attempt to find them if omitted")
parser.add_argument("-b", "--testerdir", metavar="<separate path to TESTER host tools>", type=str,
help="necessary only if EUT/TESTER have separate host binaries")
parser.add_argument("-C", "--ci", action="store_true", help="For use with Jenkins CI user")
parser.add_argument("-u", "--unattended", action="store_true", help="For use with unattended hardware")
parser.add_argument("-L", "--log", metavar="<log file>", type=str,
help="log file location")
global args
args = parser.parse_args()
if args.ci:
user = "jenkins"
else:
user = os.getlogin()
if "any" in args.rev.lower():
args.rev = None
elif args.rev.lower() == "r1" or args.rev.lower() == "r4":
args.rev = "older than r6"
if args.hostdir:
eut_host_dir = args.hostdir
else:
try:
eut_host_dir = os.path.dirname(shutil.which('hackrf_info')) + "/"
except:
out("No path to hackrf host tools found. Please provide a directory via --hostdir")
fail(1)
if args.testerdir:
if args.testerdir == eut_host_dir:
out("Specified TESTER bin directory must be different from the found EUT bin directory")
out("If shared TESTER/EUT bin directory is intended, omit --testerdir")
fail(1)
else:
tester_host_dir = args.testerdir
else:
tester_host_dir = eut_host_dir
unique_bin = (tester_host_dir != eut_host_dir)
count = 0
while True:
out()
out("================================")
out(datetime.now())
out(sys.argv)
out(f"user: {user}")
out(f"version: {get_version()}")
out(f"pid: {os.getpid()}")
if args.loop:
out(f"repeat count: {count}")
out("================================")
out()
if args.eut:
eut_sn = args.eut
else:
if args.tester:
eut_sn = find_sn("EUT", eut_host_dir, [args.tester])
else:
eut_sn = find_sn("EUT", eut_host_dir)
if args.tester:
tester_sn = args.tester
else:
tester_sn = find_sn("TESTER", tester_host_dir, [eut_sn])
if eut_sn == tester_sn:
out("TESTER and EUT cannot be the same device")
fail(1)
if args.fwupdate:
program(eut_host_dir, args.fwupdate, eut_sn, args.unattended)
if not args.rev:
out("Skipping EUT hardware revision check")
eut = HackRF("EUT", eut_host_dir, eut_sn, args.manufacturer, revision=args.rev)
if args.solo:
tester = None
else:
tester = HackRF("TESTER", tester_host_dir, tester_sn, args.manufacturer, unique_bin=unique_bin)
tester.test_serial()
tester.partner = eut
eut.partner = tester
out("Testing EUT")
if args.solo:
eut.clkout_connected = False
elif args.noclk:
eut.clkout_connected = False
tester.clkout_connected = False
elif args.tcxo:
eut.clkout_connected = False
tester.clkout_connected = True
else:
eut.clkout_connected = True
tester.clkout_connected = True
if count > 0 and not args.fw_update:
eut.activate_leds(False)
eut.test_serial()
# limited RF test without clock synchronization
eut.test_rf_preliminary()
if args.noclk or args.solo:
out("Skipping CLKIN, CLKOUT, and PPM tests")
else:
eut.test_xtal()
if not args.tcxo:
eut.test_clkout()
eut.test_clkin()
eut.clkout(False)
if tester:
tester.clkout(True)
if args.tcxo:
if args.solo:
out("Error: --solo is incompatible with --tcxo")
sys.exit(1)
if tester.clkin():
out("Using TCXO on TESTER")
else:
out("Warning: No TCXO or external clock detected on TESTER")
out("Skipping CLKOUT test")
if not args.noclk and not eut.clkin():
fail(211)
# full RF test with clock synchronization
if tester:
eut.test_rf()
if args.noif or args.solo:
out("Skipping IF tuning range test")
else:
eut.test_if_range(ifmin, ifmax)
eut.activate_leds(True)
out()
if (args.solo or args.noif or args.noclk or args.tcxo or not args.rev):
out("Limited test complete")
else:
out("PASS if all 6 LEDs active")
count += 1
if not args.loop:
break
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
print()
out("KeyboardInterrupt")
sys.exit(0)
except subprocess.TimeoutExpired:
log(traceback.format_exc())
fail(180)
================================================
FILE: ci-scripts/install_host.sh
================================================
#!/bin/bash
set -e
cd host
cmake -B build
cmake --build build
cd ..
================================================
FILE: ci-scripts/test-debug.py
================================================
#!/usr/bin/python3
import sys
import subprocess
PASS, FAIL = range(2)
EUT = "RunningFromRAM"
def check_debug(target, register, reg_val):
hackrf_debug = subprocess.run(["host/build/hackrf-tools/src/hackrf_debug",
f"--{target}", "--register", register,
"--read", "--device", EUT],
capture_output=True, encoding="UTF-8")
if reg_val in hackrf_debug.stdout:
print(f"hackrf_debug --{target} passed.")
return PASS
else:
print(f"hackrf_debug --{target} failed.")
return FAIL
def main():
results = [
check_debug("si5351c", "2", "0x03"),
check_debug("max2837", "3", "0x1b9"),
check_debug("rffc5072", "2", "0x9055"),
]
if FAIL not in results:
sys.exit(PASS)
else:
sys.exit(FAIL)
if __name__ == "__main__":
main()
================================================
FILE: ci-scripts/test-firmware-flash.sh
================================================
#!/bin/bash
host/build/hackrf-tools/src/hackrf_spiflash -w firmware/hackrf_usb/build/hackrf_usb.bin
EXIT_CODE="$?"
if [ "$EXIT_CODE" == "1" ]
then
echo "No HackRF found! Disconnected? Exiting.."
exit $EXIT_CODE
elif [ "$EXIT_CODE" == "0" ]
then
echo "Firmware successfully flashed!"
elif [ "$EXIT_CODE" == "127" ]
then
echo "Host tool installation failed! Exiting.."
exit $EXIT_CODE
else
echo "Unknown error"
exit $EXIT_CODE
fi
================================================
FILE: ci-scripts/test-firmware-program.sh
================================================
#!/bin/bash
dfu-util --device 1fc9:000c --alt 0 --download firmware/hackrf_usb/build/hackrf_usb.dfu
sleep 1s
EXIT_CODE="$?"
if [ "$EXIT_CODE" == "0" ]
then
echo "DFU installation success! Exiting.."
exit $EXIT_CODE
elif [ "$EXIT_CODE" == "74" ]
then
echo "No DFU capable USB device available! Disconnected? Exiting.."
exit 1
elif [ "$EXIT_CODE" == "127" ]
then
echo "dfu-util installation failed! Exiting.."
exit $EXIT_CODE
else
echo "Unhandled exception"
exit $EXIT_CODE
fi
================================================
FILE: ci-scripts/test-transfer.py
================================================
#!/usr/bin/python3
import subprocess
import time
import sys
from os import environ
EUT = environ.get('EUT')
TESTER = environ.get('TESTER')
PASS, FAIL = range(2)
def write_bytes():
tx_bytes = b'\x7f\x00\x59\x59\x00\x7f\xa7\x59\x81\x00\xa7\xa7\x00\x81\x59\xa7'
with open("/tmp/binary100", "wb") as bin_file:
for i in range(62500): # 1MB file size
bin_file.write(tx_bytes)
def capture_signal(sweep_range, tx_gain, rx_lna_gain, rx_vga_gain, freq=None,
if_freq=None, lo_freq=None, image_reject=0):
test_type = sys.argv[1]
if test_type == "tx":
transmitter = EUT
receiver = TESTER
elif test_type == "rx":
transmitter = TESTER
receiver = EUT
else:
print(f"Invalid command-line argument: {test_type}. Use tx or rx")
sys.exit(1)
if if_freq == None:
transmit = subprocess.Popen(["host/build/hackrf-tools/src/hackrf_transfer",
"-d", transmitter, "-R", "-t", "/tmp/binary100",
"-a", "0", "-x", tx_gain, "-f", freq],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
else:
transmit = subprocess.Popen(["host/build/hackrf-tools/src/hackrf_transfer",
"-d", transmitter, "-R", "-t", "/tmp/binary100",
"-a", "0", "-x", tx_gain, "-i", if_freq,
"-o", lo_freq, "-m", image_reject],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
time.sleep(1)
sweep = subprocess.Popen(["host/build/hackrf-tools/src/hackrf_sweep",
"-d", receiver, "-N", "2", "-w", "333333",
"-f", sweep_range, "-a", "0", "-l", rx_lna_gain,
"-g", rx_vga_gain],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sweep.wait()
transmit.terminate()
transmit.wait()
# parse the hackrf_sweep output
data, stderr = sweep.communicate()
data = data.decode("utf-8")
data = data.split("\n")
print(data[4])
data = data[4] # Note: using data from the 2nd sweep until issue #1230 is resolved.
data = data.split(", ")
data = data[6:21]
bins = [float(bin) for bin in data]
return bins
def check_signal(fre
gitextract_go_tk_2v/
├── .clang-format
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug-report.yml
│ │ ├── config.yml
│ │ ├── documentation-request.yml
│ │ ├── feature-request.yml
│ │ ├── question.yml
│ │ └── technical-support.yml
│ └── workflows/
│ ├── build.yml
│ └── clang-format-check.yml
├── .gitignore
├── .gitmodules
├── .readthedocs.yaml
├── CODE_OF_CONDUCT.md
├── COPYING
├── Dockerfile
├── Jenkinsfile
├── Readme.md
├── TRADEMARK
├── ci-scripts/
│ ├── build_h1_firmware.sh
│ ├── build_hpro_firmware.sh
│ ├── hackrf_pro_test.py
│ ├── hackrf_test.py
│ ├── install_host.sh
│ ├── test-debug.py
│ ├── test-firmware-flash.sh
│ ├── test-firmware-program.sh
│ ├── test-transfer.py
│ ├── test_host.sh
│ └── test_sgpio_debug.py
├── docs/
│ ├── .readthedocs.yaml
│ ├── Makefile
│ ├── doxygen/
│ │ └── Doxyfile
│ ├── make.bat
│ ├── requirements.txt
│ └── source/
│ ├── LPC43XX_Debugging.rst
│ ├── LPC43XX_SGPIO_Configuration.rst
│ ├── conf.py
│ ├── enclosure_options.rst
│ ├── expansion_interface.rst
│ ├── external_clock_interface.rst
│ ├── firmware_development_setup.rst
│ ├── getting_help.rst
│ ├── hackrf_connectors.rst
│ ├── hackrf_minimum_requirements.rst
│ ├── hackrf_one.rst
│ ├── hackrf_pro.rst
│ ├── hackrf_projects_mentions.rst
│ ├── hackrf_tools.rst
│ ├── hackrfs_buttons.rst
│ ├── hardware_components.rst
│ ├── hardware_triggering.rst
│ ├── index.rst
│ ├── installing_hackrf_software.rst
│ ├── jawbreaker.rst
│ ├── leds.rst
│ ├── list_of_hardware_revisions.rst
│ ├── opera_cake.rst
│ ├── opera_cake_board_addressing.rst
│ ├── opera_cake_faq.rst
│ ├── opera_cake_hardware.rst
│ ├── opera_cake_modes_of_operation.rst
│ ├── opera_cake_port_configuration.rst
│ ├── rad1o.rst
│ ├── rf_shield_installation.rst
│ ├── sampling_rate.rst
│ ├── setting_gain.rst
│ ├── software_support.rst
│ ├── synchronization_checklist.rst
│ ├── troubleshooting.rst
│ ├── updating_firmware.rst
│ ├── usb_cables.rst
│ └── virtual_machines.rst
├── firmware/
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── README
│ ├── appveyor.sh
│ ├── blinky/
│ │ ├── CMakeLists.txt
│ │ ├── README
│ │ └── blinky.c
│ ├── common/
│ │ ├── LPC4320_M4_memory.ld
│ │ ├── LPC4330_M4_memory.ld
│ │ ├── LPC43xx_M0_memory.ld
│ │ ├── LPC43xx_M4_M0_image_from_text.ld
│ │ ├── LPC43xx_M4_memory.ld
│ │ ├── LPC43xx_M4_memory_rom_only.ld
│ │ ├── README
│ │ ├── adc.c
│ │ ├── adc.h
│ │ ├── bitband.c
│ │ ├── bitband.h
│ │ ├── clkin.c
│ │ ├── clkin.h
│ │ ├── configure_file.cmake
│ │ ├── cpld_jtag.c
│ │ ├── cpld_jtag.h
│ │ ├── cpld_xc2c.c
│ │ ├── cpld_xc2c.h
│ │ ├── crc.c
│ │ ├── crc.h
│ │ ├── delay.c
│ │ ├── delay.h
│ │ ├── fault_handler.c
│ │ ├── fault_handler.h
│ │ ├── firmware_info.c
│ │ ├── firmware_info.h
│ │ ├── fixed_point.h
│ │ ├── fpga.c
│ │ ├── fpga.h
│ │ ├── fpga_image.c
│ │ ├── fpga_regs.def
│ │ ├── fpga_selftest.c
│ │ ├── gpdma.c
│ │ ├── gpdma.h
│ │ ├── gpio.h
│ │ ├── gpio_lpc.c
│ │ ├── gpio_lpc.h
│ │ ├── hackrf_core.c
│ │ ├── hackrf_core.h
│ │ ├── hackrf_ui.c
│ │ ├── hackrf_ui.h
│ │ ├── i2c_bus.c
│ │ ├── i2c_bus.h
│ │ ├── i2c_lpc.c
│ │ ├── i2c_lpc.h
│ │ ├── ice40_spi.c
│ │ ├── ice40_spi.h
│ │ ├── locking.h
│ │ ├── lz4_blk.c
│ │ ├── lz4_blk.h
│ │ ├── lz4_buf.h
│ │ ├── m0_bin.s.cmake
│ │ ├── m0_sleep.c
│ │ ├── m0_state.c
│ │ ├── m0_state.h
│ │ ├── max2831.c
│ │ ├── max2831.h
│ │ ├── max2831_regs.def
│ │ ├── max2831_target.c
│ │ ├── max2831_target.h
│ │ ├── max2837.c
│ │ ├── max2837.h
│ │ ├── max2837_regs.def
│ │ ├── max2837_target.c
│ │ ├── max2837_target.h
│ │ ├── max2839.c
│ │ ├── max2839.h
│ │ ├── max2839_regs.def
│ │ ├── max2839_target.c
│ │ ├── max2839_target.h
│ │ ├── max283x.c
│ │ ├── max283x.h
│ │ ├── max2871.c
│ │ ├── max2871.h
│ │ ├── max2871_regs.c
│ │ ├── max2871_regs.h
│ │ ├── max5864.c
│ │ ├── max5864.h
│ │ ├── max5864_target.c
│ │ ├── max5864_target.h
│ │ ├── mixer.c
│ │ ├── mixer.h
│ │ ├── operacake.c
│ │ ├── operacake.h
│ │ ├── operacake_sctimer.c
│ │ ├── operacake_sctimer.h
│ │ ├── platform_detect.c
│ │ ├── platform_detect.h
│ │ ├── portapack.c
│ │ ├── portapack.h
│ │ ├── rad1o/
│ │ │ ├── decoder.c
│ │ │ ├── decoder.h
│ │ │ ├── display.c
│ │ │ ├── display.h
│ │ │ ├── draw.c
│ │ │ ├── draw.h
│ │ │ ├── fonts.h
│ │ │ ├── print.c
│ │ │ ├── print.h
│ │ │ ├── render.c
│ │ │ ├── render.h
│ │ │ ├── smallfonts.c
│ │ │ ├── smallfonts.h
│ │ │ ├── ubuntu18.c
│ │ │ └── ubuntu18.h
│ │ ├── radio.c
│ │ ├── radio.h
│ │ ├── rf_path.c
│ │ ├── rf_path.h
│ │ ├── rffc5071.c
│ │ ├── rffc5071.h
│ │ ├── rffc5071_regs.def
│ │ ├── rffc5071_spi.c
│ │ ├── rffc5071_spi.h
│ │ ├── rom_iap.c
│ │ ├── rom_iap.h
│ │ ├── sct.h
│ │ ├── selftest.c
│ │ ├── selftest.h
│ │ ├── sgpio.c
│ │ ├── sgpio.h
│ │ ├── si5351c.c
│ │ ├── si5351c.h
│ │ ├── spi_bus.c
│ │ ├── spi_bus.h
│ │ ├── spi_ssp.c
│ │ ├── spi_ssp.h
│ │ ├── streaming.c
│ │ ├── streaming.h
│ │ ├── tune_config.h
│ │ ├── tuning.c
│ │ ├── tuning.h
│ │ ├── ui_portapack.c
│ │ ├── ui_portapack.h
│ │ ├── ui_rad1o.c
│ │ ├── ui_rad1o.h
│ │ ├── usb.c
│ │ ├── usb.h
│ │ ├── usb_queue.c
│ │ ├── usb_queue.h
│ │ ├── usb_request.c
│ │ ├── usb_request.h
│ │ ├── usb_standard_request.c
│ │ ├── usb_standard_request.h
│ │ ├── usb_type.h
│ │ ├── w25q80bv.c
│ │ ├── w25q80bv.h
│ │ ├── w25q80bv_target.c
│ │ ├── w25q80bv_target.h
│ │ └── xapp058/
│ │ ├── README
│ │ ├── lenval.c
│ │ ├── lenval.h
│ │ ├── micro.c
│ │ ├── micro.h
│ │ ├── ports.c
│ │ └── ports.h
│ ├── cpld/
│ │ ├── README
│ │ ├── sgpio_debug/
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ ├── batch_svf
│ │ │ ├── batch_xsvf
│ │ │ ├── default.xsvf
│ │ │ ├── sgpio_debug.xise
│ │ │ ├── top.jed
│ │ │ ├── top.ucf
│ │ │ ├── top.vhd
│ │ │ └── top_tb.vhd
│ │ └── sgpio_if/
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── batch_svf
│ │ ├── batch_xsvf
│ │ ├── default.xsvf
│ │ ├── sgpio_if.xise
│ │ ├── top.jed
│ │ ├── top.ucf
│ │ ├── top.vhd
│ │ └── top_tb.vhd
│ ├── dfu-util.cmake
│ ├── dfu.py
│ ├── fpga/
│ │ ├── amaranth_future/
│ │ │ └── fixed.py
│ │ ├── board.py
│ │ ├── build.py
│ │ ├── dsp/
│ │ │ ├── __init__.py
│ │ │ ├── cic.py
│ │ │ ├── dc_block.py
│ │ │ ├── fir.py
│ │ │ ├── fir_mac16.py
│ │ │ ├── mcm.py
│ │ │ ├── nco.py
│ │ │ ├── quarter_shift.py
│ │ │ ├── round.py
│ │ │ └── sb_mac16.py
│ │ ├── interface/
│ │ │ ├── __init__.py
│ │ │ ├── max586x.py
│ │ │ ├── sgpio.py
│ │ │ └── spi.py
│ │ ├── requirements.txt
│ │ ├── top/
│ │ │ ├── ext_precision_rx.py
│ │ │ ├── ext_precision_tx.py
│ │ │ ├── half_precision.py
│ │ │ └── standard.py
│ │ └── util/
│ │ ├── __init__.py
│ │ ├── _stream.py
│ │ └── lfsr.py
│ ├── hackrf-common.cmake
│ ├── hackrf_usb/
│ │ ├── CMakeLists.txt
│ │ ├── hackrf_usb.c
│ │ ├── sgpio_m0.s
│ │ ├── usb_api_adc.c
│ │ ├── usb_api_adc.h
│ │ ├── usb_api_board_info.c
│ │ ├── usb_api_board_info.h
│ │ ├── usb_api_cpld.c
│ │ ├── usb_api_cpld.h
│ │ ├── usb_api_m0_state.c
│ │ ├── usb_api_m0_state.h
│ │ ├── usb_api_operacake.c
│ │ ├── usb_api_operacake.h
│ │ ├── usb_api_praline.c
│ │ ├── usb_api_praline.h
│ │ ├── usb_api_register.c
│ │ ├── usb_api_register.h
│ │ ├── usb_api_selftest.c
│ │ ├── usb_api_selftest.h
│ │ ├── usb_api_spiflash.c
│ │ ├── usb_api_spiflash.h
│ │ ├── usb_api_sweep.c
│ │ ├── usb_api_sweep.h
│ │ ├── usb_api_transceiver.c
│ │ ├── usb_api_transceiver.h
│ │ ├── usb_api_ui.c
│ │ ├── usb_api_ui.h
│ │ ├── usb_bulk_buffer.h
│ │ ├── usb_descriptor.c
│ │ ├── usb_descriptor.h
│ │ ├── usb_device.c
│ │ ├── usb_device.h
│ │ ├── usb_endpoint.c
│ │ └── usb_endpoint.h
│ ├── toolchain-arm-cortex-m.cmake
│ └── tools/
│ ├── check_clock.py
│ ├── cpld_bitstream.py
│ ├── dumb_crc32.py
│ ├── dump_cgu.py
│ └── xsvf.py
├── hardware/
│ ├── .gitignore
│ ├── LNA915/
│ │ ├── LNA915-cache.lib
│ │ ├── LNA915.kicad_pcb
│ │ ├── LNA915.lib
│ │ ├── LNA915.pro
│ │ ├── LNA915.sch
│ │ ├── README
│ │ ├── fp-lib-table
│ │ └── sym-lib-table
│ ├── bubblegum/
│ │ ├── bubblegum-cache.lib
│ │ ├── bubblegum.brd
│ │ ├── bubblegum.pro
│ │ └── bubblegum.sch
│ ├── hackrf-one/
│ │ ├── 74AUP2G58GU.kicad_sym
│ │ ├── LICENSE
│ │ ├── PlasticCase_CAD/
│ │ │ └── README
│ │ ├── README
│ │ ├── acrylic_case/
│ │ │ └── README.md
│ │ ├── baseband.kicad_sch
│ │ ├── fp-lib-table
│ │ ├── frontend.kicad_sch
│ │ ├── hackrf-one-cache.lib
│ │ ├── hackrf-one.kicad_pcb
│ │ ├── hackrf-one.kicad_pro
│ │ ├── hackrf-one.kicad_sch
│ │ ├── mcu.kicad_sch
│ │ └── sym-lib-table
│ ├── jawbreaker/
│ │ ├── README
│ │ ├── SoBv1_DP17298/
│ │ │ ├── README
│ │ │ ├── SoBv1-DP17298-jawbreaker-Bottom.skp
│ │ │ ├── SoBv1-DP17298-jawbreaker-Bottom_laser_cutting_493.3mm_Easy.txt
│ │ │ ├── SoBv1-DP17298-jawbreaker-Top.skp
│ │ │ └── SoBv1-DP17298-jawbreaker-Top_laser_cutting_1153.3mm_Normal.txt
│ │ ├── baseband.sch
│ │ ├── frontend.sch
│ │ ├── jawbreaker-cache.lib
│ │ ├── jawbreaker.brd
│ │ ├── jawbreaker.pro
│ │ ├── jawbreaker.sch
│ │ └── mcu.sch
│ ├── jellybean/
│ │ ├── JellyBean_PinMux.pmx
│ │ ├── JellyBean_TPS62410.ods
│ │ ├── README
│ │ ├── jellybean-cache.lib
│ │ ├── jellybean.brd
│ │ ├── jellybean.pro
│ │ ├── jellybean.sch
│ │ └── jellybean_BOM.ods
│ ├── kicad/
│ │ ├── hackrf.dcm
│ │ ├── hackrf.lib
│ │ └── hackrf.mod
│ ├── lemondrop/
│ │ ├── README
│ │ ├── lemondrop-cache.lib
│ │ ├── lemondrop.brd
│ │ ├── lemondrop.pro
│ │ └── lemondrop.sch
│ ├── licorice/
│ │ ├── licorice-cache.lib
│ │ ├── licorice.brd
│ │ ├── licorice.pro
│ │ └── licorice.sch
│ ├── lollipop/
│ │ ├── lollipop-cache.lib
│ │ ├── lollipop.brd
│ │ ├── lollipop.pro
│ │ ├── lollipop.sch
│ │ └── lollipop_logic.py
│ ├── marzipan/
│ │ ├── README
│ │ ├── baseband.sch
│ │ ├── fp-lib-table
│ │ ├── frontend.sch
│ │ ├── marzipan-cache.lib
│ │ ├── marzipan.kicad_pcb
│ │ ├── marzipan.pro
│ │ ├── marzipan.sch
│ │ └── mcu.sch
│ ├── neapolitan/
│ │ ├── README
│ │ ├── baseband.sch
│ │ ├── fp-lib-table
│ │ ├── frontend.sch
│ │ ├── mcu.sch
│ │ ├── neapolitan-cache.lib
│ │ ├── neapolitan.kicad_pcb
│ │ ├── neapolitan.pro
│ │ └── neapolitan.sch
│ ├── operacake/
│ │ ├── README
│ │ ├── fp-lib-table
│ │ ├── operacake-cache.lib
│ │ ├── operacake.kicad_pcb
│ │ ├── operacake.pro
│ │ └── operacake.sch
│ └── test/
│ └── si5351-configure.py
├── host/
│ ├── CMakeLists.txt
│ ├── README.md
│ ├── cmake/
│ │ ├── cmake_uninstall.cmake.in
│ │ ├── modules/
│ │ │ ├── FindFFTW3f.cmake
│ │ │ └── FindLIBUSB.cmake
│ │ └── set_release.cmake
│ ├── hackrf-tools/
│ │ ├── CMakeLists.txt
│ │ ├── getopt/
│ │ │ ├── getopt.c
│ │ │ └── getopt.h
│ │ └── src/
│ │ ├── CMakeLists.txt
│ │ ├── hackrf_biast.c
│ │ ├── hackrf_clock.c
│ │ ├── hackrf_cpldjtag.c
│ │ ├── hackrf_debug.c
│ │ ├── hackrf_info.c
│ │ ├── hackrf_operacake.c
│ │ ├── hackrf_spiflash.c
│ │ ├── hackrf_sweep.c
│ │ └── hackrf_transfer.c
│ └── libhackrf/
│ ├── 53-hackrf.rules
│ ├── 53-hackrf.rules.in
│ ├── CMakeLists.txt
│ ├── HackRFConfig.cmake
│ ├── libhackrf.pc.in
│ └── src/
│ ├── CMakeLists.txt
│ ├── hackrf.c
│ └── hackrf.h
└── tools/
├── add-braces.sh
├── deploy-nightly.sh
├── reformat-source.sh
└── sgpio_debug/
├── create_tx_counter.py
├── sgpio_debug_rx.grc
└── sgpio_debug_tx.sh
SYMBOL INDEX (1733 symbols across 176 files)
FILE: ci-scripts/hackrf_pro_test.py
class TestCase (line 41) | class TestCase():
function fail_rf (line 424) | def fail_rf(errors):
function log (line 563) | def log(message=""):
function out (line 569) | def out(message=""):
function fail (line 573) | def fail(error_code):
class HackRF (line 577) | class HackRF:
method __init__ (line 578) | def __init__(self, name, bin_dir, serial, mf_check, id=None, revision=...
method clkin (line 665) | def clkin(self):
method clkout (line 689) | def clkout(self, enable):
method test_clkout (line 741) | def test_clkout(self):
method test_clkin (line 751) | def test_clkin(self):
method clock_error_ppm (line 754) | def clock_error_ppm(self):
method test_xtal (line 805) | def test_xtal(self):
method verify_register (line 813) | def verify_register(self, target, address, value):
method test_clkgen (line 825) | def test_clkgen(self):
method test_mixer (line 829) | def test_mixer(self):
method test_xcvr (line 833) | def test_xcvr(self):
method test_serial (line 837) | def test_serial(self):
method baseline_rx (line 845) | def baseline_rx(self, test_case):
method noise_rx (line 874) | def noise_rx(self, test_case):
method analyze_transfer (line 949) | def analyze_transfer(self, transfer, test_case):
method verify_if_tuning (line 972) | def verify_if_tuning(self, test_case):
method test_if_range (line 997) | def test_if_range(self, min_case, max_case):
method analyze_sweep (line 1020) | def analyze_sweep(self, sweep, test_case):
method measure_rf (line 1117) | def measure_rf(self, test_case, sweep=True):
method test_rf_preliminary (line 1176) | def test_rf_preliminary(self):
method test_rf (line 1200) | def test_rf(self):
method activate_leds (line 1211) | def activate_leds(self, enable):
method debug_selftest (line 1227) | def debug_selftest(self):
method reset (line 1321) | def reset(self):
function write_waveform (line 1347) | def write_waveform():
function program (line 1358) | def program(bin_dir, fw_dir, serial, unattended=False):
function find_sn (line 1434) | def find_sn(name, bin_dir, factory_test, claimed_sns=[]):
function get_version (line 1482) | def get_version():
function main (line 1497) | def main():
FILE: ci-scripts/hackrf_test.py
class TestCase (line 41) | class TestCase():
function fail_rf (line 341) | def fail_rf(errors):
function log (line 471) | def log(message=""):
function out (line 477) | def out(message=""):
function fail (line 481) | def fail(error_code):
class HackRF (line 485) | class HackRF:
method __init__ (line 486) | def __init__(self, name, bin_dir, serial, mf_check, revision=None, uni...
method clkin (line 544) | def clkin(self):
method clkout (line 565) | def clkout(self, enable):
method test_clkout (line 617) | def test_clkout(self):
method test_clkin (line 627) | def test_clkin(self):
method clock_error_ppm (line 630) | def clock_error_ppm(self):
method test_xtal (line 681) | def test_xtal(self):
method verify_register (line 689) | def verify_register(self, target, address, value):
method test_clkgen (line 701) | def test_clkgen(self):
method test_mixer (line 705) | def test_mixer(self):
method test_xcvr (line 709) | def test_xcvr(self):
method test_serial (line 713) | def test_serial(self):
method baseline_rx (line 721) | def baseline_rx(self, test_case):
method noise_rx (line 750) | def noise_rx(self, test_case):
method analyze_transfer (line 825) | def analyze_transfer(self, transfer, test_case):
method verify_if_tuning (line 848) | def verify_if_tuning(self, test_case):
method test_if_range (line 873) | def test_if_range(self, min_case, max_case):
method analyze_sweep (line 896) | def analyze_sweep(self, sweep, test_case):
method measure_rf (line 993) | def measure_rf(self, test_case, sweep=True):
method test_rf_preliminary (line 1052) | def test_rf_preliminary(self):
method test_rf (line 1076) | def test_rf(self):
method activate_leds (line 1087) | def activate_leds(self, enable):
function write_waveform (line 1105) | def write_waveform():
function program (line 1116) | def program(bin_dir, fw_dir, serial, unattended=False):
function find_sn (line 1187) | def find_sn(name, bin_dir, claimed_sns=[]):
function get_version (line 1218) | def get_version():
function main (line 1233) | def main():
FILE: ci-scripts/test-debug.py
function check_debug (line 9) | def check_debug(target, register, reg_val):
function main (line 23) | def main():
FILE: ci-scripts/test-transfer.py
function write_bytes (line 12) | def write_bytes():
function capture_signal (line 19) | def capture_signal(sweep_range, tx_gain, rx_lna_gain, rx_vga_gain, freq=...
function check_signal (line 67) | def check_signal(freq, bins):
function main (line 89) | def main():
FILE: ci-scripts/test_sgpio_debug.py
function program_device (line 10) | def program_device():
function capture (line 24) | def capture():
function check_bytes (line 54) | def check_bytes():
function main (line 79) | def main():
FILE: firmware/blinky/blinky.c
function main (line 26) | int main(void)
FILE: firmware/common/adc.c
function adc_read (line 26) | uint16_t adc_read(uint8_t pin)
function adc_off (line 42) | void adc_off(void)
FILE: firmware/common/bitband.c
function peripheral_bitband_set (line 36) | void peripheral_bitband_set(
function peripheral_bitband_clear (line 45) | void peripheral_bitband_clear(
function peripheral_bitband_get (line 54) | uint32_t peripheral_bitband_get(
FILE: firmware/common/clkin.c
type dma_lli (line 34) | typedef struct {
type tcr_sequence (line 42) | typedef struct {
function clkin_detect_init (line 50) | void clkin_detect_init(void)
function clkin_frequency (line 109) | uint32_t clkin_frequency(void)
FILE: firmware/common/cpld_jtag.c
function cpld_jtag_take (line 34) | void cpld_jtag_take(jtag_t* const jtag)
function cpld_jtag_release (line 63) | void cpld_jtag_release(jtag_t* const jtag)
function cpld_jtag_program (line 85) | int cpld_jtag_program(
function cpld_jtag_get_next_byte (line 103) | unsigned char cpld_jtag_get_next_byte(void)
FILE: firmware/common/cpld_jtag.h
type jtag_gpio_t (line 29) | typedef struct jtag_gpio_t {
type jtag_t (line 42) | typedef struct jtag_t {
FILE: firmware/common/cpld_xc2c.c
type cpld_xc2c_ir_t (line 31) | typedef enum {
function cpld_xc2c_jtag_clock (line 60) | static bool cpld_xc2c_jtag_clock(
function cpld_xc2c_jtag_shift_ptr_tms (line 99) | static void cpld_xc2c_jtag_shift_ptr_tms(
function cpld_xc2c_jtag_shift_ptr (line 119) | static void cpld_xc2c_jtag_shift_ptr(
function cpld_xc2c_jtag_shift_u32 (line 130) | static uint32_t cpld_xc2c_jtag_shift_u32(
function cpld_xc2c_jtag_clocks (line 146) | static void cpld_xc2c_jtag_clocks(const jtag_t* const jtag, const size_t...
function cpld_xc2c_jtag_pause (line 153) | static void cpld_xc2c_jtag_pause(const jtag_t* const jtag, const size_t ...
function cpld_xc2c_jtag_shift_dr_ir (line 160) | static void cpld_xc2c_jtag_shift_dr_ir(
function cpld_xc2c_jtag_shift_dr (line 180) | static void cpld_xc2c_jtag_shift_dr(
function cpld_xc2c_jtag_shift_ir_pause (line 189) | static uint8_t cpld_xc2c_jtag_shift_ir_pause(
function cpld_xc2c_jtag_shift_ir (line 201) | static uint8_t cpld_xc2c_jtag_shift_ir(const jtag_t* const jtag, const c...
function cpld_xc2c_jtag_reset (line 206) | static void cpld_xc2c_jtag_reset(const jtag_t* const jtag)
function cpld_xc2c_jtag_reset_and_idle (line 213) | static void cpld_xc2c_jtag_reset_and_idle(const jtag_t* const jtag)
function cpld_xc2c_jtag_idcode (line 222) | static uint32_t cpld_xc2c_jtag_idcode(const jtag_t* const jtag)
function cpld_xc2c64a_jtag_idcode_ok (line 231) | static bool cpld_xc2c64a_jtag_idcode_ok(const jtag_t* const jtag)
function cpld_xc2c_jtag_conld (line 236) | static void cpld_xc2c_jtag_conld(const jtag_t* const jtag)
function cpld_xc2c_jtag_enable (line 242) | static void cpld_xc2c_jtag_enable(const jtag_t* const jtag)
function cpld_xc2c_jtag_disable (line 248) | static void cpld_xc2c_jtag_disable(const jtag_t* const jtag)
function cpld_xc2c_jtag_sram_write (line 254) | static void cpld_xc2c_jtag_sram_write(const jtag_t* const jtag)
function cpld_xc2c_jtag_sram_read (line 259) | static void cpld_xc2c_jtag_sram_read(const jtag_t* const jtag)
function cpld_xc2c_jtag_bypass (line 264) | static uint32_t cpld_xc2c_jtag_bypass(const jtag_t* const jtag, const bo...
function cpld_xc2c_jtag_read_write_protect (line 274) | static bool cpld_xc2c_jtag_read_write_protect(const jtag_t* const jtag)
function cpld_xc2c_jtag_is_done (line 280) | static bool cpld_xc2c_jtag_is_done(const jtag_t* const jtag)
function cpld_xc2c_jtag_init_special (line 285) | static void cpld_xc2c_jtag_init_special(const jtag_t* const jtag)
function cpld_xc2c_jtag_read (line 300) | static void cpld_xc2c_jtag_read(const jtag_t* const jtag)
function cpld_xc2c64a_jtag_read_row (line 305) | static void cpld_xc2c64a_jtag_read_row(
function cpld_xc2c64a_jtag_checksum (line 321) | bool cpld_xc2c64a_jtag_checksum(
function cpld_xc2c64a_jtag_sram_write_row (line 380) | static void cpld_xc2c64a_jtag_sram_write_row(
function cpld_xc2c64a_jtag_sram_read_row (line 401) | static void cpld_xc2c64a_jtag_sram_read_row(
function cpld_xc2c64a_jtag_sram_compare_row (line 422) | static bool cpld_xc2c64a_jtag_sram_compare_row(
function cpld_xc2c64a_jtag_sram_write (line 445) | void cpld_xc2c64a_jtag_sram_write(
function cpld_xc2c64a_jtag_sram_verify (line 467) | bool cpld_xc2c64a_jtag_sram_verify(
FILE: firmware/common/cpld_xc2c.h
type cpld_xc2c64a_row_data_t (line 36) | typedef struct {
type cpld_xc2c64a_program_t (line 40) | typedef struct {
type cpld_xc2c64a_row_mask_t (line 44) | typedef struct {
type cpld_xc2c64a_verify_t (line 48) | typedef struct {
type cpld_xc2c64a_row_addresses_t (line 53) | typedef struct {
FILE: firmware/common/crc.c
function crc32_init (line 27) | void crc32_init(crc32_t* const crc)
function crc32_update (line 34) | void crc32_update(crc32_t* const crc, const uint8_t* const data, const s...
function crc32_digest (line 50) | uint32_t crc32_digest(const crc32_t* const crc)
FILE: firmware/common/crc.h
type crc32_t (line 29) | typedef struct {
FILE: firmware/common/delay.c
function delay (line 24) | void delay(uint32_t duration)
function delay_us_at_mhz (line 33) | void delay_us_at_mhz(uint32_t us, uint32_t mhz)
FILE: firmware/common/fault_handler.c
type hard_fault_stack_t (line 28) | typedef struct {
function hard_fault_handler (line 39) | __attribute__((naked)) void hard_fault_handler(void)
function hard_fault_handler_c (line 50) | __attribute__((used)) void hard_fault_handler_c(uint32_t* args)
function mem_manage_handler (line 76) | void mem_manage_handler(void)
function bus_fault_handler (line 81) | void bus_fault_handler(void)
function usage_fault_handler (line 86) | void usage_fault_handler(void)
FILE: firmware/common/fault_handler.h
type armv7m_scb_t (line 33) | typedef struct armv7m_scb_t armv7m_scb_t;
type armv7m_scb_t (line 35) | struct armv7m_scb_t {
FILE: firmware/common/firmware_info.c
type firmware_info_t (line 48) | struct firmware_info_t
FILE: firmware/common/firmware_info.h
type firmware_info_t (line 27) | struct firmware_info_t {
type firmware_info_t (line 35) | struct firmware_info_t
FILE: firmware/common/fixed_point.h
type fp_40_24_t (line 26) | typedef uint64_t fp_40_24_t;
FILE: firmware/common/fpga.c
function fpga_init (line 29) | void fpga_init(fpga_driver_t* const drv)
function fpga_setup (line 44) | void fpga_setup(fpga_driver_t* const drv)
function fpga_reg_read (line 51) | uint8_t fpga_reg_read(fpga_driver_t* const drv, uint8_t r)
function fpga_reg_write (line 61) | void fpga_reg_write(fpga_driver_t* const drv, uint8_t r, uint8_t v)
function fpga_reg_commit (line 70) | static inline void fpga_reg_commit(fpga_driver_t* const drv, uint8_t r)
function fpga_regs_commit (line 75) | void fpga_regs_commit(fpga_driver_t* const drv)
function fpga_set_trigger_enable (line 85) | void fpga_set_trigger_enable(fpga_driver_t* const drv, const bool enable)
function fpga_set_rx_dc_block_enable (line 92) | void fpga_set_rx_dc_block_enable(fpga_driver_t* const drv, const bool en...
function fpga_set_rx_decimation_ratio (line 98) | void fpga_set_rx_decimation_ratio(fpga_driver_t* const drv, const uint8_...
function fpga_set_rx_quarter_shift_mode (line 104) | void fpga_set_rx_quarter_shift_mode(
function fpga_set_tx_interpolation_ratio (line 113) | void fpga_set_tx_interpolation_ratio(fpga_driver_t* const drv, const uin...
function fpga_set_prbs_enable (line 119) | void fpga_set_prbs_enable(fpga_driver_t* const drv, const bool enable)
function fpga_set_tx_nco_enable (line 128) | void fpga_set_tx_nco_enable(fpga_driver_t* const drv, const bool enable)
function fpga_set_tx_nco_pstep (line 134) | void fpga_set_tx_nco_pstep(fpga_driver_t* const drv, const uint8_t phase...
FILE: firmware/common/fpga.h
type fpga_quarter_shift_mode_t (line 32) | typedef enum {
type fpga_driver_t (line 38) | struct fpga_driver_t
type fpga_driver_t (line 39) | typedef struct fpga_driver_t fpga_driver_t;
type fpga_driver_t (line 41) | struct fpga_driver_t {
type fpga_loader_t (line 47) | struct fpga_loader_t {
type fpga_loader_t (line 91) | struct fpga_loader_t
FILE: firmware/common/fpga_image.c
type fpga_image_read_ctx (line 27) | struct fpga_image_read_ctx {
function fpga_image_read_block_cb (line 34) | static size_t fpga_image_read_block_cb(void* _ctx)
function fpga_image_load (line 66) | bool fpga_image_load(struct fpga_loader_t* loader, unsigned int index)
FILE: firmware/common/fpga_selftest.c
function rx_samples (line 33) | static int rx_samples(const unsigned int num_samples, uint32_t max_cycles)
function fpga_spi_selftest (line 54) | bool fpga_spi_selftest(void)
function lfsr_advance (line 79) | static uint8_t lfsr_advance(uint8_t v)
function fpga_sgpio_selftest (line 85) | bool fpga_sgpio_selftest(void)
function measure_tone (line 133) | static void measure_tone(int8_t* samples, size_t len, struct xcvr_measur...
function in_range (line 165) | static bool in_range(int value, int expected, int error)
function fpga_if_xcvr_selftest (line 172) | bool fpga_if_xcvr_selftest(void)
FILE: firmware/common/gpdma.c
function gpdma_controller_enable (line 27) | void gpdma_controller_enable(void)
function gpdma_channel_enable (line 33) | void gpdma_channel_enable(const uint_fast8_t channel)
function gpdma_channel_disable (line 38) | void gpdma_channel_disable(const uint_fast8_t channel)
function gpdma_channel_interrupt_tc_clear (line 44) | void gpdma_channel_interrupt_tc_clear(const uint_fast8_t channel)
function gpdma_channel_interrupt_error_clear (line 49) | void gpdma_channel_interrupt_error_clear(const uint_fast8_t channel)
function gpdma_lli_enable_interrupt (line 54) | void gpdma_lli_enable_interrupt(gpdma_lli_t* const lli)
function gpdma_lli_create_loop (line 59) | void gpdma_lli_create_loop(gpdma_lli_t* const lli, const size_t lli_count)
function gpdma_lli_create_oneshot (line 68) | void gpdma_lli_create_oneshot(gpdma_lli_t* const lli, const size_t lli_c...
FILE: firmware/common/gpio.h
type gpio (line 28) | struct gpio
FILE: firmware/common/gpio_lpc.c
function gpio_init (line 27) | void gpio_init(void)
function gpio_set (line 34) | void gpio_set(gpio_t gpio)
function gpio_clear (line 39) | void gpio_clear(gpio_t gpio)
function gpio_toggle (line 44) | void gpio_toggle(gpio_t gpio)
function gpio_output (line 49) | void gpio_output(gpio_t gpio)
function gpio_input (line 54) | void gpio_input(gpio_t gpio)
function gpio_write (line 59) | void gpio_write(gpio_t gpio, const bool value)
function gpio_read (line 64) | bool gpio_read(gpio_t gpio)
FILE: firmware/common/gpio_lpc.h
type gpio_port_t (line 35) | typedef struct gpio_port {
type gpio (line 51) | struct gpio {
FILE: firmware/common/hackrf_core.c
type gpio (line 53) | struct gpio
type gpio (line 67) | struct gpio
type gpio (line 69) | struct gpio
type gpio (line 70) | struct gpio
type gpio (line 75) | struct gpio
type gpio (line 77) | struct gpio
type gpio (line 82) | struct gpio
type gpio (line 84) | struct gpio
type gpio (line 97) | struct gpio
type gpio (line 100) | struct gpio
type gpio (line 103) | struct gpio
type gpio (line 106) | struct gpio
type gpio (line 107) | struct gpio
type gpio (line 108) | struct gpio
type gpio (line 112) | struct gpio
type gpio (line 113) | struct gpio
type gpio (line 114) | struct gpio
type gpio (line 115) | struct gpio
type gpio (line 116) | struct gpio
type gpio (line 117) | struct gpio
type gpio (line 118) | struct gpio
type gpio (line 119) | struct gpio
type gpio (line 120) | struct gpio
type gpio (line 121) | struct gpio
type gpio (line 122) | struct gpio
type gpio (line 123) | struct gpio
type gpio (line 124) | struct gpio
type gpio (line 127) | struct gpio
type gpio (line 128) | struct gpio
type gpio (line 129) | struct gpio
type gpio (line 130) | struct gpio
type gpio (line 131) | struct gpio
type gpio (line 132) | struct gpio
type gpio (line 133) | struct gpio
type gpio (line 134) | struct gpio
type gpio (line 135) | struct gpio
type gpio (line 136) | struct gpio
type gpio (line 137) | struct gpio
type gpio (line 140) | struct gpio
type gpio (line 141) | struct gpio
type gpio (line 142) | struct gpio
type gpio (line 143) | struct gpio
type gpio (line 144) | struct gpio
type gpio (line 145) | struct gpio
type gpio (line 149) | struct gpio
type gpio (line 151) | struct gpio
type gpio (line 152) | struct gpio
type gpio (line 153) | struct gpio
type gpio (line 155) | struct gpio
type gpio (line 157) | struct gpio
type gpio (line 158) | struct gpio
type gpio (line 160) | struct gpio
type gpio (line 161) | struct gpio
type gpio (line 166) | struct gpio
type gpio (line 167) | struct gpio
type gpio (line 172) | struct gpio
type gpio (line 174) | struct gpio
type gpio (line 178) | struct gpio
type gpio (line 179) | struct gpio
type gpio (line 180) | struct gpio
type gpio (line 181) | struct gpio
type gpio (line 185) | struct gpio
type gpio (line 186) | struct gpio
type gpio (line 187) | struct gpio
type gpio (line 188) | struct gpio
type gpio (line 189) | struct gpio
type gpio (line 190) | struct gpio
type gpio (line 191) | struct gpio
type gpio (line 192) | struct gpio
type gpio (line 193) | struct gpio
type gpio (line 194) | struct gpio
function fp_40_24_t (line 411) | fp_40_24_t sample_rate_set(const fp_40_24_t sample_rate, const bool prog...
function cpu_clock_pll1_max_speed (line 543) | static void cpu_clock_pll1_max_speed(void)
function cpu_clock_init (line 609) | void cpu_clock_init(void)
function clock_gen_init (line 750) | void clock_gen_init(void)
function clock_gen_shutdown (line 830) | void clock_gen_shutdown(void)
function clock_source_t (line 838) | clock_source_t activate_best_clock_source(void)
function ssp1_set_mode_max283x (line 876) | void ssp1_set_mode_max283x(void)
function ssp1_set_mode_max5864 (line 881) | void ssp1_set_mode_max5864(void)
function ssp1_set_mode_ice40 (line 887) | void ssp1_set_mode_ice40(void)
function pin_shutdown (line 893) | void pin_shutdown(void)
function pin_setup (line 1031) | void pin_setup(void)
function enable_1v2_power (line 1074) | void enable_1v2_power(void)
function disable_1v2_power (line 1079) | void disable_1v2_power(void)
function enable_3v3aux_power (line 1084) | void enable_3v3aux_power(void)
function disable_3v3aux_power (line 1089) | void disable_3v3aux_power(void)
function enable_1v8_power (line 1094) | void enable_1v8_power(void)
function disable_1v8_power (line 1105) | void disable_1v8_power(void)
function enable_rf_power (line 1118) | void enable_rf_power(void)
function disable_rf_power (line 1134) | void disable_rf_power(void)
function enable_rf_power (line 1145) | void enable_rf_power(void)
function disable_rf_power (line 1153) | void disable_rf_power(void)
function enable_rf_power (line 1160) | void enable_rf_power(void)
function disable_rf_power (line 1168) | void disable_rf_power(void)
function led_on (line 1175) | void led_on(const led_t led)
function led_off (line 1180) | void led_off(const led_t led)
function led_on (line 1185) | void led_on(const led_t led)
function led_off (line 1190) | void led_off(const led_t led)
function led_toggle (line 1196) | void led_toggle(const led_t led)
function set_leds (line 1201) | void set_leds(const uint8_t state)
function trigger_enable (line 1216) | void trigger_enable(const bool enable)
function halt_and_flash (line 1225) | void halt_and_flash(const uint32_t duration)
function p1_ctrl_set (line 1241) | void p1_ctrl_set(const p1_ctrl_signal_t signal)
function p2_ctrl_set (line 1248) | void p2_ctrl_set(const p2_ctrl_signal_t signal)
function clkin_ctrl_set (line 1254) | void clkin_ctrl_set(const clkin_signal_t signal)
function pps_out_set (line 1259) | void pps_out_set(const uint8_t value)
function narrowband_filter_set (line 1264) | void narrowband_filter_set(const uint8_t value)
FILE: firmware/common/hackrf_core.h
type led_t (line 443) | typedef enum {
type p1_ctrl_signal_t (line 460) | typedef enum {
type p2_ctrl_signal_t (line 471) | typedef enum {
type clkin_signal_t (line 477) | typedef enum {
FILE: firmware/common/hackrf_ui.c
function hackrf_ui_init_null (line 34) | void hackrf_ui_init_null(void) { }
function hackrf_ui_deinit_null (line 35) | void hackrf_ui_deinit_null(void) { }
function hackrf_ui_set_frequency_null (line 36) | void hackrf_ui_set_frequency_null(uint64_t frequency) { UNUSED(frequency...
function hackrf_ui_set_sample_rate_null (line 37) | void hackrf_ui_set_sample_rate_null(uint32_t sample_rate) { UNUSED(sampl...
function hackrf_ui_set_direction_null (line 38) | void hackrf_ui_set_direction_null(const rf_path_direction_t direction) {...
function hackrf_ui_set_filter_bw_null (line 39) | void hackrf_ui_set_filter_bw_null(uint32_t bandwidth) { UNUSED(bandwidth...
function hackrf_ui_set_lna_power_null (line 40) | void hackrf_ui_set_lna_power_null(bool lna_on) { UNUSED(lna_on); }
function hackrf_ui_set_bb_lna_gain_null (line 41) | void hackrf_ui_set_bb_lna_gain_null(const uint32_t gain_db) { UNUSED(gai...
function hackrf_ui_set_bb_vga_gain_null (line 42) | void hackrf_ui_set_bb_vga_gain_null(const uint32_t gain_db) { UNUSED(gai...
function hackrf_ui_set_bb_tx_vga_gain_null (line 43) | void hackrf_ui_set_bb_tx_vga_gain_null(const uint32_t gain_db) { UNUSED(...
function hackrf_ui_set_first_if_frequency_null (line 44) | void hackrf_ui_set_first_if_frequency_null(const uint64_t frequency) { U...
function hackrf_ui_set_filter_null (line 45) | void hackrf_ui_set_filter_null(const rf_path_filter_t filter) { UNUSED(f...
function hackrf_ui_set_antenna_bias_null (line 46) | void hackrf_ui_set_antenna_bias_null(bool antenna_bias) { UNUSED(antenna...
function hackrf_ui_set_clock_source_null (line 47) | void hackrf_ui_set_clock_source_null(clock_source_t source) { UNUSED(sou...
function hackrf_ui_set_transceiver_mode_null (line 48) | void hackrf_ui_set_transceiver_mode_null(transceiver_mode_t mode) { UNUS...
function hackrf_ui_operacake_gpio_compatible_null (line 49) | bool hackrf_ui_operacake_gpio_compatible_null(void) { return true; }
function hackrf_ui_t (line 77) | const hackrf_ui_t* hackrf_ui(void)
function hackrf_ui_set_enable (line 99) | void hackrf_ui_set_enable(bool enabled)
FILE: firmware/common/hackrf_ui.h
type hackrf_ui_t (line 46) | typedef struct {
FILE: firmware/common/i2c_bus.c
function i2c_bus_start (line 25) | void i2c_bus_start(i2c_bus_t* const bus, const void* const config)
function i2c_bus_stop (line 30) | void i2c_bus_stop(i2c_bus_t* const bus)
function i2c_bus_transfer (line 35) | void i2c_bus_transfer(
FILE: firmware/common/i2c_bus.h
type i2c_bus_t (line 29) | struct i2c_bus_t
type i2c_bus_t (line 30) | typedef struct i2c_bus_t i2c_bus_t;
type i2c_bus_t (line 32) | struct i2c_bus_t {
FILE: firmware/common/i2c_lpc.c
function i2c_lpc_start (line 29) | void i2c_lpc_start(i2c_bus_t* const bus, const void* const _config)
function i2c_lpc_stop (line 37) | void i2c_lpc_stop(i2c_bus_t* const bus)
function i2c_lpc_transfer (line 43) | void i2c_lpc_transfer(
function i2c_probe (line 75) | bool i2c_probe(i2c_bus_t* const bus, const uint_fast8_t device_address)
FILE: firmware/common/i2c_lpc.h
type i2c_lpc_config_t (line 32) | typedef struct i2c_lpc_config_t {
FILE: firmware/common/ice40_spi.c
function ice40_spi_target_init (line 29) | void ice40_spi_target_init(ice40_spi_driver_t* const drv)
function ice40_spi_read (line 46) | uint8_t ice40_spi_read(ice40_spi_driver_t* const drv, uint8_t r)
function ice40_spi_write (line 53) | void ice40_spi_write(ice40_spi_driver_t* const drv, uint8_t r, uint16_t v)
function spi_ssp1_wait_for_tx_fifo_not_full (line 59) | static void spi_ssp1_wait_for_tx_fifo_not_full(void)
function spi_ssp1_wait_for_rx_fifo_not_empty (line 64) | static void spi_ssp1_wait_for_rx_fifo_not_empty(void)
function spi_ssp1_wait_for_not_busy (line 69) | static void spi_ssp1_wait_for_not_busy(void)
function spi_ssp1_transfer_word (line 74) | static uint32_t spi_ssp1_transfer_word(const uint32_t data)
function ice40_spi_syscfg_program (line 83) | bool ice40_spi_syscfg_program(
FILE: firmware/common/ice40_spi.h
type ice40_spi_driver_t (line 30) | struct ice40_spi_driver_t
type ice40_spi_driver_t (line 31) | typedef struct ice40_spi_driver_t ice40_spi_driver_t;
type ice40_spi_driver_t (line 33) | struct ice40_spi_driver_t {
FILE: firmware/common/locking.h
function load_exclusive (line 41) | static inline uint32_t load_exclusive(volatile uint32_t* addr)
function store_exclusive (line 47) | static inline uint32_t store_exclusive(uint32_t val, volatile uint32_t* ...
FILE: firmware/common/lz4_blk.c
function lz4_blk_decompress (line 29) | int lz4_blk_decompress(const uint8_t* src, uint8_t* dst, size_t length)
FILE: firmware/common/m0_sleep.c
function main (line 23) | int main(void)
FILE: firmware/common/m0_state.c
function m0_set_mode (line 26) | void m0_set_mode(enum m0_mode mode)
FILE: firmware/common/m0_state.h
type m0_state (line 29) | struct m0_state {
type m0_mode (line 42) | enum m0_mode {
type m0_error (line 50) | enum m0_error {
type m0_state (line 60) | struct m0_state
type m0_mode (line 62) | enum m0_mode
FILE: firmware/common/max2831.c
function max2831_init (line 60) | static void max2831_init(max2831_driver_t* const drv)
function max2831_setup (line 76) | void max2831_setup(max2831_driver_t* const drv)
function max2831_write (line 104) | static void max2831_write(max2831_driver_t* const drv, uint8_t r, uint16...
function max2831_reg_read (line 111) | uint16_t max2831_reg_read(max2831_driver_t* const drv, uint8_t r)
function max2831_reg_write (line 116) | void max2831_reg_write(max2831_driver_t* const drv, uint8_t r, uint16_t v)
function max2831_reg_commit (line 123) | static inline void max2831_reg_commit(max2831_driver_t* const drv, uint8...
function max2831_regs_commit (line 128) | void max2831_regs_commit(max2831_driver_t* const drv)
function max2831_set_mode (line 138) | void max2831_set_mode(max2831_driver_t* const drv, const max2831_mode_t ...
function max2831_mode_t (line 156) | max2831_mode_t max2831_mode(max2831_driver_t* const drv)
function max2831_start (line 161) | void max2831_start(max2831_driver_t* const drv)
function max2831_tx (line 195) | void max2831_tx(max2831_driver_t* const drv)
function max2831_rx (line 201) | void max2831_rx(max2831_driver_t* const drv)
function max2831_tx_calibration (line 207) | void max2831_tx_calibration(max2831_driver_t* const drv)
function max2831_rx_calibration (line 213) | void max2831_rx_calibration(max2831_driver_t* const drv)
function max2831_stop (line 219) | void max2831_stop(max2831_driver_t* const drv)
function max2831_set_frequency (line 225) | void max2831_set_frequency(max2831_driver_t* const drv, uint32_t freq)
type max2831_ft_t (line 257) | typedef struct {
type max2831_ft_fine_t (line 262) | typedef struct {
function max2831_set_lpf_bandwidth (line 307) | uint32_t max2831_set_lpf_bandwidth(max2831_driver_t* const drv, const ma...
function max2831_set_lna_gain (line 356) | bool max2831_set_lna_gain(max2831_driver_t* const drv, const uint32_t ga...
function max2831_set_vga_gain (line 380) | bool max2831_set_vga_gain(max2831_driver_t* const drv, const uint32_t ga...
function max2831_set_txvga_gain (line 390) | bool max2831_set_txvga_gain(max2831_driver_t* const drv, const uint32_t ...
function max2831_set_rx_hpf_frequency (line 397) | void max2831_set_rx_hpf_frequency(max2831_driver_t* const drv, const max...
FILE: firmware/common/max2831.h
type max2831_mode_t (line 35) | typedef enum {
type max2831_rx_hpf_freq_t (line 44) | typedef enum {
type max2831_driver_t (line 51) | struct max2831_driver_t
type max2831_driver_t (line 52) | typedef struct max2831_driver_t max2831_driver_t;
type max2831_driver_t (line 54) | struct max2831_driver_t {
FILE: firmware/common/max2831_target.c
function max2831_target_init (line 27) | void max2831_target_init(max2831_driver_t* const drv)
function max2831_target_set_mode (line 54) | void max2831_target_set_mode(max2831_driver_t* const drv, const max2831_...
FILE: firmware/common/max2837.c
function max2837_init (line 83) | static void max2837_init(max2837_driver_t* const drv)
function max2837_setup (line 121) | void max2837_setup(max2837_driver_t* const drv)
function max2837_read (line 150) | static uint16_t max2837_read(max2837_driver_t* const drv, uint8_t r)
function max2837_write (line 157) | static void max2837_write(max2837_driver_t* const drv, uint8_t r, uint16...
function max2837_reg_read (line 163) | uint16_t max2837_reg_read(max2837_driver_t* const drv, uint8_t r)
function max2837_reg_write (line 171) | void max2837_reg_write(max2837_driver_t* const drv, uint8_t r, uint16_t v)
function max2837_reg_commit (line 178) | static inline void max2837_reg_commit(max2837_driver_t* const drv, uint8...
function max2837_regs_commit (line 183) | void max2837_regs_commit(max2837_driver_t* const drv)
function max2837_set_mode (line 193) | void max2837_set_mode(max2837_driver_t* const drv, const max2837_mode_t ...
function max2837_mode_t (line 198) | max2837_mode_t max2837_mode(max2837_driver_t* const drv)
function max2837_start (line 203) | void max2837_start(max2837_driver_t* const drv)
function max2837_tx (line 210) | void max2837_tx(max2837_driver_t* const drv)
function max2837_rx (line 217) | void max2837_rx(max2837_driver_t* const drv)
function max2837_stop (line 224) | void max2837_stop(max2837_driver_t* const drv)
function max2837_set_frequency (line 231) | void max2837_set_frequency(max2837_driver_t* const drv, uint32_t freq)
type max2837_ft_t (line 287) | typedef struct {
function max2837_set_lpf_bandwidth (line 314) | uint32_t max2837_set_lpf_bandwidth(max2837_driver_t* const drv, const ui...
function max2837_set_lna_gain (line 331) | bool max2837_set_lna_gain(max2837_driver_t* const drv, const uint32_t ga...
function max2837_set_vga_gain (line 360) | bool max2837_set_vga_gain(max2837_driver_t* const drv, const uint32_t ga...
function max2837_set_txvga_gain (line 370) | bool max2837_set_txvga_gain(max2837_driver_t* const drv, const uint32_t ...
FILE: firmware/common/max2837.h
type max2837_mode_t (line 37) | typedef enum {
type max2837_driver_t (line 44) | struct max2837_driver_t
type max2837_driver_t (line 45) | typedef struct max2837_driver_t max2837_driver_t;
type max2837_driver_t (line 47) | struct max2837_driver_t {
FILE: firmware/common/max2837_target.c
function max2837_target_init (line 29) | void max2837_target_init(max2837_driver_t* const drv)
function max2837_target_set_mode (line 49) | void max2837_target_set_mode(max2837_driver_t* const drv, const max2837_...
FILE: firmware/common/max2839.c
function max2839_init (line 88) | static void max2839_init(max2839_driver_t* const drv)
function max2839_setup (line 126) | void max2839_setup(max2839_driver_t* const drv)
function max2839_read (line 158) | static uint16_t max2839_read(max2839_driver_t* const drv, uint8_t r)
function max2839_write (line 165) | static void max2839_write(max2839_driver_t* const drv, uint8_t r, uint16...
function max2839_reg_read (line 171) | uint16_t max2839_reg_read(max2839_driver_t* const drv, uint8_t r)
function max2839_reg_write (line 180) | void max2839_reg_write(max2839_driver_t* const drv, uint8_t r, uint16_t v)
function max2839_reg_commit (line 187) | static inline void max2839_reg_commit(max2839_driver_t* const drv, uint8...
function max2839_regs_commit (line 192) | void max2839_regs_commit(max2839_driver_t* const drv)
function max2839_set_mode (line 202) | void max2839_set_mode(max2839_driver_t* const drv, const max2839_mode_t ...
function max2839_mode_t (line 207) | max2839_mode_t max2839_mode(max2839_driver_t* const drv)
function max2839_start (line 212) | void max2839_start(max2839_driver_t* const drv)
function max2839_tx (line 219) | void max2839_tx(max2839_driver_t* const drv)
function max2839_rx (line 228) | void max2839_rx(max2839_driver_t* const drv)
function max2839_stop (line 235) | void max2839_stop(max2839_driver_t* const drv)
function max2839_set_frequency (line 242) | void max2839_set_frequency(max2839_driver_t* const drv, uint32_t freq)
type max2839_ft_t (line 292) | typedef struct {
function max2839_set_lpf_bandwidth (line 319) | uint32_t max2839_set_lpf_bandwidth(max2839_driver_t* const drv, const ui...
function max2839_configure_rx_gain (line 336) | void max2839_configure_rx_gain(max2839_driver_t* const drv)
function max2839_set_lna_gain (line 417) | bool max2839_set_lna_gain(max2839_driver_t* const drv, const uint32_t ga...
function max2839_set_vga_gain (line 427) | bool max2839_set_vga_gain(max2839_driver_t* const drv, const uint32_t ga...
function max2839_set_txvga_gain (line 437) | bool max2839_set_txvga_gain(max2839_driver_t* const drv, const uint32_t ...
FILE: firmware/common/max2839.h
type max2839_mode_t (line 37) | typedef enum {
type max2839_driver_t (line 47) | struct max2839_driver_t
type max2839_driver_t (line 48) | typedef struct max2839_driver_t max2839_driver_t;
type max2839_driver_t (line 50) | struct max2839_driver_t {
FILE: firmware/common/max2839_target.c
function max2839_target_init (line 29) | void max2839_target_init(max2839_driver_t* const drv)
function max2839_target_set_mode (line 53) | void max2839_target_set_mode(max2839_driver_t* const drv, const max2839_...
FILE: firmware/common/max283x.c
type gpio (line 32) | struct gpio
type gpio (line 33) | struct gpio
type gpio (line 34) | struct gpio
type gpio (line 35) | struct gpio
type gpio (line 37) | struct gpio
type gpio (line 38) | struct gpio
type gpio (line 39) | struct gpio
function max283x_setup (line 72) | void max283x_setup(max283x_driver_t* const drv, max283x_variant_t type)
function max283x_num_regs (line 96) | uint16_t max283x_num_regs(max283x_driver_t* const drv)
function max283x_data_regs_max_value (line 118) | uint16_t max283x_data_regs_max_value(max283x_driver_t* const drv)
function max283x_reg_read (line 141) | uint16_t max283x_reg_read(max283x_driver_t* const drv, uint8_t r)
function max283x_reg_write (line 164) | void max283x_reg_write(max283x_driver_t* const drv, uint8_t r, uint16_t v)
function max283x_regs_commit (line 186) | void max283x_regs_commit(max283x_driver_t* const drv)
function max283x_set_mode (line 205) | void max283x_set_mode(max283x_driver_t* const drv, const max283x_mode_t ...
function max283x_mode_t (line 224) | max283x_mode_t max283x_mode(max283x_driver_t* const drv)
function max283x_start (line 245) | void max283x_start(max283x_driver_t* const drv)
function max283x_stop (line 264) | void max283x_stop(max283x_driver_t* const drv)
function max283x_set_frequency (line 285) | void max283x_set_frequency(max283x_driver_t* const drv, uint32_t freq)
function max283x_set_lpf_bandwidth (line 304) | uint32_t max283x_set_lpf_bandwidth(
function max283x_set_lna_gain (line 335) | bool max283x_set_lna_gain(max283x_driver_t* const drv, const uint32_t ga...
function max283x_set_vga_gain (line 356) | bool max283x_set_vga_gain(max283x_driver_t* const drv, const uint32_t ga...
function max283x_set_txvga_gain (line 377) | bool max283x_set_txvga_gain(max283x_driver_t* const drv, const uint32_t ...
function max283x_tx (line 398) | void max283x_tx(max283x_driver_t* const drv)
function max283x_rx (line 417) | void max283x_rx(max283x_driver_t* const drv)
function max283x_set_rx_hpf_frequency (line 436) | void max283x_set_rx_hpf_frequency(
function max283x_tx_calibration (line 463) | void max283x_tx_calibration(max283x_driver_t* const drv)
function max283x_rx_calibration (line 482) | void max283x_rx_calibration(max283x_driver_t* const drv)
FILE: firmware/common/max283x.h
type max283x_mode_t (line 41) | typedef enum {
type max283x_rx_hpf_freq_t (line 51) | typedef enum {
type max283x_variant_t (line 58) | typedef enum {
type max283x_driver_t (line 67) | typedef struct {
FILE: firmware/common/max2871.c
function max2871_setup (line 44) | void max2871_setup(max2871_driver_t* const drv)
function delay_ms (line 136) | static void delay_ms(int ms)
function serial_delay (line 146) | static void serial_delay(void)
function max2871_spi_write (line 159) | static void max2871_spi_write(max2871_driver_t* const drv, uint8_t r, ui...
function max2871_spi_read (line 195) | static uint32_t max2871_spi_read(max2871_driver_t* const drv)
function max2871_write_registers (line 221) | static void max2871_write_registers(max2871_driver_t* const drv)
function max2871_set_frequency (line 230) | uint64_t max2871_set_frequency(max2871_driver_t* const drv, uint16_t mhz)
function max2871_enable (line 255) | void max2871_enable(max2871_driver_t* const drv)
function max2871_disable (line 260) | void max2871_disable(max2871_driver_t* const drv)
FILE: firmware/common/max2871.h
type max2871_driver_t (line 29) | typedef struct {
FILE: firmware/common/max2871_regs.c
function max2871_regs_init (line 27) | void max2871_regs_init(void)
function max2871_get_register (line 37) | uint32_t max2871_get_register(int reg)
function max2871_set_INT (line 42) | void max2871_set_INT(uint32_t v)
function max2871_set_N (line 48) | void max2871_set_N(uint32_t v)
function max2871_set_FRAC (line 54) | void max2871_set_FRAC(uint32_t v)
function max2871_set_CPL (line 60) | void max2871_set_CPL(uint32_t v)
function max2871_set_CPT (line 66) | void max2871_set_CPT(uint32_t v)
function max2871_set_P (line 72) | void max2871_set_P(uint32_t v)
function max2871_set_M (line 78) | void max2871_set_M(uint32_t v)
function max2871_set_LDS (line 84) | void max2871_set_LDS(uint32_t v)
function max2871_set_SDN (line 90) | void max2871_set_SDN(uint32_t v)
function max2871_set_MUX (line 96) | void max2871_set_MUX(uint32_t v)
function max2871_set_DBR (line 104) | void max2871_set_DBR(uint32_t v)
function max2871_set_RDIV2 (line 110) | void max2871_set_RDIV2(uint32_t v)
function max2871_set_R (line 116) | void max2871_set_R(uint32_t v)
function max2871_set_REG4DB (line 122) | void max2871_set_REG4DB(uint32_t v)
function max2871_set_CP (line 128) | void max2871_set_CP(uint32_t v)
function max2871_set_LDF (line 134) | void max2871_set_LDF(uint32_t v)
function max2871_set_LDP (line 140) | void max2871_set_LDP(uint32_t v)
function max2871_set_PDP (line 146) | void max2871_set_PDP(uint32_t v)
function max2871_set_SHDN (line 152) | void max2871_set_SHDN(uint32_t v)
function max2871_set_TRI (line 158) | void max2871_set_TRI(uint32_t v)
function max2871_set_RST (line 164) | void max2871_set_RST(uint32_t v)
function max2871_set_VCO (line 170) | void max2871_set_VCO(uint32_t v)
function max2871_set_VAS_SHDN (line 176) | void max2871_set_VAS_SHDN(uint32_t v)
function max2871_set_VAS_TEMP (line 182) | void max2871_set_VAS_TEMP(uint32_t v)
function max2871_set_CSM (line 188) | void max2871_set_CSM(uint32_t v)
function max2871_set_MUTEDEL (line 194) | void max2871_set_MUTEDEL(uint32_t v)
function max2871_set_CDM (line 200) | void max2871_set_CDM(uint32_t v)
function max2871_set_CDIV (line 206) | void max2871_set_CDIV(uint32_t v)
function max2871_set_SDLDO (line 212) | void max2871_set_SDLDO(uint32_t v)
function max2871_set_SDDIV (line 218) | void max2871_set_SDDIV(uint32_t v)
function max2871_set_SDREF (line 224) | void max2871_set_SDREF(uint32_t v)
function max2871_set_BS (line 230) | void max2871_set_BS(uint32_t v)
function max2871_set_FB (line 238) | void max2871_set_FB(uint32_t v)
function max2871_set_DIVA (line 244) | void max2871_set_DIVA(uint32_t v)
function max2871_set_SDVCO (line 250) | void max2871_set_SDVCO(uint32_t v)
function max2871_set_MTLD (line 256) | void max2871_set_MTLD(uint32_t v)
function max2871_set_BDIV (line 262) | void max2871_set_BDIV(uint32_t v)
function max2871_set_RFB_EN (line 268) | void max2871_set_RFB_EN(uint32_t v)
function max2871_set_BPWR (line 274) | void max2871_set_BPWR(uint32_t v)
function max2871_set_RFA_EN (line 280) | void max2871_set_RFA_EN(uint32_t v)
function max2871_set_APWR (line 286) | void max2871_set_APWR(uint32_t v)
function max2871_set_SDPLL (line 292) | void max2871_set_SDPLL(uint32_t v)
function max2871_set_F01 (line 298) | void max2871_set_F01(uint32_t v)
function max2871_set_LD (line 304) | void max2871_set_LD(uint32_t v)
function max2871_set_ADCS (line 310) | void max2871_set_ADCS(uint32_t v)
function max2871_set_ADCM (line 316) | void max2871_set_ADCM(uint32_t v)
FILE: firmware/common/max5864.c
function max5864_write (line 27) | static void max5864_write(max5864_driver_t* const drv, uint8_t value)
function max5864_init (line 32) | static void max5864_init(max5864_driver_t* const drv)
function max5864_setup (line 37) | void max5864_setup(max5864_driver_t* const drv)
function max5864_shutdown (line 48) | void max5864_shutdown(max5864_driver_t* const drv)
function max5864_standby (line 59) | void max5864_standby(max5864_driver_t* const drv)
function max5864_idle (line 70) | void max5864_idle(max5864_driver_t* const drv)
function max5864_rx (line 81) | void max5864_rx(max5864_driver_t* const drv)
function max5864_tx (line 92) | void max5864_tx(max5864_driver_t* const drv)
function max5864_xcvr (line 103) | void max5864_xcvr(max5864_driver_t* const drv)
FILE: firmware/common/max5864.h
type max5864_driver_t (line 28) | struct max5864_driver_t
type max5864_driver_t (line 29) | typedef struct max5864_driver_t max5864_driver_t;
type max5864_driver_t (line 31) | struct max5864_driver_t {
FILE: firmware/common/max5864_target.c
function max5864_target_init (line 28) | void max5864_target_init(max5864_driver_t* const drv)
FILE: firmware/common/mixer.c
type gpio (line 31) | struct gpio
type gpio (line 32) | struct gpio
type gpio (line 33) | struct gpio
type gpio (line 34) | struct gpio
type gpio (line 37) | struct gpio
type gpio (line 38) | struct gpio
type gpio (line 39) | struct gpio
type gpio (line 40) | struct gpio
type gpio (line 41) | struct gpio
type gpio (line 42) | struct gpio
type gpio (line 45) | struct gpio
type gpio (line 46) | struct gpio
type gpio (line 47) | struct gpio
type gpio (line 48) | struct gpio
type gpio (line 49) | struct gpio
function mixer_bus_setup (line 87) | void mixer_bus_setup(mixer_driver_t* const mixer)
function mixer_setup (line 98) | void mixer_setup(mixer_driver_t* const mixer)
function mixer_set_frequency (line 108) | uint64_t mixer_set_frequency(mixer_driver_t* const mixer, uint64_t hz)
function mixer_enable (line 118) | void mixer_enable(mixer_driver_t* const mixer)
function mixer_disable (line 128) | void mixer_disable(mixer_driver_t* const mixer)
function mixer_set_gpo (line 138) | void mixer_set_gpo(mixer_driver_t* const mixer, uint8_t gpo)
FILE: firmware/common/mixer.h
type rffc5071_driver_t (line 28) | typedef rffc5071_driver_t mixer_driver_t;
type max2871_driver_t (line 33) | typedef max2871_driver_t mixer_driver_t;
FILE: firmware/common/operacake.c
type operacake_switching_mode (line 83) | enum operacake_switching_mode {
type operacake_state (line 89) | struct operacake_state {
type operacake_state (line 96) | struct operacake_state
function operacake_read_reg (line 100) | uint8_t operacake_read_reg(i2c_bus_t* const bus, uint8_t address, uint8_...
function operacake_write_reg (line 112) | void operacake_write_reg(i2c_bus_t* const bus, uint8_t address, uint8_t ...
function operacake_init (line 121) | uint8_t operacake_init(bool allow_gpio)
function operacake_is_board_present (line 149) | bool operacake_is_board_present(uint8_t address)
function operacake_get_boards (line 158) | void operacake_get_boards(uint8_t* addresses)
function port_to_pins (line 171) | uint8_t port_to_pins(uint8_t port)
function operacake_activate_ports (line 198) | uint8_t operacake_activate_ports(uint8_t address, uint8_t PA, uint8_t PB)
function operacake_set_mode (line 225) | bool operacake_set_mode(uint8_t address, uint8_t mode)
function operacake_get_mode (line 272) | uint8_t operacake_get_mode(uint8_t address)
function operacake_set_ports (line 284) | uint8_t operacake_set_ports(uint8_t address, uint8_t PA, uint8_t PB)
type operacake_range (line 311) | typedef struct {
function operacake_add_range (line 321) | uint8_t operacake_add_range(uint16_t freq_min, uint16_t freq_max, uint8_...
function operacake_clear_ranges (line 336) | void operacake_clear_ranges(void)
function operacake_set_range (line 343) | uint8_t operacake_set_range(uint32_t freq_mhz)
function gpio_test (line 382) | uint16_t gpio_test(uint8_t address)
FILE: firmware/common/operacake_sctimer.c
function operacake_sctimer_init (line 59) | void operacake_sctimer_init(void)
function operacake_sctimer_port_to_output (line 133) | static uint32_t operacake_sctimer_port_to_output(uint8_t port)
function operacake_sctimer_enable (line 143) | void operacake_sctimer_enable(bool enable)
function operacake_sctimer_set_dwell_times (line 150) | void operacake_sctimer_set_dwell_times(struct operacake_dwell_times* tim...
function operacake_sctimer_stop (line 220) | void operacake_sctimer_stop(void)
function operacake_sctimer_reset_state (line 232) | void operacake_sctimer_reset_state(void)
FILE: firmware/common/operacake_sctimer.h
type operacake_dwell_times (line 30) | struct operacake_dwell_times {
type operacake_dwell_times (line 37) | struct operacake_dwell_times
FILE: firmware/common/platform_detect.c
type gpio (line 34) | struct gpio
type gpio (line 35) | struct gpio
type gpio (line 36) | struct gpio
type gpio (line 37) | struct gpio
type gpio (line 64) | struct gpio
type gpio (line 65) | struct gpio
type gpio (line 66) | struct gpio
function check_pin_strap (line 81) | uint32_t check_pin_strap(uint8_t pin)
function detect_hardware_platform (line 178) | void detect_hardware_platform(void)
function board_id_t (line 301) | board_id_t detected_platform(void)
function board_rev_t (line 306) | board_rev_t detected_revision(void)
function supported_platform (line 311) | uint32_t supported_platform(void)
FILE: firmware/common/platform_detect.h
type board_id_t (line 35) | typedef enum {
type board_rev_t (line 46) | typedef enum {
FILE: firmware/common/portapack.c
function portapack_sleep_milliseconds (line 31) | static void portapack_sleep_milliseconds(const uint32_t milliseconds)
type gpio (line 38) | struct gpio
type gpio (line 39) | struct gpio
type gpio (line 41) | struct gpio
type gpio (line 43) | struct gpio
type gpio (line 44) | struct gpio
type gpio (line 45) | struct gpio
type gpio (line 46) | struct gpio
type portapack_if_t (line 50) | typedef struct portapack_if_t {
function portapack_data_mask_set (line 74) | static void portapack_data_mask_set(void)
function portapack_data_write_low (line 79) | static void portapack_data_write_low(const uint32_t value)
function portapack_data_write_high (line 84) | static void portapack_data_write_high(const uint32_t value)
function portapack_dir_read (line 91) | static void portapack_dir_read(void)
function portapack_dir_write (line 97) | static void portapack_dir_write(void)
function portapack_lcd_rd_assert (line 109) | __attribute__((unused)) static void portapack_lcd_rd_assert(void)
function portapack_lcd_rd_deassert (line 114) | static void portapack_lcd_rd_deassert(void)
function portapack_lcd_wr_assert (line 119) | static void portapack_lcd_wr_assert(void)
function portapack_lcd_wr_deassert (line 124) | static void portapack_lcd_wr_deassert(void)
function portapack_io_stb_assert (line 129) | static void portapack_io_stb_assert(void)
function portapack_io_stb_deassert (line 134) | static void portapack_io_stb_deassert(void)
function portapack_addr (line 139) | static void portapack_addr(const bool value)
function portapack_lcd_command (line 144) | static void portapack_lcd_command(const uint32_t value)
function portapack_lcd_write_data (line 163) | static void portapack_lcd_write_data(const uint32_t value)
function portapack_io_write (line 177) | static void portapack_io_write(const bool address, const uint_fast16_t v...
function portapack_if_init (line 192) | static void portapack_if_init(void)
function portapack_lcd_reset_state (line 229) | static void portapack_lcd_reset_state(const bool active)
function portapack_lcd_data_write_command_and_data (line 235) | static void portapack_lcd_data_write_command_and_data(
function portapack_lcd_sleep_out (line 246) | static void portapack_lcd_sleep_out(void)
function portapack_lcd_display_on (line 256) | static void portapack_lcd_display_on(void)
function portapack_lcd_ramwr_start (line 262) | static void portapack_lcd_ramwr_start(void)
function portapack_lcd_set (line 268) | static void portapack_lcd_set(
function portapack_lcd_caset (line 277) | static void portapack_lcd_caset(
function portapack_lcd_paset (line 284) | static void portapack_lcd_paset(
function portapack_lcd_start_ram_write (line 291) | static void portapack_lcd_start_ram_write(const ui_rect_t rect)
function portapack_lcd_write_pixel (line 298) | static void portapack_lcd_write_pixel(const ui_color_t pixel)
function portapack_lcd_write_pixels_color (line 303) | static void portapack_lcd_write_pixels_color(const ui_color_t c, size_t n)
function portapack_lcd_wake (line 310) | static void portapack_lcd_wake(void)
function portapack_lcd_reset (line 316) | static void portapack_lcd_reset(void)
function portapack_lcd_init (line 326) | static void portapack_lcd_init(void)
function portapack_backlight (line 484) | void portapack_backlight(const bool on)
function portapack_reference_oscillator (line 490) | void portapack_reference_oscillator(const bool on)
function portapack_fill_rectangle (line 497) | void portapack_fill_rectangle(const ui_rect_t rect, const ui_color_t color)
function portapack_clear_display (line 503) | void portapack_clear_display(const ui_color_t color)
function portapack_draw_bitmap (line 509) | void portapack_draw_bitmap(
function ui_bitmap_t (line 526) | ui_bitmap_t portapack_font_glyph(const ui_font_t* const font, const char c)
function jtag_pp_tck (line 545) | static bool jtag_pp_tck(const bool tms_value)
function jtag_pp_shift (line 579) | static uint32_t jtag_pp_shift(const uint32_t tms_bits, const size_t count)
function jtag_pp_idcode (line 595) | static uint32_t jtag_pp_idcode(void)
function portapack_detect (line 616) | static bool portapack_detect(void)
function portapack_t (line 629) | const portapack_t* portapack(void)
function portapack_init (line 634) | void portapack_init(void)
FILE: firmware/common/portapack.h
type ui_color_t (line 32) | typedef struct ui_color_t {
type ui_point_t (line 36) | typedef struct ui_point_t {
type ui_size_t (line 41) | typedef struct ui_size_t {
type ui_rect_t (line 46) | typedef struct ui_rect_t {
type ui_bitmap_t (line 51) | typedef struct ui_bitmap_t {
type ui_font_t (line 56) | typedef struct ui_font_t {
type portapack_t (line 64) | typedef struct portapack_t {
FILE: firmware/common/rad1o/decoder.c
function gnn (line 15) | static uint8_t gnn(void)
function upl (line 32) | static int upl(int off)
FILE: firmware/common/rad1o/display.c
function delayms (line 14) | static void delayms(const uint32_t milliseconds)
type gpio (line 20) | struct gpio
type gpio (line 21) | struct gpio
type gpio (line 22) | struct gpio
function select (line 34) | static void select(void)
function deselect (line 62) | static void deselect(void)
function write (line 67) | static void write(uint8_t cd, uint8_t data)
function rad1o_lcdInit (line 77) | void rad1o_lcdInit(void)
function rad1o_lcdDeInit (line 133) | void rad1o_lcdDeInit(void)
function rad1o_lcdFill (line 140) | void rad1o_lcdFill(uint8_t f)
function rad1o_lcdSetPixel (line 145) | void rad1o_lcdSetPixel(uint8_t x, uint8_t y, uint8_t f)
function getPixel (line 152) | static uint8_t getPixel(uint8_t x, uint8_t y)
function rad1o_lcdDisplay (line 162) | void rad1o_lcdDisplay(void)
function rotate (line 182) | static void rotate(void)
FILE: firmware/common/rad1o/draw.c
function rad1o_drawHLine (line 12) | void rad1o_drawHLine(uint8_t y, uint8_t x1, uint8_t x2, uint8_t color)
function rad1o_drawVLine (line 22) | void rad1o_drawVLine(uint8_t x, uint8_t y1, uint8_t y2, uint8_t color)
FILE: firmware/common/rad1o/fonts.h
type FONT_CHAR_INFO (line 9) | typedef struct {
type FONT_DEF (line 13) | struct FONT_DEF {
type EXTFONT (line 23) | struct EXTFONT {
type FONT_DEF (line 29) | struct FONT_DEF
FILE: firmware/common/rad1o/print.c
function rad1o_lcdPrint (line 10) | void rad1o_lcdPrint(const char* string)
function rad1o_lcdNl (line 15) | void rad1o_lcdNl(void)
function rad1o_lcdClear (line 21) | void rad1o_lcdClear(void)
function rad1o_lcdMoveCrsr (line 28) | void rad1o_lcdMoveCrsr(int32_t dx, int32_t dy)
function rad1o_lcdSetCrsr (line 34) | void rad1o_lcdSetCrsr(int32_t dx, int32_t dy)
function rad1o_setSystemFont (line 40) | void rad1o_setSystemFont(void)
FILE: firmware/common/rad1o/render.c
type FONT_DEF (line 10) | struct FONT_DEF
type EXTFONT (line 12) | struct EXTFONT
function rad1o_setTextColor (line 18) | void rad1o_setTextColor(uint8_t bg, uint8_t fg)
function rad1o_setIntFont (line 24) | void rad1o_setIntFont(const struct FONT_DEF* newfont)
function rad1o_getFontHeight (line 31) | int rad1o_getFontHeight(void)
function _getIndex (line 38) | static int _getIndex(int c)
function rad1o_DoChar (line 62) | int rad1o_DoChar(int sx, int sy, int c)
function rad1o_DoString (line 153) | int rad1o_DoString(int sx, int sy, const char* s)
FILE: firmware/common/rad1o/render.h
type FONT_DEF (line 7) | struct FONT_DEF
FILE: firmware/common/rad1o/smallfonts.c
type FONT_DEF (line 144) | struct FONT_DEF
FILE: firmware/common/rad1o/smallfonts.h
type FONT_DEF (line 49) | struct FONT_DEF
FILE: firmware/common/rad1o/ubuntu18.c
type FONT_DEF (line 3405) | struct FONT_DEF
FILE: firmware/common/rad1o/ubuntu18.h
type FONT_DEF (line 5) | struct FONT_DEF
FILE: firmware/common/radio.c
function radio_init (line 36) | void radio_init(radio_t* const radio)
function mark_dirty (line 51) | static inline void mark_dirty(radio_t* const radio, radio_register_t reg)
function radio_error_t (line 56) | radio_error_t radio_reg_write(
function radio_reg_read (line 89) | uint64_t radio_reg_read(
function radio_update_direction (line 97) | static bool radio_update_direction(radio_t* const radio, uint64_t* bank)
function compute_resample_log (line 125) | static inline uint8_t compute_resample_log(
function radio_update_sample_rate (line 153) | static bool radio_update_sample_rate(radio_t* const radio, uint64_t* bank)
function tune_config_t (line 243) | static const tune_config_t* select_tune_config(uint64_t opmode)
function radio_update_frequency (line 257) | static bool radio_update_frequency(radio_t* const radio, uint64_t* bank)
function auto_bandwidth (line 363) | static uint32_t auto_bandwidth(radio_t* const radio)
function radio_update_bandwidth (line 388) | static bool radio_update_bandwidth(radio_t* const radio, uint64_t* bank)
function radio_update_gain (line 461) | static bool radio_update_gain(radio_t* const radio, uint64_t* bank)
function radio_update_bias_tee (line 547) | static bool radio_update_bias_tee(radio_t* const radio, uint64_t* bank)
function radio_update_trigger (line 569) | static bool radio_update_trigger(radio_t* const radio, uint64_t* bank)
function radio_update_dc_block (line 587) | static bool radio_update_dc_block(radio_t* const radio, uint64_t* bank)
function radio_update (line 611) | bool radio_update(radio_t* const radio)
function radio_switch_opmode (line 676) | void radio_switch_opmode(radio_t* const radio, const transceiver_mode_t ...
FILE: firmware/common/radio.h
type radio_error_t (line 32) | typedef enum {
type radio_config_mode_t (line 43) | typedef enum {
type radio_sample_rate_t (line 51) | typedef struct {
type clock_source_t (line 58) | typedef enum {
type transceiver_mode_t (line 64) | typedef enum {
type radio_register_t (line 78) | typedef enum {
type radio_register_bank_t (line 199) | typedef enum {
type fp_40_24_t (line 217) | typedef fp_40_24_t (*sample_rate_fn)(const fp_40_24_t sample_rate, const...
type radio_t (line 219) | typedef struct radio_t {
FILE: firmware/common/rf_path.c
type gpio (line 101) | struct gpio
function switchctrl_set_hackrf_one (line 103) | static void switchctrl_set_hackrf_one(rf_path_t* const rf_path, uint8_t ...
function switchctrl_set_praline (line 195) | static void switchctrl_set_praline(rf_path_t* const rf_path, uint8_t ctrl)
function switchctrl_set_rad1o (line 236) | static void switchctrl_set_rad1o(rf_path_t* const rf_path, uint8_t ctrl)
function switchctrl_set (line 300) | static void switchctrl_set(rf_path_t* const rf_path, const uint8_t gpo)
function rf_path_pin_setup (line 316) | void rf_path_pin_setup(rf_path_t* const rf_path)
function rf_path_init (line 437) | void rf_path_init(rf_path_t* const rf_path)
function rf_path_set_direction (line 462) | void rf_path_set_direction(rf_path_t* const rf_path, const rf_path_direc...
function rf_path_set_filter (line 540) | void rf_path_set_filter(rf_path_t* const rf_path, const rf_path_filter_t...
function rf_path_set_lna (line 566) | void rf_path_set_lna(rf_path_t* const rf_path, const uint_fast8_t enable)
function rf_path_set_antenna (line 592) | void rf_path_set_antenna(rf_path_t* const rf_path, const uint_fast8_t en...
FILE: firmware/common/rf_path.h
type rf_path_direction_t (line 31) | typedef enum {
type rf_path_filter_t (line 41) | typedef enum {
type rf_path_t (line 47) | typedef struct rf_path_t {
FILE: firmware/common/rffc5071.c
function rffc5071_init (line 82) | void rffc5071_init(rffc5071_driver_t* const drv)
function rffc5071_setup (line 100) | void rffc5071_setup(rffc5071_driver_t* const drv)
function rffc5071_lock_test (line 144) | void rffc5071_lock_test(rffc5071_driver_t* const drv)
function rffc5071_check_lock (line 171) | bool rffc5071_check_lock(rffc5071_driver_t* const drv)
function rffc5071_spi_read (line 182) | static uint16_t rffc5071_spi_read(rffc5071_driver_t* const drv, uint8_t r)
function rffc5071_spi_write (line 191) | static void rffc5071_spi_write(rffc5071_driver_t* const drv, uint8_t r, ...
function rffc5071_reg_read (line 199) | uint16_t rffc5071_reg_read(rffc5071_driver_t* const drv, uint8_t r)
function rffc5071_reg_write (line 214) | void rffc5071_reg_write(rffc5071_driver_t* const drv, uint8_t r, uint16_...
function rffc5071_reg_commit (line 221) | static inline void rffc5071_reg_commit(rffc5071_driver_t* const drv, uin...
function rffc5071_regs_commit (line 226) | void rffc5071_regs_commit(rffc5071_driver_t* const drv)
function rffc5071_disable (line 236) | void rffc5071_disable(rffc5071_driver_t* const drv)
function rffc5071_enable (line 245) | void rffc5071_enable(rffc5071_driver_t* const drv)
function rffc5071_config_synth (line 259) | uint64_t rffc5071_config_synth(rffc5071_driver_t* const drv, uint64_t lo)
function rffc5071_set_frequency (line 319) | uint64_t rffc5071_set_frequency(rffc5071_driver_t* const drv, uint64_t hz)
function rffc5071_set_gpo (line 332) | void rffc5071_set_gpo(rffc5071_driver_t* const drv, uint8_t gpo)
function rffc5071_poll_ld (line 342) | bool rffc5071_poll_ld(rffc5071_driver_t* const drv, uint8_t* prelock_state)
FILE: firmware/common/rffc5071.h
type rffc5071_driver_t (line 34) | typedef struct {
FILE: firmware/common/rffc5071_spi.c
function rffc5071_spi_target_select (line 28) | static void rffc5071_spi_target_select(spi_bus_t* const bus)
function rffc5071_spi_target_unselect (line 34) | static void rffc5071_spi_target_unselect(spi_bus_t* const bus)
function rffc5071_spi_direction_out (line 40) | static void rffc5071_spi_direction_out(spi_bus_t* const bus)
function rffc5071_spi_direction_in (line 46) | static void rffc5071_spi_direction_in(spi_bus_t* const bus)
function rffc5071_spi_data_out (line 52) | static void rffc5071_spi_data_out(spi_bus_t* const bus, const bool bit)
function rffc5071_spi_data_in (line 58) | static bool rffc5071_spi_data_in(spi_bus_t* const bus)
function rffc5071_spi_bus_init (line 64) | static void rffc5071_spi_bus_init(spi_bus_t* const bus)
function rffc5071_spi_target_init (line 78) | static void rffc5071_spi_target_init(spi_bus_t* const bus)
function rffc5071_spi_start (line 93) | void rffc5071_spi_start(spi_bus_t* const bus, const void* const config)
function rffc5071_spi_stop (line 100) | void rffc5071_spi_stop(spi_bus_t* const bus)
function rffc5071_spi_serial_delay (line 105) | static void rffc5071_spi_serial_delay(spi_bus_t* const bus)
function rffc5071_spi_sck (line 111) | static void rffc5071_spi_sck(spi_bus_t* const bus)
function rffc5071_spi_exchange_bit (line 122) | static uint32_t rffc5071_spi_exchange_bit(spi_bus_t* const bus, const ui...
function rffc5071_spi_exchange_word (line 129) | static uint32_t rffc5071_spi_exchange_word(
function rffc5071_spi_transfer (line 161) | void rffc5071_spi_transfer(spi_bus_t* const bus, void* const _data, cons...
function rffc5071_spi_transfer_gather (line 198) | void rffc5071_spi_transfer_gather(
FILE: firmware/common/rffc5071_spi.h
type rffc5071_spi_config_t (line 30) | typedef struct rffc5071_spi_config_t {
FILE: firmware/common/rom_iap.c
function iap_is_implemented (line 56) | bool iap_is_implemented(void)
function isp_iap_ret_code_t (line 67) | isp_iap_ret_code_t iap_cmd_call(iap_cmd_res_t* iap_cmd_res)
FILE: firmware/common/rom_iap.h
type iap_cmd_code_t (line 29) | typedef enum {
type isp_iap_ret_code_t (line 69) | typedef enum
type iap_cmd_res_t (line 103) | typedef struct {
FILE: firmware/common/selftest.h
type test_result_t (line 37) | typedef uint8_t test_result_t;
type selftest_t (line 39) | typedef struct {
FILE: firmware/common/sgpio.c
function sgpio_configure_pin_functions (line 35) | void sgpio_configure_pin_functions(sgpio_config_t* const config)
function sgpio_set_slice_mode (line 72) | void sgpio_set_slice_mode(sgpio_config_t* const config, const bool multi...
function sgpio_configure (line 108) | void sgpio_configure(sgpio_config_t* const config, const sgpio_direction...
function sgpio_cpld_stream_enable (line 275) | void sgpio_cpld_stream_enable(sgpio_config_t* const config)
function sgpio_cpld_stream_disable (line 282) | void sgpio_cpld_stream_disable(sgpio_config_t* const config)
function sgpio_cpld_stream_is_enabled (line 289) | bool sgpio_cpld_stream_is_enabled(sgpio_config_t* const config)
function update_q_invert (line 312) | static void update_q_invert(sgpio_config_t* const config)
function sgpio_cpld_set_mixer_invert (line 334) | void sgpio_cpld_set_mixer_invert(sgpio_config_t* const config, const uin...
FILE: firmware/common/sgpio.h
type sgpio_direction_t (line 33) | typedef enum {
type sgpio_config_t (line 38) | typedef struct sgpio_config_t {
FILE: firmware/common/si5351c.c
type gpio (line 33) | struct gpio
type gpio (line 34) | struct gpio
type gpio (line 35) | struct gpio
type pll_sources (line 40) | enum pll_sources
function si5351c_write_single (line 45) | void si5351c_write_single(si5351c_driver_t* const drv, uint8_t reg, uint...
function si5351c_read_single (line 52) | uint8_t si5351c_read_single(si5351c_driver_t* const drv, uint8_t reg)
function si5351c_write (line 64) | void si5351c_write(
function si5351c_disable_all_outputs (line 73) | void si5351c_disable_all_outputs(si5351c_driver_t* const drv)
function si5351c_disable_oeb_pin_control (line 80) | void si5351c_disable_oeb_pin_control(si5351c_driver_t* const drv)
function si5351c_power_down_all_clocks (line 87) | void si5351c_power_down_all_clocks(si5351c_driver_t* const drv)
function si5351c_set_crystal_configuration (line 107) | void si5351c_set_crystal_configuration(si5351c_driver_t* const drv)
function si5351c_enable_xo_and_ms_fanout (line 117) | void si5351c_enable_xo_and_ms_fanout(si5351c_driver_t* const drv)
function si5351c_configure_pll_sources (line 129) | void si5351c_configure_pll_sources(si5351c_driver_t* const drv)
function si5351c_configure_pll_multisynth (line 137) | void si5351c_configure_pll_multisynth(si5351c_driver_t* const drv)
function si5351c_reset_pll (line 149) | void si5351c_reset_pll(si5351c_driver_t* const drv)
function si5351c_configure_multisynth (line 156) | void si5351c_configure_multisynth(
function si5351c_configure_clock_control (line 190) | void si5351c_configure_clock_control(
function si5351c_enable_clock_outputs (line 284) | void si5351c_enable_clock_outputs(si5351c_driver_t* const drv)
function si5351c_set_int_mode (line 323) | void si5351c_set_int_mode(
function si5351c_set_clock_source (line 344) | void si5351c_set_clock_source(si5351c_driver_t* const drv, const enum pl...
function si5351c_clkin_signal_valid (line 363) | bool si5351c_clkin_signal_valid(si5351c_driver_t* const drv)
function si5351c_clkout_enable (line 373) | void si5351c_clkout_enable(si5351c_driver_t* const drv, uint8_t enable)
function si5351c_init (line 390) | void si5351c_init(si5351c_driver_t* const drv)
FILE: firmware/common/si5351c.h
type pll_sources (line 62) | enum pll_sources {
type si5351c_driver_t (line 68) | typedef struct {
type pll_sources (line 90) | enum pll_sources
type pll_sources (line 96) | enum pll_sources
FILE: firmware/common/spi_bus.c
function spi_bus_start (line 25) | void spi_bus_start(spi_bus_t* const bus, const void* const config)
function spi_bus_stop (line 30) | void spi_bus_stop(spi_bus_t* const bus)
function spi_bus_transfer (line 35) | void spi_bus_transfer(spi_bus_t* const bus, void* const data, const size...
function spi_bus_transfer_gather (line 40) | void spi_bus_transfer_gather(
FILE: firmware/common/spi_bus.h
type spi_transfer_t (line 28) | typedef struct {
type spi_bus_t (line 33) | struct spi_bus_t
type spi_bus_t (line 34) | typedef struct spi_bus_t spi_bus_t;
type spi_bus_t (line 36) | struct spi_bus_t {
FILE: firmware/common/spi_ssp.c
function spi_ssp_start (line 28) | void spi_ssp_start(spi_bus_t* const bus, const void* const _config)
function spi_ssp_stop (line 50) | void spi_ssp_stop(spi_bus_t* const bus)
function spi_ssp_wait_for_tx_fifo_not_full (line 55) | static void spi_ssp_wait_for_tx_fifo_not_full(spi_bus_t* const bus)
function spi_ssp_wait_for_rx_fifo_not_empty (line 60) | static void spi_ssp_wait_for_rx_fifo_not_empty(spi_bus_t* const bus)
function spi_ssp_wait_for_not_busy (line 65) | static void spi_ssp_wait_for_not_busy(spi_bus_t* const bus)
function spi_ssp_transfer_word (line 70) | static uint32_t spi_ssp_transfer_word(spi_bus_t* const bus, const uint32...
function spi_ssp_transfer_gather (line 79) | void spi_ssp_transfer_gather(
function spi_ssp_transfer (line 107) | void spi_ssp_transfer(spi_bus_t* const bus, void* const data, const size...
FILE: firmware/common/spi_ssp.h
type ssp_config_t (line 35) | typedef struct ssp_config_t {
FILE: firmware/common/streaming.c
function baseband_streaming_enable (line 29) | void baseband_streaming_enable(sgpio_config_t* const sgpio_config)
function baseband_streaming_disable (line 36) | void baseband_streaming_disable(sgpio_config_t* const sgpio_config)
FILE: firmware/common/tune_config.h
type tune_config_t (line 28) | typedef struct {
FILE: firmware/common/tuning.c
function set_freq (line 76) | bool set_freq(const uint64_t freq)
function tuning_set_frequency (line 143) | bool tuning_set_frequency(
function set_freq_explicit (line 203) | bool set_freq_explicit(
FILE: firmware/common/ui_portapack.c
function ui_color_t (line 339) | __attribute__((unused)) static ui_color_t portapack_color_rgb(
function ui_point_t (line 352) | static ui_point_t portapack_lcd_draw_int(
function ui_point_t (line 378) | static ui_point_t portapack_lcd_draw_string(ui_point_t point, const char...
type draw_list_t (line 390) | typedef struct draw_list_t {
type radio_draw_list_item_t (line 416) | typedef enum {
function ui_point_t (line 429) | static ui_point_t portapack_ui_label_point(const radio_draw_list_item_t ...
function ui_point_t (line 436) | static ui_point_t portapack_ui_draw_string(
function ui_point_t (line 443) | static ui_point_t portapack_ui_draw_db(
function ui_point_t (line 452) | static ui_point_t portapack_ui_draw_bw_mhz(
function portapack_draw_radio_path_item (line 470) | static void portapack_draw_radio_path_item(const radio_draw_list_item_t ...
function portapack_radio_path_item_update (line 479) | static void portapack_radio_path_item_update(
function portapack_radio_path_redraw (line 492) | static void portapack_radio_path_redraw(void)
function portapack_ui_init (line 499) | static void portapack_ui_init(void)
function portapack_ui_deinit (line 506) | static void portapack_ui_deinit(void)
function portapack_ui_set_frequency (line 512) | static void portapack_ui_set_frequency(uint64_t frequency)
function portapack_ui_set_sample_rate (line 555) | static void portapack_ui_set_sample_rate(uint32_t sample_rate)
function portapack_ui_set_direction (line 565) | static void portapack_ui_set_direction(const rf_path_direction_t direction)
function portapack_ui_set_filter_bw (line 610) | static void portapack_ui_set_filter_bw(uint32_t bandwidth)
function portapack_ui_set_lna_power (line 615) | static void portapack_ui_set_lna_power(bool lna_on)
function portapack_ui_set_bb_lna_gain (line 628) | static void portapack_ui_set_bb_lna_gain(const uint32_t gain_db)
function portapack_ui_set_bb_vga_gain (line 633) | static void portapack_ui_set_bb_vga_gain(const uint32_t gain_db)
function portapack_ui_set_bb_tx_vga_gain (line 638) | static void portapack_ui_set_bb_tx_vga_gain(const uint32_t gain_db)
function portapack_ui_set_first_if_frequency (line 647) | static void portapack_ui_set_first_if_frequency(const uint64_t frequency)
function portapack_ui_set_filter (line 652) | static void portapack_ui_set_filter(const rf_path_filter_t filter)
function portapack_ui_set_antenna_bias (line 679) | static void portapack_ui_set_antenna_bias(bool antenna_bias)
function portapack_ui_set_clock_source (line 684) | static void portapack_ui_set_clock_source(clock_source_t source)
function portapack_ui_set_transceiver_mode (line 710) | static void portapack_ui_set_transceiver_mode(transceiver_mode_t mode)
function portapack_ui_operacake_gpio_compatible (line 715) | static bool portapack_ui_operacake_gpio_compatible(void)
function hackrf_ui_t (line 739) | const hackrf_ui_t* portapack_hackrf_ui_init(void)
FILE: firmware/common/ui_rad1o.c
function draw_frequency (line 54) | static void draw_frequency(void)
function draw_tx_rx (line 73) | static void draw_tx_rx(void)
function ui_update (line 105) | static void ui_update(void)
function rad1o_ui_init (line 208) | static void rad1o_ui_init(void)
function rad1o_ui_deinit (line 215) | static void rad1o_ui_deinit(void)
function rad1o_ui_set_frequency (line 223) | static void rad1o_ui_set_frequency(uint64_t frequency)
function rad1o_ui_set_sample_rate (line 233) | static void rad1o_ui_set_sample_rate(uint32_t _sample_rate)
function rad1o_ui_set_direction (line 239) | static void rad1o_ui_set_direction(const rf_path_direction_t _direction)
function rad1o_ui_set_filter_bw (line 245) | static void rad1o_ui_set_filter_bw(uint32_t bandwidth)
function rad1o_ui_set_lna_power (line 251) | static void rad1o_ui_set_lna_power(bool _lna_on)
function rad1o_ui_set_bb_lna_gain (line 257) | static void rad1o_ui_set_bb_lna_gain(const uint32_t gain_db)
function rad1o_ui_set_bb_vga_gain (line 263) | static void rad1o_ui_set_bb_vga_gain(const uint32_t gain_db)
function rad1o_ui_set_bb_tx_vga_gain (line 269) | static void rad1o_ui_set_bb_tx_vga_gain(const uint32_t gain_db)
function rad1o_ui_set_first_if_frequency (line 275) | static void rad1o_ui_set_first_if_frequency(const uint64_t frequency
function rad1o_ui_set_filter (line 281) | static void rad1o_ui_set_filter(const rf_path_filter_t filter __attribut...
function rad1o_ui_set_antenna_bias (line 286) | static void rad1o_ui_set_antenna_bias(bool antenna_bias __attribute__((u...
function rad1o_ui_set_clock_source (line 291) | static void rad1o_ui_set_clock_source(clock_source_t source __attribute_...
function rad1o_ui_set_transceiver_mode (line 296) | static void rad1o_ui_set_transceiver_mode(transceiver_mode_t mode)
function rad1o_ui_operacake_gpio_compatible (line 302) | static bool rad1o_ui_operacake_gpio_compatible(void)
function hackrf_ui_t (line 326) | const hackrf_ui_t* rad1o_ui_setup(void)
FILE: firmware/common/usb.c
function usb_queue_head_t (line 43) | usb_queue_head_t* usb_queue_head(const uint_fast8_t endpoint_address)
function usb_endpoint_t (line 48) | usb_endpoint_t* usb_endpoint_from_address(const uint_fast8_t endpoint_ad...
function uint_fast8_t (line 53) | static uint_fast8_t usb_endpoint_address(
function usb_endpoint_is_in (line 60) | static bool usb_endpoint_is_in(const uint_fast8_t endpoint_address)
function uint_fast8_t (line 65) | static uint_fast8_t usb_endpoint_number(const uint_fast8_t endpoint_addr...
function usb_peripheral_reset (line 70) | void usb_peripheral_reset(void)
function usb_phy_enable (line 78) | void usb_phy_enable(void)
function usb_clear_pending_interrupts (line 83) | static void usb_clear_pending_interrupts(const uint32_t mask)
function usb_clear_all_pending_interrupts (line 92) | static void usb_clear_all_pending_interrupts(void)
function usb_wait_for_endpoint_priming_to_finish (line 97) | static void usb_wait_for_endpoint_priming_to_finish(const uint32_t mask)
function usb_flush_endpoints (line 104) | static void usb_flush_endpoints(const uint32_t mask)
function usb_wait_for_endpoint_flushing_to_finish (line 111) | static void usb_wait_for_endpoint_flushing_to_finish(const uint32_t mask)
function usb_flush_primed_endpoints (line 118) | static void usb_flush_primed_endpoints(const uint32_t mask)
function usb_flush_all_primed_endpoints (line 125) | static void usb_flush_all_primed_endpoints(void)
function usb_endpoint_set_type (line 130) | static void usb_endpoint_set_type(
function usb_endpoint_enable (line 145) | static void usb_endpoint_enable(const usb_endpoint_t* const endpoint)
function usb_endpoint_clear_pending_interrupts (line 157) | static void usb_endpoint_clear_pending_interrupts(const usb_endpoint_t* ...
function usb_endpoint_disable (line 169) | void usb_endpoint_disable(const usb_endpoint_t* const endpoint)
function usb_endpoint_prime (line 182) | void usb_endpoint_prime(
function usb_endpoint_is_priming (line 200) | static bool usb_endpoint_is_priming(const usb_endpoint_t* const endpoint)
function usb_endpoint_schedule_wait (line 212) | void usb_endpoint_schedule_wait(
function usb_endpoint_schedule_append (line 231) | void usb_endpoint_schedule_append(
function usb_endpoint_flush (line 255) | void usb_endpoint_flush(const usb_endpoint_t* const endpoint)
function usb_endpoint_is_ready (line 278) | bool usb_endpoint_is_ready(const usb_endpoint_t* const endpoint)
function usb_endpoint_is_complete (line 288) | bool usb_endpoint_is_complete(const usb_endpoint_t* const endpoint)
function usb_endpoint_stall (line 298) | void usb_endpoint_stall(const usb_endpoint_t* const endpoint)
function usb_endpoint_reset_data_toggle (line 308) | void usb_endpoint_reset_data_toggle(const usb_endpoint_t* const endpoint)
function usb_controller_run (line 318) | static void usb_controller_run(void)
function usb_controller_stop (line 323) | static void usb_controller_stop(void)
function uint_fast8_t (line 328) | static uint_fast8_t usb_controller_is_resetting(void)
function usb_controller_set_device_mode (line 333) | static void usb_controller_set_device_mode(void)
function usb_speed_t (line 343) | usb_speed_t usb_speed(const usb_device_t* const device)
function usb_clear_status (line 364) | static void usb_clear_status(const uint32_t status)
function usb_get_status (line 369) | static uint32_t usb_get_status(void)
function usb_clear_endpoint_setup_status (line 382) | static void usb_clear_endpoint_setup_status(const uint32_t endpoint_setu...
function usb_get_endpoint_setup_status (line 387) | static uint32_t usb_get_endpoint_setup_status(void)
function usb_clear_endpoint_complete (line 392) | static void usb_clear_endpoint_complete(const uint32_t endpoint_complete)
function usb_get_endpoint_complete (line 397) | static uint32_t usb_get_endpoint_complete(void)
function usb_disable_all_endpoints (line 402) | static void usb_disable_all_endpoints(void)
function usb_set_address_immediate (line 413) | void usb_set_address_immediate(
function usb_set_address_deferred (line 422) | void usb_set_address_deferred(const usb_device_t* const device, const ui...
function usb_reset_all_endpoints (line 430) | static void usb_reset_all_endpoints(void)
function usb_controller_reset (line 437) | static void usb_controller_reset(void)
function usb_bus_reset (line 453) | static void usb_bus_reset(usb_device_t* const device)
function usb_interrupt_enable (line 472) | static void usb_interrupt_enable(usb_device_t* const device)
function usb_device_init (line 479) | void usb_device_init(const uint_fast8_t device_ordinal, usb_device_t* co...
function usb_run (line 505) | void usb_run(usb_device_t* const device)
function copy_setup (line 511) | static void copy_setup(usb_setup_t* const dst, const volatile uint8_t* c...
function usb_endpoint_init (line 523) | void usb_endpoint_init(const usb_endpoint_t* const endpoint, const bool ...
function usb_check_for_setup_events (line 570) | static void usb_check_for_setup_events(void)
function usb_check_for_transfer_events (line 603) | static void usb_check_for_transfer_events(void)
function usb0_isr (line 637) | void usb0_isr(void)
FILE: firmware/common/usb_queue.c
function usb_queue_t (line 40) | static usb_queue_t* endpoint_queue(const usb_endpoint_t* const endpoint)
function usb_queue_init (line 49) | void usb_queue_init(usb_queue_t* const queue)
function usb_transfer_t (line 67) | static usb_transfer_t* allocate_transfer(usb_queue_t* const queue)
function free_transfer (line 86) | static void free_transfer(usb_transfer_t* const transfer)
function usb_transfer_t (line 102) | static usb_transfer_t* endpoint_queue_transfer(usb_transfer_t* const tra...
function usb_queue_flush_queue (line 119) | static void usb_queue_flush_queue(usb_queue_t* const queue)
function usb_queue_flush_endpoint (line 130) | void usb_queue_flush_endpoint(const usb_endpoint_t* const endpoint)
function usb_transfer_schedule (line 135) | int usb_transfer_schedule(
function usb_transfer_schedule_block (line 178) | int usb_transfer_schedule_block(
function usb_transfer_schedule_ack (line 197) | int usb_transfer_schedule_ack(const usb_endpoint_t* const endpoint)
function usb_queue_transfer_complete (line 203) | void usb_queue_transfer_complete(usb_endpoint_t* const endpoint)
FILE: firmware/common/usb_queue.h
type usb_transfer_t (line 31) | typedef struct _usb_transfer_t usb_transfer_t;
type usb_queue_t (line 32) | typedef struct _usb_queue_t usb_queue_t;
type _usb_transfer_t (line 36) | struct _usb_transfer_t {
type _usb_queue_t (line 46) | struct _usb_queue_t {
FILE: firmware/common/usb_request.c
function usb_request (line 29) | static void usb_request(usb_endpoint_t* const endpoint, const usb_transf...
function usb_setup_complete (line 62) | void usb_setup_complete(usb_endpoint_t* const endpoint)
function usb_control_out_complete (line 72) | void usb_control_out_complete(usb_endpoint_t* const endpoint)
function usb_control_in_complete (line 84) | void usb_control_in_complete(usb_endpoint_t* const endpoint)
FILE: firmware/common/usb_request.h
type usb_endpoint_type_t (line 28) | typedef enum {
type usb_transfer_stage_t (line 35) | typedef enum {
type usb_request_status_t (line 41) | typedef enum {
type usb_request_status_t (line 46) | typedef usb_request_status_t (*usb_request_handler_fn)(
type usb_request_handlers_t (line 50) | typedef struct {
FILE: firmware/common/usb_standard_request.c
function uint_fast16_t (line 50) | uint_fast16_t usb_endpoint_descriptor_max_packet_size(
function usb_transfer_type_t (line 56) | usb_transfer_type_t usb_endpoint_descriptor_transfer_type(
function usb_set_configuration_changed_cb (line 64) | void usb_set_configuration_changed_cb(void (*callback)(usb_device_t* con...
function usb_set_configuration (line 69) | bool usb_set_configuration(
function usb_request_status_t (line 108) | static usb_request_status_t usb_send_descriptor(
function usb_request_status_t (line 128) | static usb_request_status_t usb_send_descriptor_string(usb_endpoint_t* c...
function usb_request_status_t (line 149) | static usb_request_status_t usb_send_descriptor_config(
function usb_request_status_t (line 170) | static usb_request_status_t usb_standard_request_get_descriptor_setup(
function usb_request_status_t (line 220) | static usb_request_status_t usb_standard_request_get_descriptor(
function usb_request_status_t (line 237) | usb_request_status_t usb_vendor_request_read_wcid(
function usb_request_status_t (line 263) | static usb_request_status_t usb_standard_request_set_address_setup(
function usb_request_status_t (line 271) | static usb_request_status_t usb_standard_request_set_address(
function usb_request_status_t (line 294) | static usb_request_status_t usb_standard_request_set_configuration_setup(
function usb_request_status_t (line 306) | static usb_request_status_t usb_standard_request_set_configuration(
function usb_request_status_t (line 325) | static usb_request_status_t usb_standard_request_get_configuration_setup(
function usb_request_status_t (line 346) | static usb_request_status_t usb_standard_request_get_configuration(
function usb_request_status_t (line 363) | static usb_request_status_t usb_standard_request_get_status_setup(
function usb_request_status_t (line 383) | static usb_request_status_t usb_standard_request_get_status(
function usb_request_status_t (line 400) | static usb_request_status_t usb_standard_request_clear_feature_setup(
function usb_request_status_t (line 414) | static usb_request_status_t usb_standard_request_clear_feature(
function usb_request_status_t (line 433) | usb_request_status_t usb_standard_request(
FILE: firmware/common/usb_type.h
type usb_setup_t (line 34) | typedef struct ATTR_PACKED {
type usb_standard_request_t (line 66) | typedef enum {
type usb_feature_selector_t (line 80) | typedef enum {
type usb_setup_request_type_t (line 84) | typedef enum {
type usb_transfer_direction_t (line 102) | typedef enum {
type usb_descriptor_type_t (line 107) | typedef enum {
type usb_transfer_type_t (line 118) | typedef enum {
type usb_speed_t (line 125) | typedef enum {
type usb_configuration_t (line 132) | typedef struct {
type usb_device_t (line 138) | typedef struct {
type usb_endpoint_t (line 149) | typedef struct usb_endpoint_t usb_endpoint_t;
type usb_endpoint_t (line 151) | struct usb_endpoint_t {
FILE: firmware/common/w25q80bv.c
function w25q80bv_setup (line 57) | void w25q80bv_setup(w25q80bv_driver_t* const drv)
function w25q80bv_get_status (line 79) | uint8_t w25q80bv_get_status(w25q80bv_driver_t* const drv)
function w25q80bv_get_device_id (line 87) | uint8_t w25q80bv_get_device_id(w25q80bv_driver_t* const drv)
function w25q80bv_get_unique_id (line 94) | void w25q80bv_get_unique_id(w25q80bv_driver_t* const drv, w25q80bv_uniqu...
function w25q80bv_wait_while_busy (line 117) | void w25q80bv_wait_while_busy(w25q80bv_driver_t* const drv)
function w25q80bv_write_enable (line 122) | void w25q80bv_write_enable(w25q80bv_driver_t* const drv)
function w25q80bv_chip_erase (line 131) | void w25q80bv_chip_erase(w25q80bv_driver_t* const drv)
function w25q80bv_page_program (line 149) | static void w25q80bv_page_program(
function w25q80bv_program (line 180) | void w25q80bv_program(
function w25q80bv_read (line 228) | void w25q80bv_read(
function w25q80bv_clear_status (line 254) | void w25q80bv_clear_status(w25q80bv_driver_t* const drv)
function w25q80bv_get_full_status (line 262) | void w25q80bv_get_full_status(w25q80bv_driver_t* const drv, uint8_t* data)
FILE: firmware/common/w25q80bv.h
type w25q80bv_unique_id_t (line 36) | typedef union {
type w25q80bv_driver_t (line 42) | struct w25q80bv_driver_t
type w25q80bv_driver_t (line 43) | typedef struct w25q80bv_driver_t w25q80bv_driver_t;
type w25q80bv_driver_t (line 45) | struct w25q80bv_driver_t {
FILE: firmware/common/w25q80bv_target.c
function w25q80bv_target_init (line 32) | void w25q80bv_target_init(w25q80bv_driver_t* const drv)
FILE: firmware/common/xapp058/lenval.c
function value (line 15) | long value( lenVal* plvValue )
function initLenVal (line 38) | void initLenVal( lenVal* plv,
function EqualLenVal (line 53) | short EqualLenVal( lenVal* plvTdoExpected,
function RetBit (line 94) | short RetBit( lenVal* plv,
function SetBit (line 113) | void SetBit( lenVal* plv,
function addVal (line 140) | void addVal( lenVal* plvResVal,
function readVal (line 178) | void readVal( lenVal* plv,
FILE: firmware/common/xapp058/lenval.h
type lenVal (line 63) | typedef struct var_len_byte
FILE: firmware/common/xapp058/micro.c
type SXsvfInfo (line 165) | typedef struct tagSXsvfInfo
function xsvfPrintLenVal (line 407) | void xsvfPrintLenVal( lenVal *plv )
function xsvfInfoInit (line 429) | int xsvfInfoInit( SXsvfInfo* pXsvfInfo )
function xsvfInfoCleanup (line 455) | void xsvfInfoCleanup( SXsvfInfo* pXsvfInfo )
function xsvfGetAsNumBytes (line 467) | short xsvfGetAsNumBytes( long lNumBits )
function xsvfTmsTransition (line 479) | void xsvfTmsTransition(jtag_gpio_t* const gpio, short sTms )
function xsvfGotoTapState (line 499) | int xsvfGotoTapState( jtag_gpio_t* const gpio,
function xsvfShiftOnly (line 718) | void xsvfShiftOnly( jtag_gpio_t* const gpio,
function xsvfShift (line 807) | int xsvfShift( jtag_gpio_t* const gpio,
function xsvfBasicXSDRTDO (line 947) | int xsvfBasicXSDRTDO( jtag_gpio_t* const gpio,
function xsvfDoSDRMasking (line 981) | void xsvfDoSDRMasking( lenVal* plvTdi,
function xsvfDoIllegalCmd (line 1059) | int xsvfDoIllegalCmd( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfDoXCOMPLETE (line 1078) | int xsvfDoXCOMPLETE( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfDoXTDOMASK (line 1092) | int xsvfDoXTDOMASK( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfDoXSIR (line 1111) | int xsvfDoXSIR( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfDoXSIR2 (line 1156) | int xsvfDoXSIR2( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfDoXSDR (line 1202) | int xsvfDoXSDR( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfDoXRUNTEST (line 1227) | int xsvfDoXRUNTEST( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfDoXREPEAT (line 1243) | int xsvfDoXREPEAT( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfDoXSDRSIZE (line 1259) | int xsvfDoXSDRSIZE( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfDoXSDRTDO (line 1285) | int xsvfDoXSDRTDO( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfDoXSETSDRMASKS (line 1316) | int xsvfDoXSETSDRMASKS( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfDoXSDRINC (line 1352) | int xsvfDoXSDRINC( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfDoXSDRBCE (line 1424) | int xsvfDoXSDRBCE( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfDoXSDRTDOBCE (line 1455) | int xsvfDoXSDRTDOBCE( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfDoXSTATE (line 1484) | int xsvfDoXSTATE( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfDoXENDXR (line 1506) | int xsvfDoXENDXR( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfDoXCOMMENT (line 1564) | int xsvfDoXCOMMENT( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfDoXWAIT (line 1604) | int xsvfDoXWAIT( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfInitialize (line 1658) | int xsvfInitialize( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfRun (line 1683) | int xsvfRun( jtag_gpio_t* const gpio, SXsvfInfo* pXsvfInfo )
function xsvfCleanup (line 1717) | void xsvfCleanup( SXsvfInfo* pXsvfInfo )
function xsvfExecute (line 1734) | int xsvfExecute(jtag_gpio_t* const gpio)
function main (line 1778) | int main( int iArgc, char** ppzArgv )
FILE: firmware/common/xapp058/ports.c
function delay_jtag (line 19) | void delay_jtag(uint32_t duration)
function setPort (line 42) | void setPort(jtag_gpio_t* const gpio, short p, short val)
function pulseClock (line 67) | void pulseClock(jtag_gpio_t* const gpio)
function readByte (line 78) | void readByte(unsigned char *data)
function readTDOBit (line 85) | unsigned char readTDOBit(jtag_gpio_t* const gpio)
function waitTime (line 100) | void waitTime(jtag_gpio_t* const gpio, long microsec)
FILE: firmware/fpga/amaranth_future/fixed.py
class Shape (line 19) | class Shape(hdl.ShapeCastable):
method __init__ (line 20) | def __init__(self, i_or_f_width, f_width = None, /, *, signed):
method cast (line 29) | def cast(shape, f_width=0):
method as_shape (line 38) | def as_shape(self):
method __call__ (line 41) | def __call__(self, target):
method const (line 44) | def const(self, value):
method from_bits (line 49) | def from_bits(self, raw):
method max (line 54) | def max(self):
method min (line 59) | def min(self):
method __repr__ (line 64) | def __repr__(self):
class SQ (line 68) | class SQ(Shape):
method __init__ (line 69) | def __init__(self, *args):
class UQ (line 73) | class UQ(Shape):
method __init__ (line 74) | def __init__(self, *args):
class Value (line 78) | class Value(hdl.ValueCastable):
method __init__ (line 79) | def __init__(self, shape, target):
method cast (line 84) | def cast(value, f_width=0):
method round (line 87) | def round(self, f_width=0):
method truncate (line 98) | def truncate(self, f_width=0):
method i_width (line 102) | def i_width(self):
method f_width (line 106) | def f_width(self):
method signed (line 110) | def signed(self):
method as_value (line 113) | def as_value(self):
method raw (line 116) | def raw(self):
method shape (line 126) | def shape(self):
method eq (line 129) | def eq(self, other):
method __mul__ (line 147) | def __mul__(self, other):
method __rmul__ (line 162) | def __rmul__(self, other):
method __add__ (line 165) | def __add__(self, other):
method __radd__ (line 182) | def __radd__(self, other):
method __sub__ (line 185) | def __sub__(self, other):
method __rsub__ (line 202) | def __rsub__(self, other):
method __pos__ (line 205) | def __pos__(self):
method __neg__ (line 208) | def __neg__(self):
method __abs__ (line 211) | def __abs__(self):
method __lshift__ (line 214) | def __lshift__(self, other):
method __rshift__ (line 232) | def __rshift__(self, other):
method __lt__ (line 250) | def __lt__(self, other):
method __ge__ (line 260) | def __ge__(self, other):
method __eq__ (line 263) | def __eq__(self, other):
method __repr__ (line 273) | def __repr__(self):
class Const (line 277) | class Const(Value):
method __init__ (line 278) | def __init__(self, value, shape=None):
method _max_value (line 314) | def _max_value(self):
method _min_value (line 318) | def _min_value(self):
method _target (line 326) | def _target(self):
method as_integer_ratio (line 329) | def as_integer_ratio(self):
method as_float (line 332) | def as_float(self):
method __mul__ (line 341) | def __mul__(self, other):
method __rmul__ (line 356) | def __rmul__(self, other):
FILE: firmware/fpga/board.py
class PralinePlatform (line 16) | class PralinePlatform(LatticeICE40Platform):
class ClockDomainGenerator (line 65) | class ClockDomainGenerator(Elaboratable):
method lut_delay (line 68) | def lut_delay(m, signal, *, depth):
method elaborate (line 80) | def elaborate(self, platform):
FILE: firmware/fpga/build.py
function compress_blockwise (line 22) | def compress_blockwise(input_stream, output_stream):
FILE: firmware/fpga/dsp/cic.py
class CICInterpolator (line 18) | class CICInterpolator(wiring.Component):
method __init__ (line 19) | def __init__(self, M, stages, rates, width_in, width_out=None, num_cha...
method bit_growths (line 41) | def bit_growths(self):
method elaborate (line 45) | def elaborate(self, platform):
class CICDecimator (line 118) | class CICDecimator(wiring.Component):
method __init__ (line 119) | def __init__(self, M, stages, rates, width_in, width_out=None, num_cha...
method truncation_summary (line 141) | def truncation_summary(self):
method elaborate (line 146) | def elaborate(self, platform):
class ProgrammableShift (line 219) | class ProgrammableShift(wiring.Component):
method __init__ (line 220) | def __init__(self, width_in, shift_map, width_out=None, num_channels=1...
method elaborate (line 238) | def elaborate(self, platform):
class SignExtend (line 275) | class SignExtend(wiring.Component):
method __init__ (line 276) | def __init__(self, width_in, width_out, num_channels=1, always_ready=F...
method elaborate (line 290) | def elaborate(self, platform):
class WidthConverter (line 300) | class WidthConverter(wiring.Component):
method __init__ (line 301) | def __init__(self, width_in, width_out, num_channels=1, always_ready=F...
method elaborate (line 317) | def elaborate(self, platform):
class CombStage (line 330) | class CombStage(wiring.Component):
method __init__ (line 331) | def __init__(self, M, width_in, width_out=None, num_channels=1, always...
method elaborate (line 348) | def elaborate(self, platform):
class IntegratorStage (line 368) | class IntegratorStage(wiring.Component):
method __init__ (line 369) | def __init__(self, width_in, width_out, num_channels=1, always_ready=F...
method elaborate (line 384) | def elaborate(self, platform):
class Upsampler (line 404) | class Upsampler(wiring.Component):
method __init__ (line 405) | def __init__(self, width, factor, zero_order_hold=False, variable=Fals...
method elaborate (line 418) | def elaborate(self, platform):
class Downsampler (line 444) | class Downsampler(wiring.Component):
method __init__ (line 445) | def __init__(self, width, factor, variable=False, always_ready=False):
method elaborate (line 457) | def elaborate(self, platform):
function F_sq (line 493) | def F_sq(N, R, M, i):
function cic_truncation (line 512) | def cic_truncation(N, R, M, Bin, Bout=None):
function cic_growth (line 532) | def cic_growth(N, R, M):
class _TestFilter (line 558) | class _TestFilter(unittest.TestCase):
method _generate_samples (line 560) | def _generate_samples(self, count, width, f_width=0):
method _filter (line 573) | def _filter(self, dut, samples, count, oob=[], outfile=None):
class TestCICDecimator (line 612) | class TestCICDecimator(_TestFilter):
method test_filter (line 614) | def test_filter(self):
class TestCICInterpolator (line 679) | class TestCICInterpolator(_TestFilter):
method test_filter (line 681) | def test_filter(self):
FILE: firmware/fpga/dsp/dc_block.py
class DCBlock (line 12) | class DCBlock(wiring.Component):
method __init__ (line 21) | def __init__(self, width, ratio=12, num_channels=1, always_ready=True,...
method elaborate (line 37) | def elaborate(self, platform):
class Xoroshiro64AOX (line 112) | class Xoroshiro64AOX(wiring.Component):
method __init__ (line 117) | def __init__(self, s0=1, s1=0):
method elaborate (line 122) | def elaborate(self, platform):
FILE: firmware/fpga/dsp/fir.py
class HalfBandDecimator (line 19) | class HalfBandDecimator(wiring.Component):
method __init__ (line 20) | def __init__(self, taps, data_shape, shape_out=None, always_ready=Fals...
method interleave_with_zeros (line 44) | def interleave_with_zeros(seq, factor):
method elaborate (line 51) | def elaborate(self, platform):
class HalfBandInterpolator (line 140) | class HalfBandInterpolator(wiring.Component):
method __init__ (line 141) | def __init__(self, taps, data_shape, shape_out=None, always_ready=Fals...
method elaborate (line 165) | def elaborate(self, platform):
class FIRFilter (line 247) | class FIRFilter(wiring.Component):
method __init__ (line 249) | def __init__(self, taps, shape, shape_out=None, always_ready=False, nu...
method taps_shape (line 274) | def taps_shape(self):
method compute_output_shape (line 280) | def compute_output_shape(self):
method elaborate (line 288) | def elaborate(self, platform):
class Delay (line 349) | class Delay(wiring.Component):
method __init__ (line 350) | def __init__(self, delay, shape, always_ready=False, num_channels=1):
method elaborate (line 366) | def elaborate(self, platform):
method elaborate_regs (line 371) | def elaborate_regs(self):
method elaborate_memory (line 389) | def elaborate_memory(self):
class _TestFilter (line 429) | class _TestFilter(unittest.TestCase):
method _generate_samples (line 433) | def _generate_samples(self, count, width, f_width=0):
method _filter (line 445) | def _filter(self, dut, samples, count, num_channels=1, outfile=None, e...
class TestFIRFilter (line 499) | class TestFIRFilter(_TestFilter):
method test_filter (line 501) | def test_filter(self):
class TestHalfBandDecimator (line 519) | class TestHalfBandDecimator(_TestFilter):
method test_filter (line 521) | def test_filter(self):
class TestHalfBandInterpolator (line 589) | class TestHalfBandInterpolator(_TestFilter):
method test_filter (line 591) | def test_filter(self):
FILE: firmware/fpga/dsp/fir_mac16.py
class HalfBandDecimatorMAC16 (line 20) | class HalfBandDecimatorMAC16(wiring.Component):
method __init__ (line 21) | def __init__(self, taps, data_shape, overclock_rate=4, shape_out=None,...
method elaborate (line 43) | def elaborate(self, platform):
class HalfBandInterpolatorMAC16 (line 97) | class HalfBandInterpolatorMAC16(wiring.Component):
method __init__ (line 98) | def __init__(self, taps, data_shape, shape_out=None, overclock_rate=4,...
method elaborate (line 122) | def elaborate(self, platform):
class FIRFilterMAC16 (line 191) | class FIRFilterMAC16(wiring.Component):
method __init__ (line 193) | def __init__(self, taps, shape, shape_out=None, always_ready=False, ov...
method taps_shape (line 225) | def taps_shape(self, taps=None):
method compute_output_shape (line 232) | def compute_output_shape(self):
method elaborate (line 244) | def elaborate(self, platform):
class SerialMAC16 (line 342) | class SerialMAC16(wiring.Component):
method __init__ (line 344) | def __init__(self, taps, shape, shape_out=None, taps_shape=None, carry...
method taps_shape (line 367) | def taps_shape(self):
method compute_output_shape (line 373) | def compute_output_shape(self):
method elaborate (line 385) | def elaborate(self, platform):
class iCE40Multiplier (line 464) | class iCE40Multiplier(wiring.Component):
method __init__ (line 466) | def __init__(self, a_width=16, b_width=16, p_width=32, o_width=32, alw...
method elaborate (line 481) | def elaborate(self, platform):
function _incr (line 566) | def _incr(signal, modulo):
class _TestFilter (line 580) | class _TestFilter(unittest.TestCase):
method _generate_samples (line 584) | def _generate_samples(self, count, width, f_width=0):
method _filter (line 596) | def _filter(self, dut, samples, count, num_channels=1, outfile=None, e...
class TestFIRFilterMAC16 (line 650) | class TestFIRFilterMAC16(_TestFilter):
method test_filter (line 652) | def test_filter(self):
class TestHalfBandDecimatorMAC16 (line 670) | class TestHalfBandDecimatorMAC16(_TestFilter):
method test_filter (line 672) | def test_filter(self):
class TestHalfBandInterpolatorMAC16 (line 741) | class TestHalfBandInterpolatorMAC16(_TestFilter):
method test_filter (line 743) | def test_filter(self):
FILE: firmware/fpga/dsp/mcm.py
class ShiftAddMCM (line 15) | class ShiftAddMCM(wiring.Component):
method __init__ (line 16) | def __init__(self, width, terms, num_channels=1, always_ready=False):
method elaborate (line 31) | def elaborate(self, platform):
function make_odd (line 84) | def make_odd(n):
function multiply (line 97) | def multiply(n, k):
function to_csd (line 122) | def to_csd(n):
FILE: firmware/fpga/dsp/nco.py
class NCO (line 16) | class NCO(wiring.Component):
method __init__ (line 41) | def __init__(self, phase_width=24, output_width=10):
method elaborate (line 50) | def elaborate(self, platform):
FILE: firmware/fpga/dsp/quarter_shift.py
class QuarterShift (line 13) | class QuarterShift(wiring.Component):
method elaborate (line 19) | def elaborate(self, platform):
FILE: firmware/fpga/dsp/round.py
function convergent_round (line 7) | def convergent_round(value, discarded_bits):
FILE: firmware/fpga/dsp/sb_mac16.py
class SB_MAC16 (line 12) | class SB_MAC16(wiring.Component):
method __init__ (line 46) | def __init__(self,
method elaborate (line 95) | def elaborate(self, platform):
method elaborate_hard_macro (line 102) | def elaborate_hard_macro(self):
method elaborate_simulation (line 142) | def elaborate_simulation(self):
FILE: firmware/fpga/interface/max586x.py
class MAX586xInterface (line 13) | class MAX586xInterface(wiring.Component):
method __init__ (line 18) | def __init__(self, bb_domain):
method elaborate (line 22) | def elaborate(self, platform):
FILE: firmware/fpga/interface/sgpio.py
class SGPIOInterface (line 14) | class SGPIOInterface(wiring.Component):
method __init__ (line 16) | def __init__(self, sample_width=8, rx_assignments=None, tx_assignments...
method elaborate (line 32) | def elaborate(self, platform):
function _default_rx_assignments (line 153) | def _default_rx_assignments(n):
function _default_tx_assignments (line 160) | def _default_tx_assignments(n):
class FlowAndTriggerControl (line 168) | class FlowAndTriggerControl(wiring.Component):
method __init__ (line 173) | def __init__(self, domain):
method elaborate (line 177) | def elaborate(self, platform):
FILE: firmware/fpga/interface/spi.py
class SPIDeviceInterface (line 13) | class SPIDeviceInterface(Elaboratable):
method __init__ (line 15) | def __init__(self, port):
method elaborate (line 28) | def elaborate(self, platform):
class SPICommandInterface (line 142) | class SPICommandInterface(Elaboratable):
method __init__ (line 154) | def __init__(self, port):
method elaborate (line 169) | def elaborate(self, platform):
class SPIRegisterInterface (line 218) | class SPIRegisterInterface(Elaboratable):
method __init__ (line 234) | def __init__(self, port):
method _ensure_register_is_unused (line 261) | def _ensure_register_is_unused(self, address):
method add_sfr (line 268) | def add_sfr(self, address, *, read=None, write_signal=None, write_stro...
method add_read_only_register (line 296) | def add_read_only_register(self, address, *, read, read_strobe=None):
method add_register (line 311) | def add_register(self, address, *, value_signal=None, size=None, name=...
method _elaborate_register (line 362) | def _elaborate_register(self, m, register_address, connections):
method elaborate (line 398) | def elaborate(self, platform):
FILE: firmware/fpga/top/ext_precision_rx.py
class Top (line 22) | class Top(Elaboratable):
method elaborate (line 24) | def elaborate(self, platform):
FILE: firmware/fpga/top/ext_precision_tx.py
class Top (line 20) | class Top(Elaboratable):
method elaborate (line 22) | def elaborate(self, platform):
FILE: firmware/fpga/top/half_precision.py
class IQHalfPrecisionConverter (line 19) | class IQHalfPrecisionConverter(wiring.Component):
method elaborate (line 23) | def elaborate(self, platform):
class IQHalfPrecisionConverterInv (line 34) | class IQHalfPrecisionConverterInv(wiring.Component):
method elaborate (line 38) | def elaborate(self, platform):
class Top (line 51) | class Top(Elaboratable):
method elaborate (line 53) | def elaborate(self, platform):
FILE: firmware/fpga/top/standard.py
class Top (line 23) | class Top(Elaboratable):
method elaborate (line 25) | def elaborate(self, platform):
FILE: firmware/fpga/util/__init__.py
class IQSample (line 15) | class IQSample(data.StructLayout):
method __init__ (line 16) | def __init__(self, width=8):
class ClockConverter (line 23) | class ClockConverter(wiring.Component):
method __init__ (line 25) | def __init__(self, shape, depth, input_domain, output_domain, always_r...
method elaborate (line 35) | def elaborate(self, platform):
FILE: firmware/fpga/util/_stream.py
class StreamSkidBuffer (line 15) | class StreamSkidBuffer(wiring.Component):
method __init__ (line 17) | def __init__(self, shape, always_ready=False):
method elaborate (line 23) | def elaborate(self, platform):
class StreamMux (line 50) | class StreamMux(wiring.Component):
method __init__ (line 52) | def __init__(self, data_shape, num_channels, always_ready=False):
method elaborate (line 65) | def elaborate(self, platform):
class StreamDemux (line 88) | class StreamDemux(wiring.Component):
method __init__ (line 90) | def __init__(self, data_shape, num_channels, always_ready=False):
method elaborate (line 103) | def elaborate(self, platform):
class TestStreamMux (line 128) | class TestStreamMux(unittest.TestCase):
method test_mux (line 130) | def test_mux(self):
method test_demux (line 159) | def test_demux(self):
FILE: firmware/fpga/util/lfsr.py
class LinearFeedbackShiftRegister (line 13) | class LinearFeedbackShiftRegister(Elaboratable):
method __init__ (line 31) | def __init__(self, degree, taps, init=1):
method elaborate (line 40) | def elaborate(self, platform):
method generate (line 48) | def generate(self):
FILE: firmware/hackrf_usb/hackrf_usb.c
function usb_request_status_t (line 163) | usb_request_status_t usb_vendor_request(
function usb_configuration_changed (line 187) | void usb_configuration_changed(usb_device_t* const device)
function usb_set_descriptor_by_serial_number (line 202) | void usb_set_descriptor_by_serial_number(void)
function cpld_jtag_sram_load (line 233) | static bool cpld_jtag_sram_load(jtag_t* const jtag)
function m0_rom_to_ram (line 246) | static void m0_rom_to_ram(void)
function fpga_loader_setup (line 263) | void fpga_loader_setup(void)
function fpga_loader_read (line 269) | void fpga_loader_read(uint32_t addr, uint32_t size, uint8_t* buf)
type fpga_loader_t (line 274) | struct fpga_loader_t
function main (line 283) | int main(void)
FILE: firmware/hackrf_usb/usb_api_adc.c
function usb_request_status_t (line 27) | usb_request_status_t usb_vendor_request_adc_read(
FILE: firmware/hackrf_usb/usb_api_board_info.c
type gpio (line 38) | struct gpio
type gpio (line 39) | struct gpio
type gpio (line 40) | struct gpio
function usb_request_status_t (line 43) | usb_request_status_t usb_vendor_request_read_board_id(
function usb_request_status_t (line 60) | usb_request_status_t usb_vendor_request_read_version_string(
function usb_request_status_t (line 86) | usb_request_status_t usb_vendor_request_read_partid_serialno(
function usb_request_status_t (line 128) | usb_request_status_t usb_vendor_request_reset(
function usb_request_status_t (line 153) | usb_request_status_t usb_vendor_request_read_board_rev(
function usb_request_status_t (line 170) | usb_request_status_t usb_vendor_request_read_supported_platform(
FILE: firmware/hackrf_usb/usb_api_board_info.h
type read_partid_serialno_t (line 32) | typedef struct {
FILE: firmware/hackrf_usb/usb_api_cpld.c
function cpld_buffer_refilled (line 41) | static void cpld_buffer_refilled(void* user_data, unsigned int length)
function refill_cpld_buffer (line 48) | static void refill_cpld_buffer(void)
function cpld_update (line 62) | void cpld_update(void)
function usb_request_status_t (line 85) | usb_request_status_t usb_vendor_request_cpld_checksum(
FILE: firmware/hackrf_usb/usb_api_m0_state.c
function usb_request_status_t (line 29) | usb_request_status_t usb_vendor_request_get_m0_state(
FILE: firmware/hackrf_usb/usb_api_operacake.c
function usb_request_status_t (line 31) | usb_request_status_t usb_vendor_request_operacake_get_boards(
function usb_request_status_t (line 43) | usb_request_status_t usb_vendor_request_operacake_set_ports(
function usb_request_status_t (line 60) | usb_request_status_t usb_vendor_request_operacake_set_ranges(
function usb_request_status_t (line 91) | usb_request_status_t usb_vendor_request_operacake_gpio_test(
function usb_request_status_t (line 112) | usb_request_status_t usb_vendor_request_operacake_set_mode(
function usb_request_status_t (line 130) | usb_request_status_t usb_vendor_request_operacake_get_mode(
type operacake_dwell_times (line 144) | struct operacake_dwell_times
function usb_request_status_t (line 146) | usb_request_status_t usb_vendor_request_operacake_set_dwell_times(
FILE: firmware/hackrf_usb/usb_api_praline.c
function usb_request_status_t (line 31) | usb_request_status_t usb_vendor_request_p1_ctrl(
function usb_request_status_t (line 42) | usb_request_status_t usb_vendor_request_p2_ctrl(
function usb_request_status_t (line 53) | usb_request_status_t usb_vendor_request_clkin_ctrl(
function usb_request_status_t (line 64) | usb_request_status_t usb_vendor_request_set_narrowband_filter(
function usb_request_status_t (line 75) | usb_request_status_t usb_vendor_request_set_fpga_bitstream(
FILE: firmware/hackrf_usb/usb_api_register.c
function usb_request_status_t (line 38) | usb_request_status_t usb_vendor_request_write_max283x(
function usb_request_status_t (line 61) | usb_request_status_t usb_vendor_request_read_max283x(
function usb_request_status_t (line 87) | usb_request_status_t usb_vendor_request_write_si5351c(
function usb_request_status_t (line 108) | usb_request_status_t usb_vendor_request_read_si5351c(
function usb_request_status_t (line 133) | usb_request_status_t usb_vendor_request_write_rffc5071(
function usb_request_status_t (line 152) | usb_request_status_t usb_vendor_request_read_rffc5071(
function usb_request_status_t (line 178) | usb_request_status_t usb_vendor_request_set_clkout_enable(
function usb_request_status_t (line 189) | usb_request_status_t usb_vendor_request_get_clkin_status(
function usb_request_status_t (line 206) | usb_request_status_t usb_vendor_request_set_leds(
type bias_tee_opt_t (line 217) | typedef enum {
function set_bias_tee_opt (line 224) | static void set_bias_tee_opt(const uint8_t bank, const bias_tee_opt_t op...
function usb_request_status_t (line 242) | usb_request_status_t usb_vendor_request_user_config_set_bias_t_opts(
function usb_request_status_t (line 263) | usb_request_status_t usb_vendor_request_write_fpga_reg(
function usb_request_status_t (line 275) | usb_request_status_t usb_vendor_request_read_fpga_reg(
function usb_request_status_t (line 300) | usb_request_status_t usb_vendor_request_write_radio_reg(
function usb_request_status_t (line 345) | usb_request_status_t usb_vendor_request_read_radio_reg(
FILE: firmware/hackrf_usb/usb_api_selftest.c
function append (line 45) | void append(char** dest, size_t* capacity, const char* str)
function generate_selftest_report (line 73) | void generate_selftest_report(void)
function usb_request_status_t (line 162) | usb_request_status_t usb_vendor_request_read_selftest(
function usb_request_status_t (line 181) | usb_request_status_t usb_vendor_request_test_rtc_osc(
FILE: firmware/hackrf_usb/usb_api_spiflash.c
function usb_request_status_t (line 37) | usb_request_status_t usb_vendor_request_erase_spiflash(
function usb_request_status_t (line 51) | usb_request_status_t usb_vendor_request_write_spiflash(
function usb_request_status_t (line 92) | usb_request_status_t usb_vendor_request_read_spiflash(
function usb_request_status_t (line 131) | usb_request_status_t usb_vendor_request_spiflash_status(
function usb_request_status_t (line 152) | usb_request_status_t usb_vendor_request_spiflash_clear_status(
FILE: firmware/hackrf_usb/usb_api_sweep.c
type sweep_style (line 54) | enum sweep_style
function usb_request_status_t (line 57) | usb_request_status_t usb_vendor_request_init_sweep(
function sweep_bulk_transfer_complete (line 110) | void sweep_bulk_transfer_complete(void* user_data, unsigned int bytes_tr...
function sweep_mode (line 120) | void sweep_mode(uint32_t seq)
FILE: firmware/hackrf_usb/usb_api_sweep.h
type sweep_style (line 30) | enum sweep_style {
FILE: firmware/hackrf_usb/usb_api_transceiver.c
type set_freq_params_t (line 53) | typedef struct {
type set_freq_explicit_params (line 60) | struct set_freq_explicit_params {
type set_freq_explicit_params (line 66) | struct set_freq_explicit_params
type set_sample_r_params_t (line 68) | typedef struct {
function usb_request_status_t (line 75) | usb_request_status_t usb_vendor_request_set_baseband_filter_bandwidth(
function usb_request_status_t (line 98) | usb_request_status_t usb_vendor_request_set_freq(
function usb_request_status_t (line 137) | usb_request_status_t usb_vendor_request_set_freq_explicit(
function fp_40_24_t (line 172) | static inline fp_40_24_t round_sample_rate(uint64_t num, uint32_t denom)
function usb_request_status_t (line 181) | usb_request_status_t usb_vendor_request_set_sample_rate_frac(
function usb_request_status_t (line 202) | usb_request_status_t usb_vendor_request_set_amp_enable(
function usb_request_status_t (line 222) | usb_request_status_t usb_vendor_request_set_lna_gain(
function usb_request_status_t (line 242) | usb_request_status_t usb_vendor_request_set_vga_gain(
function usb_request_status_t (line 262) | usb_request_status_t usb_vendor_request_set_txvga_gain(
function usb_request_status_t (line 282) | usb_request_status_t usb_vendor_request_set_antenna_enable(
function request_transceiver_mode (line 306) | void request_transceiver_mode(transceiver_mode_t mode)
function transceiver_shutdown (line 315) | void transceiver_shutdown(void)
function transceiver_startup (line 329) | void transceiver_startup(const transceiver_mode_t mode)
function usb_request_status_t (line 355) | usb_request_status_t usb_vendor_request_set_transceiver_mode(
function usb_request_status_t (line 377) | usb_request_status_t usb_vendor_request_set_hw_sync_mode(
function usb_request_status_t (line 392) | usb_request_status_t usb_vendor_request_set_tx_underrun_limit(
function usb_request_status_t (line 404) | usb_request_status_t usb_vendor_request_set_rx_overrun_limit(
function transceiver_bulk_transfer_complete (line 416) | void transceiver_bulk_transfer_complete(void* user_data, unsigned int by...
function rx_mode (line 422) | void rx_mode(uint32_t seq)
function tx_mode (line 446) | void tx_mode(uint32_t seq)
function off_mode (line 483) | void off_mode(uint32_t seq)
FILE: firmware/hackrf_usb/usb_api_transceiver.h
type transceiver_request_t (line 31) | typedef struct {
FILE: firmware/hackrf_usb/usb_api_ui.c
function usb_request_status_t (line 32) | usb_request_status_t usb_vendor_request_set_ui_enable(
FILE: firmware/tools/cpld_bitstream.py
function values_list_line_wrap (line 11) | def values_list_line_wrap(values):
function dec_lines (line 15) | def dec_lines(bytes):
function hex_lines (line 18) | def hex_lines(bytes):
function reverse_bits (line 21) | def reverse_bits(n, bit_count):
function extract_addresses (line 29) | def extract_addresses(block):
function extract_data (line 32) | def extract_data(block):
function extract_mask (line 35) | def extract_mask(block):
function equal_blocks (line 38) | def equal_blocks(block1, block2, mask):
function dump_block (line 49) | def dump_block(rows, endian='little'):
function extract_programming_data (line 54) | def extract_programming_data(commands):
function validate_programming_data (line 105) | def validate_programming_data(programming_data):
function make_sram_program (line 140) | def make_sram_program(program_blocks):
FILE: firmware/tools/dumb_crc32.py
class DumbCRC32 (line 2) | class DumbCRC32(object):
method __init__ (line 3) | def __init__(self):
method update (line 8) | def update(self, data):
method digest (line 18) | def digest(self):
method hexdigest (line 21) | def hexdigest(self):
FILE: firmware/tools/dump_cgu.py
function print_data (line 40) | def print_data(d):
FILE: firmware/tools/xsvf.py
class XSVFParser (line 4) | class XSVFParser(object):
method __init__ (line 5) | def __init__(self):
method tdomask (line 31) | def tdomask(self):
method read_byte (line 34) | def read_byte(self):
method read_bytes (line 37) | def read_bytes(self, n):
method read_bits (line 44) | def read_bits(self, n):
method read_u32 (line 48) | def read_u32(self):
method parse (line 51) | def parse(self, f, debug=False):
method read_instruction (line 69) | def read_instruction(self):
method XCOMPLETE (line 79) | def XCOMPLETE(self):
method XTDOMASK (line 82) | def XTDOMASK(self):
method XSIR (line 86) | def XSIR(self):
method XSDR (line 99) | def XSDR(self):
method XRUNTEST (line 112) | def XRUNTEST(self):
method XREPEAT (line 117) | def XREPEAT(self):
method XSDRSIZE (line 121) | def XSDRSIZE(self):
method XSDRTDO (line 124) | def XSDRTDO(self):
method XSETSDRMASKS (line 160) | def XSETSDRMASKS(self):
method XSDRINC (line 163) | def XSDRINC(self):
method XSDRB (line 166) | def XSDRB(self):
method XSDRC (line 169) | def XSDRC(self):
method XSDRE (line 172) | def XSDRE(self):
method XSDRTDOB (line 175) | def XSDRTDOB(self):
method XSDRTDOC (line 178) | def XSDRTDOC(self):
method XSDRTDOE (line 181) | def XSDRTDOE(self):
method XSTATE (line 184) | def XSTATE(self):
method XENDIR (line 193) | def XENDIR(self):
method XENDDR (line 196) | def XENDDR(self):
method XSIR2 (line 199) | def XSIR2(self):
method XCOMMENT (line 202) | def XCOMMENT(self):
method XWAIT (line 205) | def XWAIT(self):
FILE: hardware/lollipop/lollipop_logic.py
class Component (line 27) | class Component(object):
method __init__ (line 28) | def __init__(self, **kwargs):
method __repr__ (line 31) | def __repr__(self):
class SKY13317 (line 44) | class SKY13317(Component):
class SKY13351 (line 58) | class SKY13351(Component):
class U2_4 (line 70) | class U2_4(SKY13351):
class U6_9 (line 77) | class U6_9(SKY13351):
class U3 (line 84) | class U3(SKY13317):
class U7 (line 92) | class U7(SKY13351):
class U10 (line 99) | class U10(SKY13351):
class U15 (line 106) | class U15(SKY13317):
class U12_14 (line 114) | class U12_14(SKY13351):
class U16_18 (line 121) | class U16_18(SKY13351):
function compute_logic (line 128) | def compute_logic(**inputs):
function print_signals (line 146) | def print_signals(signals):
function print_circuit_state (line 149) | def print_circuit_state(signals):
function make_bits_from_numbers (line 164) | def make_bits_from_numbers(i, bit_count):
FILE: hardware/test/si5351-configure.py
function write_registers (line 74) | def write_registers(first_register_number, values):
function set_multisynth_parameters (line 87) | def set_multisynth_parameters(ms_n, p1, p2, p3, r):
function integer_p1 (line 103) | def integer_p1(frequency):
function set_codec_rate (line 106) | def set_codec_rate(frequency):
FILE: host/hackrf-tools/getopt/getopt.c
function exchange (line 302) | static void
function getopt_long (line 453) | int
function getopt_long_only (line 469) | int
function _getopt_internal (line 536) | int
function getopt (line 1002) | int
function main (line 1021) | int
FILE: host/hackrf-tools/getopt/getopt.h
type option (line 94) | struct option
type option (line 152) | struct option
type option (line 155) | struct option
type option (line 160) | struct option
FILE: host/hackrf-tools/src/hackrf_biast.c
function usage (line 37) | void usage()
function update_user_mode (line 68) | void update_user_mode(
function main (line 91) | int main(int argc, char** argv)
FILE: host/hackrf-tools/src/hackrf_clock.c
function parse_int (line 38) | int parse_int(char* s, uint8_t* const value)
function parse_p1_ctrl_signal (line 66) | int parse_p1_ctrl_signal(char* s, enum p1_ctrl_signal* const signal)
function parse_p2_ctrl_signal (line 91) | int parse_p2_ctrl_signal(char* s, enum p2_ctrl_signal* const signal)
function si5351c_read_register (line 106) | int si5351c_read_register(hackrf_device* device, const uint16_t register...
function si5351c_write_register (line 122) | int si5351c_write_register(
function print_clk_control (line 150) | void print_clk_control(uint16_t clk_ctrl)
function si5351c_read_multisynth_config (line 204) | int si5351c_read_multisynth_config(hackrf_device* device, const uint_fas...
function si5351c_read_configuration (line 271) | int si5351c_read_configuration(hackrf_device* device)
function usage (line 285) | static void usage()
type option (line 303) | struct option
function main (line 315) | int main(int argc, char** argv)
FILE: host/hackrf-tools/src/hackrf_cpldjtag.c
type option (line 46) | struct option
function parse_int (line 53) | int parse_int(char* s, uint32_t* const value)
function usage (line 81) | static void usage()
function main (line 89) | int main(int argc, char** argv)
FILE: host/hackrf-tools/src/hackrf_debug.c
type parts (line 36) | enum parts {
function parse_int (line 46) | int parse_int(char* s, uint64_t* const value)
function max283x_read_register (line 74) | int max283x_read_register(
function max283x_read_registers (line 109) | int max283x_read_registers(hackrf_device* device, uint8_t part)
function max283x_write_register (line 135) | int max283x_write_register(
function si5351c_read_register (line 170) | int si5351c_read_register(hackrf_device* device, const uint16_t register...
function si5351c_read_registers (line 186) | int si5351c_read_registers(hackrf_device* device)
function si5351c_write_register (line 201) | int si5351c_write_register(
function print_clk_control (line 229) | void print_clk_control(uint16_t clk_ctrl)
function si5351c_read_multisynth_config (line 283) | int si5351c_read_multisynth_config(hackrf_device* device, const uint_fas...
function si5351c_read_configuration (line 350) | int si5351c_read_configuration(hackrf_device* device)
function rffc5072_read_register (line 371) | int rffc5072_read_register(hackrf_device* device, const uint16_t registe...
function rffc5072_read_registers (line 388) | int rffc5072_read_registers(hackrf_device* device)
function rffc5072_write_register (line 403) | int rffc5072_write_register(
function fpga_read_register (line 422) | int fpga_read_register(hackrf_device* device, const uint16_t register_nu...
function fpga_read_registers (line 441) | int fpga_read_registers(hackrf_device* device)
function fpga_write_register (line 456) | int fpga_write_register(
function radio_read_register (line 478) | int radio_read_register(
function radio_read_registers (line 506) | int radio_read_registers(hackrf_device* device, const uint8_t bank)
function radio_write_register (line 521) | int radio_write_register(
function read_register (line 548) | int read_register(
function read_registers (line 570) | int read_registers(hackrf_device* device, uint8_t part, const uint8_t bank)
function write_register (line 588) | int write_register(
function print_state (line 650) | static void print_state(hackrf_m0_state* state)
function usage (line 670) | static void usage()
type option (line 706) | struct option
function main (line 736) | int main(int argc, char** argv)
FILE: host/hackrf-tools/src/hackrf_info.c
function print_board_rev (line 29) | void print_board_rev(uint8_t board_rev)
function print_supported_platform (line 49) | void print_supported_platform(uint32_t platform, uint8_t board_id, uint8...
function main (line 97) | int main(void)
FILE: host/hackrf-tools/src/hackrf_operacake.c
function usage (line 40) | static void usage()
type option (line 56) | struct option
function parse_uint16 (line 66) | int parse_uint16(char* const s, uint16_t* const value)
function parse_uint32 (line 78) | int parse_uint32(char* const s, uint32_t* const value)
function parse_port (line 90) | int parse_port(char* str, uint8_t* port)
function parse_range (line 127) | int parse_range(char* s, hackrf_operacake_freq_range* range)
function parse_dwell (line 148) | int parse_dwell(char* s, hackrf_operacake_dwell_time* dwell_time)
function main (line 180) | int main(int argc, char** argv)
FILE: host/hackrf-tools/src/hackrf_spiflash.c
type option (line 48) | struct option
function compatibility_check_og (line 68) | int compatibility_check_og(
function compatibility_check (line 121) | int compatibility_check(uint8_t* data, int length, hackrf_device* device...
function parse_u32 (line 160) | int parse_u32(char* s, uint32_t* const value)
function usage (line 188) | static void usage()
function main (line 204) | int main(int argc, char** argv)
FILE: host/hackrf-tools/src/hackrf_sweep.c
function gettimeofday (line 57) | int gettimeofday(struct timeval* tv, void* ignored)
function TimevalDiff (line 111) | static float TimevalDiff(const struct timeval* a, const struct timeval* b)
function parse_u32 (line 116) | int parse_u32(char* s, uint32_t* const value)
function parse_u32_range (line 144) | int parse_u32_range(char* s, uint32_t* const value_min, uint32_t* const ...
type timeval (line 173) | struct timeval
type timeval (line 174) | struct timeval
type timeval (line 201) | struct timeval
function logPower (line 203) | float logPower(fftwf_complex in, float scale)
function rx_callback (line 211) | int rx_callback(hackrf_transfer* transfer)
function usage (line 387) | static void usage()
function BOOL (line 415) | BOOL WINAPI sighandler(int signum)
function sigint_callback_handler (line 425) | void sigint_callback_handler(int signum)
function import_wisdom (line 432) | int import_wisdom(const char* path)
function import_default_wisdom (line 445) | int import_default_wisdom()
function export_wisdom (line 450) | int export_wisdom(const char* path)
function main (line 462) | int main(int argc, char** argv)
FILE: host/hackrf-tools/src/hackrf_transfer.c
function gettimeofday (line 56) | int gettimeofday(struct timeval* tv, void* ignored)
type transceiver_mode_t (line 111) | typedef enum {
type hw_sync_mode_t (line 118) | typedef enum {
type stats_t (line 123) | typedef struct {
type t_WAVRIFF_hdr (line 129) | typedef struct {
type t_FormatChunk (line 138) | typedef struct {
type t_DataChunk (line 149) | typedef struct {
type t_wav_file_hdr (line 156) | typedef struct {
type t_u64toa (line 191) | typedef struct {
function TimevalDiff (line 197) | static float TimevalDiff(const struct timeval* a, const struct timeval* b)
function parse_u64 (line 202) | int parse_u64(char* s, uint64_t* const value)
function parse_u32 (line 230) | int parse_u32(char* s, uint32_t* const value)
function parse_frequency_i64 (line 259) | int parse_frequency_i64(char* optarg, char* endptr, int64_t* value)
function parse_frequency_u32 (line 268) | int parse_frequency_u32(char* optarg, char* endptr, uint32_t* value)
type timeval (line 350) | struct timeval
type timeval (line 351) | struct timeval
function stop_main_loop (line 392) | void stop_main_loop(void)
function rx_callback (line 402) | int rx_callback(hackrf_transfer* transfer)
function tx_callback (line 476) | int tx_callback(hackrf_transfer* transfer)
function tx_complete_callback (line 583) | static void tx_complete_callback(hackrf_transfer* transfer, int success)
function flush_callback (line 604) | static void flush_callback(void* flush_ctx, int success)
function update_stats (line 612) | static int update_stats(hackrf_device* device, hackrf_m0_state* state, s...
function usage (line 650) | static void usage()
function BOOL (line 700) | BOOL WINAPI sighandler(int signum)
function sigint_callback_handler (line 711) | void sigint_callback_handler(int signum)
function sigalrm_callback_handler (line 720) | void sigalrm_callback_handler(int signum)
function main (line 728) | int main(int argc, char** argv)
FILE: host/libhackrf/src/hackrf.c
type hackrf_vendor_request (line 59) | typedef enum {
type hackrf_transceiver_mode (line 125) | typedef enum {
type hackrf_hw_sync_mode (line 134) | typedef enum {
type hackrf_device (line 144) | struct hackrf_device {
type max2837_ft_t (line 167) | typedef struct {
function transfers_check_setup (line 213) | static int transfers_check_setup(hackrf_device* device)
function cancel_transfers (line 234) | static int cancel_transfers(hackrf_device* device)
function free_transfers (line 275) | static int free_transfers(hackrf_device* device)
function allocate_transfers (line 297) | static int allocate_transfers(hackrf_device* const device)
function prepare_transfers (line 337) | static int prepare_transfers(
function detach_kernel_drivers (line 439) | static int detach_kernel_drivers(libusb_device_handle* usb_device_handle)
function set_hackrf_configuration (line 473) | static int set_hackrf_configuration(libusb_device_handle* usb_device, in...
function hackrf_init (line 506) | int ADDCALL hackrf_init(void)
function hackrf_exit (line 522) | int ADDCALL hackrf_exit(void)
type hackrf_usb_board_id (line 570) | enum hackrf_usb_board_id
type libusb_device_descriptor (line 580) | struct libusb_device_descriptor
function hackrf_device_list_free (line 622) | void ADDCALL hackrf_device_list_free(hackrf_device_list_t* list)
function libusb_device_handle (line 639) | libusb_device_handle* hackrf_open_usb(const char* const desired_serial_n...
function hackrf_open_setup (line 712) | static int hackrf_open_setup(libusb_device_handle* usb_device, hackrf_de...
function hackrf_open (line 799) | int ADDCALL hackrf_open(hackrf_device** device)
function hackrf_open_by_serial (line 833) | int ADDCALL hackrf_open_by_serial(
function hackrf_device_list_open (line 856) | int ADDCALL hackrf_device_list_open(
function hackrf_device_list_bus_sharing (line 880) | int ADDCALL hackrf_device_list_bus_sharing(hackrf_device_list_t* list, i...
function hackrf_set_transceiver_mode (line 904) | int ADDCALL hackrf_set_transceiver_mode(
function hackrf_max2837_read (line 928) | int ADDCALL hackrf_max2837_read(
function hackrf_max2831_read (line 957) | int ADDCALL hackrf_max2831_read(
function hackrf_max2837_write (line 986) | int ADDCALL hackrf_max2837_write(
function hackrf_max2831_write (line 1019) | int ADDCALL hackrf_max2831_write(
function hackrf_si5351c_read (line 1052) | int ADDCALL hackrf_si5351c_read(
function hackrf_si5351c_write (line 1084) | int ADDCALL hackrf_si5351c_write(
function hackrf_set_baseband_filter_bandwidth (line 1117) | int ADDCALL hackrf_set_baseband_filter_bandwidth(
function hackrf_rffc5071_read (line 1141) | int ADDCALL hackrf_rffc5071_read(
function hackrf_rffc5071_write (line 1170) | int ADDCALL hackrf_rffc5071_write(
function hackrf_fpga_read_register (line 1200) | int ADDCALL hackrf_fpga_read_register(
function hackrf_fpga_write_register (line 1226) | int ADDCALL hackrf_fpga_write_register(
function hackrf_read_selftest (line 1253) | int ADDCALL hackrf_read_selftest(hackrf_device* device, hackrf_selftest*...
function hackrf_test_rtc_osc (line 1277) | int ADDCALL hackrf_test_rtc_osc(hackrf_device* device, bool* pass)
function hackrf_read_adc (line 1381) | int ADDCALL hackrf_read_adc(hackrf_device* device, uint8_t adc_channel, ...
function hackrf_get_m0_state (line 1410) | int ADDCALL hackrf_get_m0_state(hackrf_device* device, hackrf_m0_state* ...
function hackrf_set_tx_underrun_limit (line 1444) | int ADDCALL hackrf_set_tx_underrun_limit(hackrf_device* device, uint32_t...
function hackrf_set_rx_overrun_limit (line 1468) | int ADDCALL hackrf_set_rx_overrun_limit(hackrf_device* device, uint32_t ...
function hackrf_spiflash_erase (line 1492) | int ADDCALL hackrf_spiflash_erase(hackrf_device* device)
function hackrf_spiflash_write (line 1514) | int ADDCALL hackrf_spiflash_write(
function hackrf_spiflash_read (line 1545) | int ADDCALL hackrf_spiflash_read(
function hackrf_spiflash_status (line 1575) | int ADDCALL hackrf_spiflash_status(hackrf_device* device, uint8_t* data)
function hackrf_spiflash_clear_status (line 1598) | int ADDCALL hackrf_spiflash_clear_status(hackrf_device* device)
function hackrf_cpld_write (line 1621) | int ADDCALL hackrf_cpld_write(
function hackrf_board_id_read (line 1653) | int ADDCALL hackrf_board_id_read(hackrf_device* device, uint8_t* value)
function hackrf_version_string_read (line 1674) | int ADDCALL hackrf_version_string_read(
function ADDCALL (line 1699) | ADDCALL hackrf_usb_api_version_read(
type set_freq_params_t (line 1717) | typedef struct {
function hackrf_set_freq (line 1725) | int ADDCALL hackrf_set_freq(hackrf_device* device, const uint64_t freq_hz)
type set_freq_explicit_params (line 1759) | struct set_freq_explicit_params {
function hackrf_set_freq_explicit (line 1765) | int ADDCALL hackrf_set_freq_explicit(
type set_fracrate_params_t (line 1819) | typedef struct {
function hackrf_set_sample_rate_manual (line 1829) | int ADDCALL hackrf_set_sample_rate_manual(
function hackrf_set_sample_rate (line 1870) | int ADDCALL hackrf_set_sample_rate(hackrf_device* device, const double f...
function hackrf_set_amp_enable (line 1911) | int ADDCALL hackrf_set_amp_enable(hackrf_device* device, const uint8_t v...
function hackrf_board_partid_serialno_read (line 1933) | int ADDCALL hackrf_board_partid_serialno_read(
function hackrf_set_lna_gain (line 1972) | int ADDCALL hackrf_set_lna_gain(hackrf_device* device, uint32_t value)
function hackrf_set_vga_gain (line 1999) | int ADDCALL hackrf_set_vga_gain(hackrf_device* device, uint32_t value)
function hackrf_set_txvga_gain (line 2026) | int ADDCALL hackrf_set_txvga_gain(hackrf_device* device, uint32_t value)
function hackrf_set_antenna_enable (line 2052) | int ADDCALL hackrf_set_antenna_enable(hackrf_device* device, const uint8...
type timeval (line 2078) | struct timeval
function hackrf_libusb_flush_callback (line 2104) | static void LIBUSB_CALL hackrf_libusb_flush_callback(struct libusb_trans...
function hackrf_libusb_transfer_callback (line 2120) | static void LIBUSB_CALL
function kill_transfer_thread (line 2191) | static int kill_transfer_thread(hackrf_device* device)
function prepare_setup_transfers (line 2229) | static int prepare_setup_transfers(
function create_transfer_thread (line 2245) | static int create_transfer_thread(hackrf_device* device)
function hackrf_is_streaming (line 2269) | int ADDCALL hackrf_is_streaming(hackrf_device* device)
function hackrf_start_rx (line 2289) | int ADDCALL hackrf_start_rx(
function hackrf_stop_cmd (line 2304) | static int hackrf_stop_cmd(hackrf_device* device)
function hackrf_stop_rx (line 2319) | int ADDCALL hackrf_stop_rx(hackrf_device* device)
function hackrf_start_tx (line 2331) | int ADDCALL hackrf_start_tx(
function ADDCALL (line 2349) | ADDCALL hackrf_set_tx_block_complete_callback(
function ADDCALL (line 2357) | ADDCALL hackrf_enable_tx_flush(
function ADDCALL (line 2388) | ADDCALL hackrf_disable_tx_flush(hackrf_device* device)
function hackrf_stop_tx (line 2406) | int ADDCALL hackrf_stop_tx(hackrf_device* device)
function hackrf_close (line 2417) | int ADDCALL hackrf_close(hackrf_device* device)
type hackrf_error (line 2453) | enum hackrf_error
type hackrf_board_id (line 2507) | enum hackrf_board_id
function ADDCALL (line 2539) | ADDCALL hackrf_board_id_platform(enum hackrf_board_id board_id)
function ADDAPI (line 2562) | extern ADDAPI const char* ADDCALL hackrf_usb_board_id_name(
type rf_path_filter (line 2583) | enum rf_path_filter
function hackrf_compute_baseband_filter_bw_round_down_lt (line 2598) | uint32_t ADDCALL hackrf_compute_baseband_filter_bw_round_down_lt(
function hackrf_compute_baseband_filter_bw (line 2616) | uint32_t ADDCALL hackrf_compute_baseband_filter_bw(const uint32_t bandwi...
function hackrf_set_hw_sync_mode (line 2637) | int ADDCALL hackrf_set_hw_sync_mode(hackrf_device* device, const uint8_t...
function hackrf_init_sweep (line 2673) | int ADDCALL hackrf_init_sweep(
function hackrf_operacake_valid_address (line 2740) | bool hackrf_operacake_valid_address(uint8_t address)
function hackrf_get_operacake_boards (line 2752) | int ADDCALL hackrf_get_operacake_boards(hackrf_device* device, uint8_t* ...
function hackrf_set_operacake_mode (line 2782) | int ADDCALL hackrf_set_operacake_mode(
function hackrf_get_operacake_mode (line 2821) | int ADDCALL hackrf_get_operacake_mode(
function hackrf_set_operacake_ports (line 2854) | int ADDCALL hackrf_set_operacake_ports(
function hackrf_reset (line 2895) | int ADDCALL hackrf_reset(hackrf_device* device)
function hackrf_set_operacake_ranges (line 2920) | int ADDCALL hackrf_set_operacake_ranges(
function hackrf_set_operacake_freq_ranges (line 2947) | int ADDCALL hackrf_set_operacake_freq_ranges(
function hackrf_set_operacake_dwell_times (line 2991) | int ADDCALL hackrf_set_operacake_dwell_times(
function hackrf_set_clkout_enable (line 3030) | int ADDCALL hackrf_set_clkout_enable(hackrf_device* device, const uint8_...
function hackrf_get_clkin_status (line 3053) | int ADDCALL hackrf_get_clkin_status(hackrf_device* device, uint8_t* status)
function hackrf_operacake_gpio_test (line 3074) | int ADDCALL hackrf_operacake_gpio_test(
function hackrf_cpld_checksum (line 3105) | int ADDCALL hackrf_cpld_checksum(hackrf_device* device, uint32_t* crc)
function hackrf_set_ui_enable (line 3132) | int ADDCALL hackrf_set_ui_enable(hackrf_device* device, const uint8_t va...
function hackrf_start_rx_sweep (line 3155) | int ADDCALL hackrf_start_rx_sweep(
function hackrf_get_transfer_buffer_size (line 3175) | size_t ADDCALL hackrf_get_transfer_buffer_size(hackrf_device* device)
function hackrf_get_transfer_queue_depth (line 3185) | uint32_t ADDCALL hackrf_get_transfer_queue_depth(hackrf_device* device)
function hackrf_board_rev_read (line 3191) | int ADDCALL hackrf_board_rev_read(hackrf_device* device, uint8_t* value)
function ADDAPI (line 3213) | extern ADDAPI const char* ADDCALL hackrf_board_rev_name(enum hackrf_boar...
function hackrf_supported_platform_read (line 3274) | int ADDCALL hackrf_supported_platform_read(hackrf_device* device, uint32...
function hackrf_set_leds (line 3298) | int ADDCALL hackrf_set_leds(hackrf_device* device, const uint8_t state)
function hackrf_set_user_bias_t_opts (line 3320) | int ADDCALL hackrf_set_user_bias_t_opts(
function hackrf_set_p1_ctrl (line 3366) | int ADDCALL hackrf_set_p1_ctrl(hackrf_device* device, const enum p1_ctrl...
function hackrf_set_p2_ctrl (line 3389) | int ADDCALL hackrf_set_p2_ctrl(hackrf_device* device, const enum p2_ctrl...
function hackrf_set_clkin_ctrl (line 3412) | int ADDCALL hackrf_set_clkin_ctrl(
function hackrf_set_narrowband_filter (line 3437) | int ADDCALL hackrf_set_narrowband_filter(hackrf_device* device, const ui...
function hackrf_set_fpga_bitstream (line 3460) | int ADDCALL hackrf_set_fpga_bitstream(hackrf_device* device, const uint8...
function hackrf_radio_read_register (line 3483) | int ADDCALL hackrf_radio_read_register(
function hackrf_radio_write_register (line 3512) | int ADDCALL hackrf_radio_write_register(
FILE: host/libhackrf/src/hackrf.h
type hackrf_error (line 556) | enum hackrf_error {
type hackrf_board_id (line 653) | enum hackrf_board_id {
type hackrf_board_rev (line 705) | enum hackrf_board_rev {
type hackrf_usb_board_id (line 819) | enum hackrf_usb_board_id {
type rf_path_filter (line 845) | enum rf_path_filter {
type operacake_ports (line 864) | enum operacake_ports {
type operacake_switching_mode (line 879) | enum operacake_switching_mode {
type sweep_style (line 902) | enum sweep_style {
type p1_ctrl_signal (line 918) | enum p1_ctrl_signal {
type p2_ctrl_signal (line 934) | enum p2_ctrl_signal {
type clkin_ctrl_signal (line 945) | enum clkin_ctrl_signal {
type hackrf_device (line 954) | typedef struct hackrf_device hackrf_device;
type hackrf_transfer (line 963) | typedef struct {
type read_partid_serialno_t (line 982) | typedef struct {
type hackrf_operacake_dwell_time (line 997) | typedef struct {
type hackrf_operacake_freq_range (line 1012) | typedef struct {
type hackrf_bool_user_settting (line 1031) | typedef struct {
type hackrf_bias_t_user_settting_req (line 1043) | typedef struct {
type hackrf_m0_state (line 1053) | typedef struct {
type hackrf_selftest (line 1082) | typedef struct {
type hackrf_device_list (line 1093) | struct hackrf_device_list {
type hackrf_device_list_t (line 1122) | typedef struct hackrf_device_list hackrf_device_list_t;
type rf_path_filter (line 1780) | enum rf_path_filter
type hackrf_error (line 1898) | enum hackrf_error
type hackrf_board_id (line 1907) | enum hackrf_board_id
type hackrf_board_id (line 1916) | enum hackrf_board_id
type hackrf_usb_board_id (line 1926) | enum hackrf_usb_board_id
type rf_path_filter (line 1934) | enum rf_path_filter
type sweep_style (line 2000) | enum sweep_style
type operacake_switching_mode (line 2030) | enum operacake_switching_mode
type operacake_switching_mode (line 2045) | enum operacake_switching_mode
type hackrf_board_rev (line 2261) | enum hackrf_board_rev
type p1_ctrl_signal (line 2327) | enum p1_ctrl_signal
type p2_ctrl_signal (line 2334) | enum p2_ctrl_signal
type clkin_ctrl_signal (line 2341) | enum clkin_ctrl_signal
Copy disabled (too large)
Download .json
Condensed preview — 448 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (17,883K chars).
[
{
"path": ".clang-format",
"chars": 2302,
"preview": "# clang-format configuration file. Intended for clang-format >= 14.\n#\n# For more information, see:\n#\n# Documentation/p"
},
{
"path": ".gitattributes",
"chars": 30,
"preview": "*.brd linguist-language=KiCad\n"
},
{
"path": ".github/ISSUE_TEMPLATE/bug-report.yml",
"chars": 1085,
"preview": "name: Bug Report \ndescription: Submit a bug report\nlabels: [\"bug report\"]\nbody:\n - type: markdown\n attributes:\n "
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 27,
"preview": "blank_issues_enabled: false"
},
{
"path": ".github/ISSUE_TEMPLATE/documentation-request.yml",
"chars": 463,
"preview": "name: Documentation \ndescription: Make a request regarding HackRF documentation \nlabels: [\"documentation\"]\nbody:\n - typ"
},
{
"path": ".github/ISSUE_TEMPLATE/feature-request.yml",
"chars": 453,
"preview": "name: Feature Request \ndescription: File a feature request\nlabels: [\"enhancement\"]\nbody:\n - type: markdown\n attribut"
},
{
"path": ".github/ISSUE_TEMPLATE/question.yml",
"chars": 648,
"preview": "name: Question \ndescription: Ask a question not covered by current hackrf.rtfd.io documentation \nlabels: [\"question\"]\nb"
},
{
"path": ".github/ISSUE_TEMPLATE/technical-support.yml",
"chars": 1802,
"preview": "name: Technical Support Request\ndescription: File a technical support request\nlabels: [\"technical support\"]\nbody:\n - ty"
},
{
"path": ".github/workflows/build.yml",
"chars": 7764,
"preview": "name: Build\n\non:\n push:\n pull_request:\n\n # Run automatically every monday\n schedule:\n - cron: 1 12 * * 1\n\nenv:\n\n "
},
{
"path": ".github/workflows/clang-format-check.yml",
"chars": 721,
"preview": "name: Check code style\non: [push, pull_request]\njobs:\n formatting-check:\n name: clang-format\n runs-on: ubuntu-lat"
},
{
"path": ".gitignore",
"chars": 1418,
"preview": "# Compiled output\n*.bin\n*.d\n*.elf\n*.hex\n*.srec\nhost/build/\nhost/**/build\ninstall/\n\n# Operating system spew\n.DS_Store\n.Sp"
},
{
"path": ".gitmodules",
"chars": 242,
"preview": "[submodule \"firmware/libopencm3\"]\n\tpath = firmware/libopencm3\n\turl = https://github.com/mossmann/libopencm3.git\n[submodu"
},
{
"path": ".readthedocs.yaml",
"chars": 462,
"preview": "# .readthedocs.yaml\n# Read the Docs configuration file\n# See https://docs.readthedocs.io/en/stable/config-file/v2.html f"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 5232,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participa"
},
{
"path": "COPYING",
"chars": 17962,
"preview": "\t\t GNU GENERAL PUBLIC LICENSE\n\t\t Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc."
},
{
"path": "Dockerfile",
"chars": 1223,
"preview": "# Environment for HackRF HIL testing with Jenkins CI\nFROM ubuntu:22.04\nUSER root\n\n# Copy usb hub script from Jenkins' co"
},
{
"path": "Jenkinsfile",
"chars": 15428,
"preview": "import org.jenkinsci.plugins.workflow.steps.FlowInterruptedException\n\npipeline {\n agent any\n stages {\n stag"
},
{
"path": "Readme.md",
"chars": 2458,
"preview": "# HackRF\n\nThis repository contains hardware designs and software for HackRF,\na low cost, open source Software Defined Ra"
},
{
"path": "TRADEMARK",
"chars": 245,
"preview": "\"HackRF\" is a trademark of Great Scott Gadgets. Permission to use the trademark\nwith attribution to Great Scott Gadgets"
},
{
"path": "ci-scripts/build_h1_firmware.sh",
"chars": 126,
"preview": "#!/bin/bash\nset -e\ngit submodule init\ngit submodule update\ncd firmware/hackrf_usb\ncmake -B build\ncmake --build build\ncd "
},
{
"path": "ci-scripts/build_hpro_firmware.sh",
"chars": 142,
"preview": "#!/bin/bash\nset -e\ngit submodule init\ngit submodule update\ncd firmware/hackrf_usb\ncmake -DBOARD=PRALINE -B build\ncmake -"
},
{
"path": "ci-scripts/hackrf_pro_test.py",
"chars": 72105,
"preview": "#!/usr/bin/env python3\n\nimport sys\nimport subprocess\nimport time\nimport os, shutil\nimport usb\nfrom datetime import datet"
},
{
"path": "ci-scripts/hackrf_test.py",
"chars": 59591,
"preview": "#!/usr/bin/env python3\n\nimport sys\nimport subprocess\nimport time\nimport os, shutil\nimport usb\nfrom datetime import datet"
},
{
"path": "ci-scripts/install_host.sh",
"chars": 68,
"preview": "#!/bin/bash\nset -e\ncd host\ncmake -B build\ncmake --build build\ncd ..\n"
},
{
"path": "ci-scripts/test-debug.py",
"chars": 928,
"preview": "#!/usr/bin/python3\nimport sys\nimport subprocess\n\nPASS, FAIL = range(2)\nEUT = \"RunningFromRAM\"\n\n\ndef check_debug"
},
{
"path": "ci-scripts/test-firmware-flash.sh",
"chars": 456,
"preview": "#!/bin/bash\nhost/build/hackrf-tools/src/hackrf_spiflash -w firmware/hackrf_usb/build/hackrf_usb.bin\nEXIT_CODE=\"$?\"\nif [ "
},
{
"path": "ci-scripts/test-firmware-program.sh",
"chars": 507,
"preview": "#!/bin/bash\ndfu-util --device 1fc9:000c --alt 0 --download firmware/hackrf_usb/build/hackrf_usb.dfu\nsleep 1s\nEXIT_CODE=\""
},
{
"path": "ci-scripts/test-transfer.py",
"chars": 4786,
"preview": "#!/usr/bin/python3\nimport subprocess\nimport time\nimport sys\nfrom os import environ\n\nEUT = environ.get('EUT')\nTESTER "
},
{
"path": "ci-scripts/test_host.sh",
"chars": 463,
"preview": "#!/bin/bash\nhost/build/hackrf-tools/src/hackrf_info\nEXIT_CODE=\"$?\"\nif [ \"$EXIT_CODE\" == \"1\" ]\nthen\n echo \"Host tool i"
},
{
"path": "ci-scripts/test_sgpio_debug.py",
"chars": 3350,
"preview": "#!/usr/bin/python3\nimport os\nimport sys\nimport subprocess\nfrom pathlib import Path\n\nFILENAME = f\"/tmp/rx_100kB_{str(os.g"
},
{
"path": "docs/.readthedocs.yaml",
"chars": 147,
"preview": "build:\n os: \"ubuntu-20.04\"\n tools: \n python: \"3.9\"\n\nsphinx:\n configuration: conf.py\n\npython: \n install:\n - req"
},
{
"path": "docs/Makefile",
"chars": 584,
"preview": "# Minimal makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS =\nSPHI"
},
{
"path": "docs/doxygen/Doxyfile",
"chars": 116446,
"preview": "# Doxyfile 1.9.1\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org) "
},
{
"path": "docs/make.bat",
"chars": 791,
"preview": "@ECHO OFF\r\n\r\npushd %~dp0\r\n\r\nREM Command file for Sphinx documentation\r\n\r\nif \"%SPHINXBUILD%\" == \"\" (\r\n\tset SPHINXBUILD=sp"
},
{
"path": "docs/requirements.txt",
"chars": 85,
"preview": "sphinx==7.2.6\nsphinx_rtd_theme==2.0.0\nreadthedocs-sphinx-search==0.3.2\njinja2==3.1.6\n"
},
{
"path": "docs/source/LPC43XX_Debugging.rst",
"chars": 6375,
"preview": "================================================\nLPC43xx Debugging\n================================================\n\nVar"
},
{
"path": "docs/source/LPC43XX_SGPIO_Configuration.rst",
"chars": 3369,
"preview": "================================================\nLPC43xx SGPIO Configuration\n==========================================="
},
{
"path": "docs/source/conf.py",
"chars": 768,
"preview": "import sphinx_rtd_theme\n\nextensions = [\n 'sphinx_rtd_theme'\n]\n\n# -- Project information -----------------------------"
},
{
"path": "docs/source/enclosure_options.rst",
"chars": 846,
"preview": "Enclosure Options\n~~~~~~~~~~~~~~~~~\n\nCommercial versions of both HackRF Pro and HackRF One from Great Scott Gadgets ship"
},
{
"path": "docs/source/expansion_interface.rst",
"chars": 3606,
"preview": "Expansion Interface\n~~~~~~~~~~~~~~~~~~~\n\nThe common HackRF expansion interface consists of headers P20, P22, and P28. Th"
},
{
"path": "docs/source/external_clock_interface.rst",
"chars": 1362,
"preview": "========================\nExternal Clock Interface\n========================\n\n.. _external_clock_interface:\n\nHackRF Pro\n~~"
},
{
"path": "docs/source/firmware_development_setup.rst",
"chars": 359,
"preview": "================================================\nFirmware Development Setup\n============================================"
},
{
"path": "docs/source/getting_help.rst",
"chars": 1105,
"preview": "============\nGetting Help\n============\n\nBefore asking for help with HackRF, check to see if your question is answered in"
},
{
"path": "docs/source/hackrf_connectors.rst",
"chars": 443,
"preview": "==========\nConnectors\n==========\n\nThe connectors on both HackRF Pro and HackRF One are SMA.\n\n**Note:** SMA connectors an"
},
{
"path": "docs/source/hackrf_minimum_requirements.rst",
"chars": 1044,
"preview": "============================================\nMinimum Host System Requirements for HackRF\n==============================="
},
{
"path": "docs/source/hackrf_one.rst",
"chars": 4060,
"preview": "================================================\nHackRF One\n================================================\n\n.. _hackrf"
},
{
"path": "docs/source/hackrf_pro.rst",
"chars": 2237,
"preview": "================================================\nHackRF Pro\n================================================\n\n.. image::"
},
{
"path": "docs/source/hackrf_projects_mentions.rst",
"chars": 1066,
"preview": "================================================\nHackRF Community Projects and Mentions\n================================"
},
{
"path": "docs/source/hackrf_tools.rst",
"chars": 3601,
"preview": "============\nHackRF Tools\n============\n\nGreat Scott Gadgets provides some commandline tools for interacting with HackRF."
},
{
"path": "docs/source/hackrfs_buttons.rst",
"chars": 736,
"preview": "=======\nButtons\n=======\n\nThis information is applicable to both HackRF Pro and HackRF One.\n\nThe **RESET button** resets "
},
{
"path": "docs/source/hardware_components.rst",
"chars": 3590,
"preview": "================================================\nHardware Components\n================================================\n\nB"
},
{
"path": "docs/source/hardware_triggering.rst",
"chars": 4357,
"preview": ".. _hardware_triggering:\n\n===================\nHardware Triggering\n===================\n\nHackRF transmit and receive opera"
},
{
"path": "docs/source/index.rst",
"chars": 1267,
"preview": "==================================\nWelcome to HackRF's documentation!\n==================================\n\n.. toctree::\n "
},
{
"path": "docs/source/installing_hackrf_software.rst",
"chars": 3423,
"preview": ".. _operating_system_tips:\n\n==========================\nInstalling HackRF Software\n==========================\n\nHackRF sof"
},
{
"path": "docs/source/jawbreaker.rst",
"chars": 11445,
"preview": "==========\nJawbreaker\n==========\n\nHackRF Jawbreaker is the beta test hardware platform for the HackRF project.\n\n\n.. imag"
},
{
"path": "docs/source/leds.rst",
"chars": 1165,
"preview": "====\nLEDs\n====\n\nHackRF Pro\n~~~~~~~~~~\n\nWhen HackRF Pro is plugged in to a USB host, four LEDs should turn on: MCU, FPGA,"
},
{
"path": "docs/source/list_of_hardware_revisions.rst",
"chars": 1996,
"preview": "================================================\nHardware Revisions\n================================================\n\nHa"
},
{
"path": "docs/source/opera_cake.rst",
"chars": 1246,
"preview": "==========\nOpera Cake\n==========\n\n.. image:: ../images/operacake.jpeg\n :alt: Opera Cake \n\nOpera Cake is an antenna swit"
},
{
"path": "docs/source/opera_cake_board_addressing.rst",
"chars": 1272,
"preview": "================\nBoard Addressing\n================\n\nEach Opera Cake has a numeric address set by optional jumpers instal"
},
{
"path": "docs/source/opera_cake_faq.rst",
"chars": 597,
"preview": "=====================================\nFrequently Asked Questions\n=====================================\n\nWhy the name 'Op"
},
{
"path": "docs/source/opera_cake_hardware.rst",
"chars": 937,
"preview": "========\nHardware\n========\n\nBlock Diagram\n~~~~~~~~~~~~~\n\n.. image:: ../images/operacake-block-diagram.png\n :alt: Opera "
},
{
"path": "docs/source/opera_cake_modes_of_operation.rst",
"chars": 3470,
"preview": "==================\nModes of Operation\n==================\n\nOpera Cake supports three modes of operation: ``manual``, ``fr"
},
{
"path": "docs/source/opera_cake_port_configuration.rst",
"chars": 596,
"preview": ".. _portconfiguration:\n\n===================\nPort Configurations\n===================\n\nPort connections may be configured "
},
{
"path": "docs/source/rad1o.rst",
"chars": 625,
"preview": "=====\nrad1o\n=====\n\nrad1o is the badge from the 2015 Chaos Communication Camp.\n\nThe rad1o badge contains a full-featured "
},
{
"path": "docs/source/rf_shield_installation.rst",
"chars": 3696,
"preview": "===============================================\nRF Shield Installation Instructions\n===================================="
},
{
"path": "docs/source/sampling_rate.rst",
"chars": 1410,
"preview": "Sampling Rate and Baseband Filters\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nUsing a sampling rate of less than 8MHz is not re"
},
{
"path": "docs/source/setting_gain.rst",
"chars": 1706,
"preview": "============================\nSetting Gain Controls for RX\n============================\n\nGain controls\n~~~~~~~~~~~~~\n\nHac"
},
{
"path": "docs/source/software_support.rst",
"chars": 2075,
"preview": "===========================================\nThird-Party Software Compatible With HackRF\n================================"
},
{
"path": "docs/source/synchronization_checklist.rst",
"chars": 3863,
"preview": ".. _synchronization_checklist:\n\n================================================\nSynchronization Checklist\n============="
},
{
"path": "docs/source/troubleshooting.rst",
"chars": 4891,
"preview": ".. _troubleshooting:\n\n================================================\nTroubleshooting\n================================="
},
{
"path": "docs/source/updating_firmware.rst",
"chars": 5179,
"preview": ".. _updating_firmware:\n\n================================================\nUpdating Firmware\n============================="
},
{
"path": "docs/source/usb_cables.rst",
"chars": 1964,
"preview": "==========\nUSB Cables\n==========\n\nThe USB cable you choose can make a big difference in what you see when using your Hac"
},
{
"path": "docs/source/virtual_machines.rst",
"chars": 292,
"preview": "================\nVirtual Machines\n================\n\nHackRF requires the ability to stream data at very high rates over U"
},
{
"path": "firmware/.gitignore",
"chars": 52,
"preview": "*.bin\n*.d\n*.elf\n*.hex\n*.list\n*.map\n*.o\n*.srec\n*.dfu\n"
},
{
"path": "firmware/CMakeLists.txt",
"chars": 1027,
"preview": "# Copyright 2012 Jared Boone <jared@sharebrained.com>\n#\n# This file is part of HackRF.\n#\n# This program is free software"
},
{
"path": "firmware/README",
"chars": 2270,
"preview": "The primary firmware source code for USB HackRF devices is hackrf_usb. Most of\nthe other directories contain firmware s"
},
{
"path": "firmware/appveyor.sh",
"chars": 306,
"preview": "#!/bin/sh\n\n/usr/bin/env python -m ensurepip\n/usr/bin/env python -m pip install pyyaml\n\ncd firmware/libopencm3\nexport SRC"
},
{
"path": "firmware/blinky/CMakeLists.txt",
"chars": 1037,
"preview": "# Copyright 2012 Michael Ossmann <mike@ossmann.com>\n# Copyright 2012 Jared Boone <jared@sharebrained.com>\n#\n# This file "
},
{
"path": "firmware/blinky/README",
"chars": 74,
"preview": "This is the simplest example firmware for HackRF. It flashes three LEDs.\n"
},
{
"path": "firmware/blinky/blinky.c",
"chars": 1377,
"preview": "/*\n * Copyright 2010-2017 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This"
},
{
"path": "firmware/common/LPC4320_M4_memory.ld",
"chars": 1287,
"preview": "/*\n * Copyright 2012-2014 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/LPC4330_M4_memory.ld",
"chars": 1293,
"preview": "/*\n * Copyright 2012-2017 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/LPC43xx_M0_memory.ld",
"chars": 946,
"preview": "/*\n * Copyright 2012-2014 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/LPC43xx_M4_M0_image_from_text.ld",
"chars": 1016,
"preview": "/*\n * Copyright 2012-2021 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/LPC43xx_M4_memory.ld",
"chars": 1760,
"preview": "/*\n * Copyright 2012-2021 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/LPC43xx_M4_memory_rom_only.ld",
"chars": 1025,
"preview": "/*\n * Copyright 2012-2025 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/README",
"chars": 83,
"preview": "This directory contains things shared by multiple HackRF firmware\nimplementations.\n"
},
{
"path": "firmware/common/adc.c",
"chars": 1345,
"preview": "/*\n * Copyright 2025 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/adc.h",
"chars": 960,
"preview": "/*\n * Copyright 2025 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/bitband.c",
"chars": 2040,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/bitband.h",
"chars": 1408,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/clkin.c",
"chars": 3741,
"preview": "/*\n * Copyright 2022 Great Scott Gadgets\n *\n * This file is part of HackRF.\n *\n * This program is free software; you can"
},
{
"path": "firmware/common/clkin.h",
"chars": 946,
"preview": "/*\n * Copyright 2022 Great Scott Gadgets\n *\n * This file is part of HackRF.\n *\n * This program is free software; you can"
},
{
"path": "firmware/common/configure_file.cmake",
"chars": 40,
"preview": "configure_file(\n ${SRC}\n ${DEST}\n)"
},
{
"path": "firmware/common/cpld_jtag.c",
"chars": 3024,
"preview": "/*\n * Copyright 2013-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This"
},
{
"path": "firmware/common/cpld_jtag.h",
"chars": 1809,
"preview": "/*\n * Copyright 2013-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This"
},
{
"path": "firmware/common/cpld_xc2c.c",
"chars": 14141,
"preview": "/*\n * Copyright 2019-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2019 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/cpld_xc2c.h",
"chars": 2294,
"preview": "/*\n * Copyright 2019-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2019 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/crc.c",
"chars": 1640,
"preview": "/*\n * Copyright 2019-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2019 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/crc.h",
"chars": 1266,
"preview": "/*\n * Copyright 2019-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2019 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/delay.c",
"chars": 1651,
"preview": "/*\n * Copyright 2026 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/delay.h",
"chars": 1031,
"preview": "/*\n * Copyright 2026 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/fault_handler.c",
"chars": 2324,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/fault_handler.h",
"chars": 2383,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/firmware_info.c",
"chars": 1645,
"preview": "/*\n * Copyright 2022 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/firmware_info.h",
"chars": 1167,
"preview": "/*\n * Copyright 2022 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/fixed_point.h",
"chars": 1112,
"preview": "/*\n * Copyright 2026 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/fpga.c",
"chars": 3680,
"preview": "/*\n * Copyright 2025 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/fpga.h",
"chars": 3450,
"preview": "/*\n * Copyright 2025 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/fpga_image.c",
"chars": 3052,
"preview": "/*\n * Copyright 2025 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/fpga_regs.def",
"chars": 2630,
"preview": "/* -*- mode: c -*-\n *\n * Copyright 2012 Michael Ossmann\n * Copyright 2025 Great Scott Gadgets <info@greatscottgadgets.co"
},
{
"path": "firmware/common/fpga_selftest.c",
"chars": 9214,
"preview": "/*\n * Copyright 2025 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/gpdma.c",
"chars": 2194,
"preview": "/*\n * Copyright 2013-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2013 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/gpdma.h",
"chars": 1534,
"preview": "/*\n * Copyright 2013-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2013 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/gpio.h",
"chars": 1268,
"preview": "/*\n * Copyright 2014-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright (C) 2014 Jared Boone, ShareBrain"
},
{
"path": "firmware/common/gpio_lpc.c",
"chars": 1494,
"preview": "/*\n * Copyright 2014-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright (C) 2014 Jared Boone, ShareBrain"
},
{
"path": "firmware/common/gpio_lpc.h",
"chars": 2377,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright (C) 2014 Jared Boone, ShareBrain"
},
{
"path": "firmware/common/hackrf_core.c",
"chars": 35270,
"preview": "/*\n * Copyright 2012-2026 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/hackrf_core.h",
"chars": 18304,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Benjamin Vernoux <titanmkd@"
},
{
"path": "firmware/common/hackrf_ui.c",
"chars": 3730,
"preview": "/*\n * Copyright 2019-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright (C) 2019 Jared Boone, ShareBrain"
},
{
"path": "firmware/common/hackrf_ui.h",
"chars": 3053,
"preview": "/*\n * Copyright 2018-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright (C) 2018 Jared Boone, ShareBrain"
},
{
"path": "firmware/common/i2c_bus.c",
"chars": 1334,
"preview": "/*\n * Copyright 2014-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright (C) 2014 Jared Boone, ShareBrain"
},
{
"path": "firmware/common/i2c_bus.h",
"chars": 1681,
"preview": "/*\n * Copyright 2014-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright (C) 2014 Jared Boone, ShareBrain"
},
{
"path": "firmware/common/i2c_lpc.c",
"chars": 2346,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/i2c_lpc.h",
"chars": 1516,
"preview": "/*\n * Copyright 2014-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright (C) 2014 Jared Boone, ShareBrain"
},
{
"path": "firmware/common/ice40_spi.c",
"chars": 3709,
"preview": "/*\n * Copyright 2024 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/ice40_spi.h",
"chars": 1512,
"preview": "/*\n * Copyright 2024 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/locking.h",
"chars": 1724,
"preview": "/*\n * Copyright 2024 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/lz4_blk.c",
"chars": 2432,
"preview": "/*\n * Copyright 2024 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/lz4_blk.h",
"chars": 991,
"preview": "/*\n * Copyright 2024 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/lz4_buf.h",
"chars": 1181,
"preview": "/*\n * Copyright 2026 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/m0_bin.s.cmake",
"chars": 844,
"preview": "# Copyright 2013 Jared Boone <jared@sharebrained.com>\n#\n# This file is part of HackRF.\n#\n# This program is free software"
},
{
"path": "firmware/common/m0_sleep.c",
"chars": 922,
"preview": "/*\n * Copyright 2013-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2013 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/m0_state.c",
"chars": 1419,
"preview": "/*\n * Copyright 2025 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/m0_state.h",
"chars": 1701,
"preview": "/*\n * Copyright 2025 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/max2831.c",
"chars": 11449,
"preview": "/*\n * Copyright 2025 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/max2831.h",
"chars": 3823,
"preview": "/*\n * Copyright 2025 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/max2831_regs.def",
"chars": 3997,
"preview": "/* -*- mode: c -*- */\n\n#ifndef __MAX2831_REGS_DEF\n#define __MAX2831_REGS_DEF\n\n/* Generate static inline accessors that o"
},
{
"path": "firmware/common/max2831_target.c",
"chars": 3441,
"preview": "/*\n * Copyright 2025 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/max2831_target.h",
"chars": 1081,
"preview": "/*\n * Copyright 2025 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/max2837.c",
"chars": 10135,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Will Code <willcode4@gmail."
},
{
"path": "firmware/common/max2837.h",
"chars": 3359,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Will Code <willcode4@gmail."
},
{
"path": "firmware/common/max2837_regs.def",
"chars": 16304,
"preview": "/* -*- mode: c -*- */\n\n#ifndef __MAX2837_REGS_DEF\n#define __MAX2837_REGS_DEF\n\n/* Generate static inline accessors that o"
},
{
"path": "firmware/common/max2837_target.c",
"chars": 3064,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Will Code <willcode4@gmail."
},
{
"path": "firmware/common/max2837_target.h",
"chars": 1191,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Will Code <willcode4@gmail."
},
{
"path": "firmware/common/max2839.c",
"chars": 11586,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Will Code <willcode4@gmail."
},
{
"path": "firmware/common/max2839.h",
"chars": 3397,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Will Code <willcode4@gmail."
},
{
"path": "firmware/common/max2839_regs.def",
"chars": 8186,
"preview": "/* -*- mode: c -*- */\n\n#ifndef __MAX2839_REGS_DEF\n#define __MAX2839_REGS_DEF\n\n/* Generate static inline accessors that o"
},
{
"path": "firmware/common/max2839_target.c",
"chars": 3337,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets\n * Copyright 2014 Jared Boone <jared@sharebrained.com>\n * Copyright 2012 W"
},
{
"path": "firmware/common/max2839_target.h",
"chars": 1162,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets\n * Copyright 2014 Jared Boone <jared@sharebrained.com>\n * Copyright 2012 W"
},
{
"path": "firmware/common/max283x.c",
"chars": 10578,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Will Code <willcode4@gmail."
},
{
"path": "firmware/common/max283x.h",
"chars": 4127,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Will Code <willcode4@gmail."
},
{
"path": "firmware/common/max2871.c",
"chars": 6200,
"preview": "/*\n * Copyright 2015-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This"
},
{
"path": "firmware/common/max2871.h",
"chars": 1343,
"preview": "/*\n * Copyright 2017 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/max2871_regs.c",
"chars": 5728,
"preview": "/*\n * Copyright 2015-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This"
},
{
"path": "firmware/common/max2871_regs.h",
"chars": 2641,
"preview": "/*\n * Copyright 2015-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This"
},
{
"path": "firmware/common/max5864.c",
"chars": 2496,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/max5864.h",
"chars": 1496,
"preview": "/*\n * Copyright 2012-2014 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/max5864_target.c",
"chars": 1519,
"preview": "/*\n * Copyright 2014-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright (C) 2014 Jared Boone, ShareBrain"
},
{
"path": "firmware/common/max5864_target.h",
"chars": 1068,
"preview": "/*\n * Copyright 2014-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright (C) 2014 Jared Boone, ShareBrain"
},
{
"path": "firmware/common/mixer.c",
"chars": 4090,
"preview": "/*\n * Copyright 2017-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This"
},
{
"path": "firmware/common/mixer.h",
"chars": 1587,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2014 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/operacake.c",
"chars": 12061,
"preview": "/*\n * Copyright 2016-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2016 Dominic Spill <dominicgs@gm"
},
{
"path": "firmware/common/operacake.h",
"chars": 1808,
"preview": "/*\n * Copyright 2016-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2016 Dominic Spill <dominicgs@gm"
},
{
"path": "firmware/common/operacake_sctimer.c",
"chars": 7235,
"preview": "/*\n * Copyright 2017-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2018 Schuyler St. Leger\n *\n * Th"
},
{
"path": "firmware/common/operacake_sctimer.h",
"chars": 1371,
"preview": "/*\n * Copyright 2016-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2016 Dominic Spill <dominicgs@gm"
},
{
"path": "firmware/common/platform_detect.c",
"chars": 9340,
"preview": "/*\n * Copyright 2022 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/platform_detect.h",
"chars": 2585,
"preview": "/*\n * Copyright 2022-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This"
},
{
"path": "firmware/common/portapack.c",
"chars": 18163,
"preview": "/*\n * Copyright 2018-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2018 Jared Boone\n *\n * This file"
},
{
"path": "firmware/common/portapack.h",
"chars": 2341,
"preview": "/*\n * Copyright 2018-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2018 Jared Boone\n *\n * This file"
},
{
"path": "firmware/common/rad1o/decoder.c",
"chars": 2718,
"preview": "#include \"fonts.h\"\n#include \"render.h\"\n\n#include <stdint.h>\n\n// Local function: Get next nibble.\nstatic int ctr = 0; //"
},
{
"path": "firmware/common/rad1o/decoder.h",
"chars": 143,
"preview": "#ifndef __RAD1O_DECODER_H__\n#define __RAD1O_DECODER_H__\n\n#include <stdint.h>\n\nuint8_t* rad1o_pk_decode(const uint8_t* da"
},
{
"path": "firmware/common/rad1o/display.c",
"chars": 3893,
"preview": "#include \"display.h\"\n\n#include \"gpio_lpc.h\"\n#include \"hackrf_core.h\"\n#include \"delay.h\"\n\n#include <libopencm3/lpc43xx/sc"
},
{
"path": "firmware/common/rad1o/display.h",
"chars": 676,
"preview": "#ifndef __RAD1O_DISPLAY_H__\n#define __RAD1O_DISPLAY_H__\n\n#include <libopencm3/cm3/common.h>\n\n#include <stdint.h>\n\n#defin"
},
{
"path": "firmware/common/rad1o/draw.c",
"chars": 564,
"preview": "#include \"display.h\"\n\n#include <stdint.h>\n\n#define SWAP(p1, p2) \\\n\tdo { \\\n\t\tuint8_t "
},
{
"path": "firmware/common/rad1o/draw.h",
"chars": 224,
"preview": "#ifndef __RAD1O_DRAW_H__\n#define __RAD1O_DRAW_H__\n\n#include <stdint.h>\n\nvoid rad1o_drawHLine(uint8_t y, uint8_t x1, uint"
},
{
"path": "firmware/common/rad1o/fonts.h",
"chars": 1077,
"preview": "#ifndef __RAD1O_FONTS_H__\n#define __RAD1O_FONTS_H__\n\n#include <stdint.h>\n\n/* Partially based on original code for the KS"
},
{
"path": "firmware/common/rad1o/print.c",
"chars": 569,
"preview": "#include \"print.h\"\n#include \"display.h\"\n#include \"fonts.h\"\n#include \"render.h\"\n#include \"smallfonts.h\"\n\nstatic int32_t x"
},
{
"path": "firmware/common/rad1o/print.h",
"chars": 301,
"preview": "#ifndef __RAD1O_PRINT_H__\n#define __RAD1O_PRINT_H__\n\n#include <stdint.h>\n\nvoid rad1o_lcdPrint(const char* string);\nvoid "
},
{
"path": "firmware/common/rad1o/render.c",
"chars": 3750,
"preview": "#include \"render.h\"\n#include \"decoder.h\"\n#include \"display.h\"\n#include \"fonts.h\"\n#include \"smallfonts.h\"\n\n#include <stri"
},
{
"path": "firmware/common/rad1o/render.h",
"chars": 292,
"preview": "#ifndef __RENDER_H_\n#define __RENDER_H_\n\n#include \"fonts.h\"\n\nvoid rad1o_setTextColor(uint8_t bg, uint8_t fg);\nvoid rad1o"
},
{
"path": "firmware/common/rad1o/smallfonts.c",
"chars": 6212,
"preview": "/* Partially based on original code for the KS0108 by Stephane Rey */\n\n/************************************************"
},
{
"path": "firmware/common/rad1o/smallfonts.h",
"chars": 2174,
"preview": "/**************************************************************************/\n/*! \n @file smallfonts.h\n @author"
},
{
"path": "firmware/common/rad1o/ubuntu18.c",
"chars": 56514,
"preview": "#include \"ubuntu18.h\"\n\n/* Font data for Ubuntu Regular 18pt */\n\n/* Copyright 2010 Canonical Ltd. Licensed under the Ubu"
},
{
"path": "firmware/common/rad1o/ubuntu18.h",
"chars": 132,
"preview": "#ifndef __RAD1O_UBUNTU18_H__\n#define __RAD1O_UBUNTU18_H__\n#include \"fonts.h\"\n\nextern const struct FONT_DEF Font_Ubuntu18"
},
{
"path": "firmware/common/radio.c",
"chars": 21061,
"preview": "/*\n * Copyright 2025-2026 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This"
},
{
"path": "firmware/common/radio.h",
"chars": 6939,
"preview": "/*\n * Copyright 2012-2026 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone\n * Copyright 20"
},
{
"path": "firmware/common/rf_path.c",
"chars": 18881,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone\n * Copyright 20"
},
{
"path": "firmware/common/rf_path.h",
"chars": 2548,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone\n * Copyright 20"
},
{
"path": "firmware/common/rffc5071.c",
"chars": 11085,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2014 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/rffc5071.h",
"chars": 2610,
"preview": "/*\n * Copyright 2012-2014 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2014 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/rffc5071_regs.def",
"chars": 7752,
"preview": "/* -*- mode: c -*-\n *\n * Copyright 2012 Michael Ossmann\n *\n * This file is part of HackRF.\n *\n * This program is free so"
},
{
"path": "firmware/common/rffc5071_spi.c",
"chars": 5209,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2014 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/rffc5071_spi.h",
"chars": 1460,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2014 Jared Boone <jared@sharebra"
},
{
"path": "firmware/common/rom_iap.c",
"chars": 3443,
"preview": "/*\n * Copyright 2013-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2013 Benjamin Vernoux <titanmkd@"
},
{
"path": "firmware/common/rom_iap.h",
"chars": 5562,
"preview": "/*\n * Copyright 2013-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2013 Benjamin Vernoux <titanmkd@"
},
{
"path": "firmware/common/sct.h",
"chars": 117697,
"preview": "/*\n * Copyright 2017-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This"
},
{
"path": "firmware/common/selftest.c",
"chars": 872,
"preview": "/*\n * Copyright 2025 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/selftest.h",
"chars": 1929,
"preview": "/*\n * Copyright 2025 Great Scott Gadgets <info@greatscottgadgets.com>\n *\n * This file is part of HackRF.\n *\n * This prog"
},
{
"path": "firmware/common/sgpio.c",
"chars": 12966,
"preview": "/*\n * Copyright 2012-2022 Great Scott Gadgets <info@greatscottgadgets.com>\n * Copyright 2012 Jared Boone <jared@sharebra"
}
]
// ... and 248 more files (download for full content)
About this extraction
This page contains the full source code of the greatscottgadgets/hackrf GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 448 files (16.3 MB), approximately 4.3M tokens, and a symbol index with 1733 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.