Move transceiver_mode_t to own header file

This commit is contained in:
Michael Ossmann 2026-04-08 20:55:20 -04:00
parent caa47500c5
commit 3f51f407fa
11 changed files with 45 additions and 11 deletions

View file

@ -23,6 +23,7 @@
#include <stddef.h>
#include "hackrf_ui.h"
#include "transceiver_mode.h"
#if defined(PRALINE) || defined(HACKRF_ONE)
#include "ui_portapack.h"
#endif

View file

@ -27,6 +27,7 @@
#include "radio.h"
#include "rf_path.h"
#include "transceiver_mode.h"
typedef void (*hackrf_ui_init_fn)(void);
typedef void (*hackrf_ui_deinit_fn)(void);

View file

@ -19,6 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
#include "radio.h"
#include <string.h>
#include <libopencm3/cm3/nvic.h>
@ -28,8 +30,8 @@
#include "hackrf_ui.h"
#include "max283x.h"
#include "platform_detect.h"
#include "radio.h"
#include "rf_path.h"
#include "transceiver_mode.h"
#include "tuning.h"
#if defined(PRALINE)
#include "fpga.h"

View file

@ -27,6 +27,7 @@
#include <stdint.h>
#include "fixed_point.h"
#include "transceiver_mode.h"
typedef enum {
RADIO_OK = 1,
@ -60,15 +61,6 @@ typedef enum {
CLOCK_SOURCE_PORTAPACK = 2,
} clock_source_t;
typedef enum {
TRANSCEIVER_MODE_OFF = 0,
TRANSCEIVER_MODE_RX = 1,
TRANSCEIVER_MODE_TX = 2,
TRANSCEIVER_MODE_SS = 3,
TRANSCEIVER_MODE_CPLD_UPDATE = 4,
TRANSCEIVER_MODE_RX_SWEEP = 5,
} transceiver_mode_t;
/**
* Configurable registers stored as uint64_t. Any register may be set to
* RADIO_UNSET. When not RADIO_UNSET, some registers are read as a specific type

View file

@ -0,0 +1,33 @@
/*
* Copyright 2012-2026 Great Scott Gadgets <info@greatscottgadgets.com>
* Copyright 2012 Jared Boone
* Copyright 2013 Benjamin Vernoux
*
* This file is part of HackRF.
*
* 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, 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; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#pragma once
typedef enum {
TRANSCEIVER_MODE_OFF = 0,
TRANSCEIVER_MODE_RX = 1,
TRANSCEIVER_MODE_TX = 2,
TRANSCEIVER_MODE_SS = 3,
TRANSCEIVER_MODE_CPLD_UPDATE = 4,
TRANSCEIVER_MODE_RX_SWEEP = 5,
} transceiver_mode_t;

View file

@ -29,6 +29,7 @@
#include "portapack.h"
#include "radio.h"
#include "rf_path.h"
#include "transceiver_mode.h"
/* Pixel data within a font or bitmap byte is "reversed": LSB is left-most pixel. */

View file

@ -29,6 +29,7 @@
#include "hackrf_core.h"
#include "radio.h"
#include "rf_path.h"
#include "transceiver_mode.h"
#include "rad1o/display.h"
#include "rad1o/draw.h"

View file

@ -39,6 +39,7 @@
#include <rf_path.h>
#include <rom_iap.h>
#include <selftest.h>
#include <transceiver_mode.h>
#include <usb.h>
#include <usb_queue.h>
#include <usb_request.h>

View file

@ -30,6 +30,7 @@
#include <m0_state.h>
#include <radio.h>
#include <streaming.h>
#include <transceiver_mode.h>
#include <usb_queue.h>
#include <usb_request.h>
#include <usb_type.h>

View file

@ -33,6 +33,7 @@
#include <operacake_sctimer.h>
#include <radio.h>
#include <streaming.h>
#include <transceiver_mode.h>
#include <usb.h>
#include <usb_queue.h>
#include <usb_request.h>

View file

@ -25,7 +25,7 @@
#include <stdint.h>
#include <radio.h>
#include <transceiver_mode.h>
#include <usb_type.h>
#include <usb_request.h>