Remove unused includes and avoid transitive dependencies.
This commit is contained in:
parent
a8661eef4a
commit
b49f1df956
124 changed files with 568 additions and 344 deletions
|
|
@ -19,10 +19,13 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "adc.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <libopencm3/lpc43xx/adc.h>
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
|
||||
#include "adc.h"
|
||||
|
||||
uint16_t adc_read(uint8_t pin)
|
||||
{
|
||||
bool alt_pin = (pin & 0x80);
|
||||
|
|
|
|||
|
|
@ -19,12 +19,17 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "gpdma.h"
|
||||
#include "clkin.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <libopencm3/lpc43xx/timer.h>
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#include <libopencm3/lpc43xx/gima.h>
|
||||
#include <libopencm3/lpc43xx/gpdma.h>
|
||||
#include <libopencm3/lpc43xx/creg.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "gpdma.h"
|
||||
|
||||
#define CLOCK_CYCLES_1_MS (204000)
|
||||
#define MEASUREMENT_WINDOW_MS (50)
|
||||
|
|
|
|||
|
|
@ -19,11 +19,14 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#if !defined(PRALINE)
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "cpld_jtag.h"
|
||||
#include "hackrf_core.h"
|
||||
#include "xapp058/micro.h"
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#include <stdint.h>
|
||||
#if !defined(PRALINE)
|
||||
#include "xapp058/micro.h"
|
||||
#endif
|
||||
|
||||
#ifndef PRALINE
|
||||
static refill_buffer_cb refill_buffer;
|
||||
|
|
@ -111,4 +114,4 @@ unsigned char cpld_jtag_get_next_byte(void)
|
|||
xsvf_pos++;
|
||||
return byte;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -22,11 +22,11 @@
|
|||
|
||||
#include "cpld_xc2c.h"
|
||||
|
||||
#include "crc.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "crc.h"
|
||||
#include "gpio.h"
|
||||
|
||||
// clang-format off
|
||||
typedef enum {
|
||||
CPLD_XC2C_IR_INTEST = 0b00000010,
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
#ifndef __CPLD_XC2C_H__
|
||||
#define __CPLD_XC2C_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "cpld_jtag.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
#ifndef __CRC_H__
|
||||
#define __CRC_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
uint32_t remainder;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "da7219.h"
|
||||
#include "hackrf_core.h"
|
||||
#include "i2c_bus.h"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
#ifndef __DA7219_H
|
||||
#define __DA7219_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define DA7219_ADDRESS 0x1A
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "fault_handler.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
uint32_t r0;
|
||||
uint32_t r1;
|
||||
|
|
|
|||
|
|
@ -21,11 +21,6 @@
|
|||
|
||||
#include "firmware_info.h"
|
||||
#include "platform_detect.h"
|
||||
#include "gpio_lpc.h"
|
||||
#include "hackrf_core.h"
|
||||
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#include <libopencm3/lpc43xx/adc.h>
|
||||
|
||||
#ifdef JAWBREAKER
|
||||
#define SUPPORTED_PLATFORM PLATFORM_JAWBREAKER
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
#ifndef __FIXED_POINT_H__
|
||||
#define __FIXED_POINT_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* 40.24 fixed-point */
|
||||
typedef uint64_t fp_40_24_t;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,11 +19,13 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "fpga.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "fpga_regs.def"
|
||||
#include "hackrf_core.h"
|
||||
#include "ice40_spi.h"
|
||||
#include "fpga.h"
|
||||
#include "fpga_regs.def"
|
||||
|
||||
/* Set up all registers according to the loaded bitstream's defaults. */
|
||||
void fpga_init(fpga_driver_t* const drv)
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
#define __FPGA_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "ice40_spi.h"
|
||||
|
||||
/* Up to 7 registers, each containing up to 8 bits of data */
|
||||
|
|
@ -35,7 +37,7 @@ typedef enum {
|
|||
FPGA_QUARTER_SHIFT_MODE_DOWN = 0b01,
|
||||
} fpga_quarter_shift_mode_t;
|
||||
|
||||
struct fpga_driver_t;
|
||||
struct fpga_driver_t; // IWYU pragma: keep - fixed in #1704
|
||||
typedef struct fpga_driver_t fpga_driver_t;
|
||||
|
||||
struct fpga_driver_t {
|
||||
|
|
|
|||
|
|
@ -19,10 +19,15 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "fpga.h"
|
||||
#include "hackrf_core.h"
|
||||
#include "ice40_spi.h"
|
||||
#include "lz4_blk.h"
|
||||
#include "selftest.h"
|
||||
#include "fpga.h"
|
||||
|
||||
struct fpga_image_read_ctx {
|
||||
struct fpga_loader_t* loader;
|
||||
|
|
|
|||
|
|
@ -19,12 +19,21 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "hackrf_core.h"
|
||||
#include "m0_state.h"
|
||||
#include "streaming.h"
|
||||
#include "selftest.h"
|
||||
#include "fpga.h"
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "delay.h"
|
||||
#include "fixed_point.h"
|
||||
#include "fpga.h"
|
||||
#include "hackrf_core.h"
|
||||
#include "ice40_spi.h"
|
||||
#include "m0_state.h"
|
||||
#include "max283x.h"
|
||||
#include "rf_path.h"
|
||||
#include "selftest.h"
|
||||
#include "sgpio.h"
|
||||
#include "streaming.h"
|
||||
|
||||
// USB buffer used during selftests.
|
||||
#define USB_BULK_BUFFER_SIZE 0x8000
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <gpdma.h>
|
||||
#include "gpdma.h"
|
||||
|
||||
#include <libopencm3/lpc43xx/gpdma.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -22,8 +22,11 @@
|
|||
|
||||
#include "gpio_lpc.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "gpio.h"
|
||||
|
||||
void gpio_init(void)
|
||||
{
|
||||
for (size_t i = 0; i < 8; i++) {
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "gpio.h"
|
||||
|
||||
/* NOTE: libopencm3 constants and functions not used here due to naming
|
||||
* conflicts. I'd recommend changes to libopencm3 design to separate
|
||||
* register #defines and API declarations into separate header files.
|
||||
|
|
|
|||
|
|
@ -21,26 +21,32 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <libopencm3/lpc43xx/cgu.h>
|
||||
#include <libopencm3/lpc43xx/memorymap.h>
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#include <libopencm3/lpc43xx/ssp.h>
|
||||
#if defined(JAWBREAKER) || defined(HACKRF_ONE) || defined(PRALINE)
|
||||
#include <libopencm3/lpc43xx/ccu.h>
|
||||
#endif
|
||||
|
||||
#include "delay.h"
|
||||
#include "gpio.h"
|
||||
#include "hackrf_core.h"
|
||||
#include "hackrf_ui.h"
|
||||
#include "delay.h"
|
||||
#include "i2c_lpc.h"
|
||||
#include "max283x.h"
|
||||
#include "max5864_target.h"
|
||||
#include "w25q80bv_target.h"
|
||||
#include "i2c_lpc.h"
|
||||
#include "ice40_spi.h"
|
||||
#include "platform_detect.h"
|
||||
#include "platform_gpio.h"
|
||||
#include "platform_scu.h"
|
||||
#include "clkin.h"
|
||||
#include <libopencm3/lpc43xx/cgu.h>
|
||||
#include <libopencm3/lpc43xx/ccu.h>
|
||||
|
||||
#if (defined HACKRF_ONE || defined PRALINE)
|
||||
#include "spi_bus.h"
|
||||
#include "w25q80bv_target.h"
|
||||
#if defined(HACKRF_ONE) || defined(PRALINE)
|
||||
#include "portapack.h"
|
||||
#endif
|
||||
|
||||
#include "gpio_lpc.h"
|
||||
#if defined(PRALINE)
|
||||
#include "ice40_spi.h"
|
||||
#endif
|
||||
|
||||
i2c_bus_t i2c0 = {
|
||||
.obj = (void*) I2C0_BASE,
|
||||
|
|
|
|||
|
|
@ -28,25 +28,25 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "si5351c.h"
|
||||
#include "spi_ssp.h"
|
||||
|
||||
#include "cpld_jtag.h"
|
||||
#include "fixed_point.h"
|
||||
#include "i2c_bus.h"
|
||||
#include "max283x.h"
|
||||
#include "max5864.h"
|
||||
#include "mixer.h"
|
||||
#include "w25q80bv.h"
|
||||
#include "sgpio.h"
|
||||
#include "radio.h"
|
||||
#include "rf_path.h"
|
||||
#include "cpld_jtag.h"
|
||||
#include "ice40_spi.h"
|
||||
#include "fpga.h"
|
||||
#include "fixed_point.h"
|
||||
|
||||
#include "platform_scu.h"
|
||||
#include "sgpio.h"
|
||||
#include "si5351c.h"
|
||||
#include "spi_ssp.h"
|
||||
#include "w25q80bv.h"
|
||||
#if defined(PRALINE)
|
||||
#include "fpga.h"
|
||||
#include "ice40_spi.h"
|
||||
#endif
|
||||
|
||||
/* TODO: Hide these configurations */
|
||||
extern si5351c_driver_t clock_gen;
|
||||
|
|
|
|||
|
|
@ -20,13 +20,16 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "hackrf_ui.h"
|
||||
|
||||
#include "ui_portapack.h"
|
||||
#include "ui_rad1o.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "hackrf_ui.h"
|
||||
#if defined(PRALINE) || defined(HACKRF_ONE)
|
||||
#include "ui_portapack.h"
|
||||
#endif
|
||||
#if defined(RAD1O)
|
||||
#include "ui_rad1o.h"
|
||||
#endif
|
||||
|
||||
#define UNUSED(x) (void) (x)
|
||||
|
||||
/* Stub functions for null UI function table */
|
||||
|
|
|
|||
|
|
@ -23,9 +23,12 @@
|
|||
#ifndef HACKRF_UI_H
|
||||
#define HACKRF_UI_H
|
||||
|
||||
#include <hackrf_core.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "radio.h"
|
||||
#include "rf_path.h"
|
||||
|
||||
typedef void (*hackrf_ui_init_fn)(void);
|
||||
typedef void (*hackrf_ui_deinit_fn)(void);
|
||||
typedef void (*hackrf_ui_set_frequency_fn)(uint64_t frequency);
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@
|
|||
#ifndef __I2C_BUS_H__
|
||||
#define __I2C_BUS_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct i2c_bus_t;
|
||||
struct i2c_bus_t; // IWYU pragma: keep - fixed in #1704
|
||||
typedef struct i2c_bus_t i2c_bus_t;
|
||||
|
||||
struct i2c_bus_t {
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@
|
|||
#ifndef __I2C_LPC_H__
|
||||
#define __I2C_LPC_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "i2c_bus.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,10 @@
|
|||
|
||||
#include "ice40_spi.h"
|
||||
|
||||
#include "hackrf_core.h"
|
||||
#include "lz4_buf.h"
|
||||
#include <libopencm3/lpc43xx/memorymap.h>
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#include <libopencm3/lpc43xx/ssp.h>
|
||||
|
||||
#include "delay.h"
|
||||
#include "platform_scu.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -22,12 +22,14 @@
|
|||
#ifndef __ICE40_SPI_H
|
||||
#define __ICE40_SPI_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "gpio.h"
|
||||
#include "spi_bus.h"
|
||||
|
||||
struct ice40_spi_driver_t;
|
||||
struct ice40_spi_driver_t; // IWYU pragma: keep - fixed in #1704
|
||||
typedef struct ice40_spi_driver_t ice40_spi_driver_t;
|
||||
|
||||
struct ice40_spi_driver_t {
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
*/
|
||||
|
||||
#include "m0_state.h"
|
||||
|
||||
#include <libopencm3/lpc43xx/sgpio.h>
|
||||
#include <stddef.h>
|
||||
|
||||
void m0_set_mode(enum m0_mode mode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ typedef enum {
|
|||
MAX2831_RX_HPF_600_KHZ = 3,
|
||||
} max2831_rx_hpf_freq_t;
|
||||
|
||||
struct max2831_driver_t;
|
||||
struct max2831_driver_t; // IWYU pragma: keep - fixed in #1704
|
||||
typedef struct max2831_driver_t max2831_driver_t;
|
||||
|
||||
struct max2831_driver_t {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@
|
|||
|
||||
#include "max2831_target.h"
|
||||
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
|
||||
#include "gpio.h"
|
||||
#include "platform_scu.h"
|
||||
|
||||
void max2831_target_init(max2831_driver_t* const drv)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ typedef enum {
|
|||
MAX2837_MODE_RX
|
||||
} max2837_mode_t;
|
||||
|
||||
struct max2837_driver_t;
|
||||
struct max2837_driver_t; // IWYU pragma: keep - fixed in #1704
|
||||
typedef struct max2837_driver_t max2837_driver_t;
|
||||
|
||||
struct max2837_driver_t {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@
|
|||
|
||||
#include "max2837_target.h"
|
||||
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
|
||||
#include "gpio.h"
|
||||
#include "platform_scu.h"
|
||||
|
||||
void max2837_target_init(max2837_driver_t* const drv)
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ typedef enum {
|
|||
MAX2839_MODE_CLKOUT,
|
||||
} max2839_mode_t;
|
||||
|
||||
struct max2839_driver_t;
|
||||
struct max2839_driver_t; // IWYU pragma: keep - fixed in #1704
|
||||
typedef struct max2839_driver_t max2839_driver_t;
|
||||
|
||||
struct max2839_driver_t {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@
|
|||
|
||||
#include "max2839_target.h"
|
||||
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
|
||||
#include "gpio.h"
|
||||
#include "platform_scu.h"
|
||||
|
||||
void max2839_target_init(max2839_driver_t* const drv)
|
||||
|
|
|
|||
|
|
@ -21,10 +21,21 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "max283x.h"
|
||||
|
||||
#include "platform_gpio.h"
|
||||
#include "spi_bus.h"
|
||||
#if defined(PRALINE)
|
||||
#include "max2831.h"
|
||||
#include "max2831_target.h"
|
||||
#else
|
||||
#include "max2837.h"
|
||||
#include "max2837_target.h"
|
||||
#include "max2839.h"
|
||||
#include "max2839_target.h"
|
||||
#endif
|
||||
|
||||
extern spi_bus_t spi_bus_ssp1;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,19 +24,15 @@
|
|||
#ifndef __MAX283x_H
|
||||
#define __MAX283x_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "gpio.h"
|
||||
#include "gpio_lpc.h"
|
||||
#include "max2831.h"
|
||||
#include "max2831_target.h"
|
||||
#include "max2837.h"
|
||||
#include "max2837_target.h"
|
||||
#include "max2839.h"
|
||||
#include "max2839_target.h"
|
||||
#include "spi_bus.h"
|
||||
#if defined(PRALINE)
|
||||
#include "max2831.h"
|
||||
#else
|
||||
#include "max2837.h"
|
||||
#include "max2839.h"
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
MAX283x_MODE_SHUTDOWN,
|
||||
|
|
|
|||
|
|
@ -20,22 +20,22 @@
|
|||
*/
|
||||
|
||||
#include "max2871.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "max2871_regs.h"
|
||||
#include "selftest.h"
|
||||
#include "platform_scu.h"
|
||||
|
||||
#if (defined DEBUG)
|
||||
#include <stdio.h>
|
||||
#define LOG printf
|
||||
#else
|
||||
#define LOG(x, ...)
|
||||
#include <libopencm3/lpc43xx/ssp.h>
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#include "hackrf_core.h"
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
static uint32_t max2871_spi_read(max2871_driver_t* const drv);
|
||||
static void max2871_spi_write(max2871_driver_t* const drv, uint8_t r, uint32_t v);
|
||||
static void max2871_write_registers(max2871_driver_t* const drv);
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@
|
|||
#ifndef MAX2871_H
|
||||
#define MAX2871_H
|
||||
|
||||
#include "gpio.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "gpio.h"
|
||||
|
||||
typedef struct {
|
||||
gpio_t gpio_vco_ce;
|
||||
gpio_t gpio_vco_sclk;
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "max5864.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static void max5864_write(max5864_driver_t* const drv, uint8_t value)
|
||||
{
|
||||
spi_bus_transfer(drv->bus, &value, 1);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "spi_bus.h"
|
||||
|
||||
struct max5864_driver_t;
|
||||
struct max5864_driver_t; // IWYU pragma: keep - fixed in #1704
|
||||
typedef struct max5864_driver_t max5864_driver_t;
|
||||
|
||||
struct max5864_driver_t {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include "max5864_target.h"
|
||||
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
|
||||
#include "platform_scu.h"
|
||||
|
||||
void max5864_target_init(max5864_driver_t* const drv)
|
||||
|
|
|
|||
|
|
@ -20,10 +20,15 @@
|
|||
*/
|
||||
|
||||
#include "mixer.h"
|
||||
#include "rffc5071.h"
|
||||
#include "rffc5071_spi.h"
|
||||
#include "max2871.h"
|
||||
|
||||
#include "platform_gpio.h"
|
||||
#if defined(JAWBREAKER) || defined(HACKRF_ONE) || defined(PRALINE)
|
||||
#include "rffc5071.h"
|
||||
#include "rffc5071_spi.h"
|
||||
#include "spi_bus.h"
|
||||
#elif defined(RAD1O)
|
||||
#include "max2871.h"
|
||||
#endif
|
||||
|
||||
#if defined(JAWBREAKER) || defined(HACKRF_ONE) || defined(PRALINE)
|
||||
static rffc5071_spi_config_t rffc5071_spi_config;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#ifndef __MIXER_H
|
||||
#define __MIXER_H
|
||||
|
||||
#if (defined JAWBREAKER || defined HACKRF_ONE || defined PRALINE)
|
||||
#if defined(JAWBREAKER) || defined(HACKRF_ONE) || defined(PRALINE)
|
||||
#include "rffc5071.h"
|
||||
typedef rffc5071_driver_t mixer_driver_t;
|
||||
#elif defined(RAD1O)
|
||||
|
|
|
|||
|
|
@ -21,11 +21,16 @@
|
|||
*/
|
||||
|
||||
#include "operacake.h"
|
||||
#include "operacake_sctimer.h"
|
||||
#include "hackrf_core.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
|
||||
#include "gpio.h"
|
||||
#include "gpio_lpc.h"
|
||||
#include "hackrf_core.h"
|
||||
#include "i2c_bus.h"
|
||||
#include "operacake_sctimer.h"
|
||||
#include "platform_scu.h"
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define OPERACAKE_PA1 0
|
||||
#define OPERACAKE_PA2 1
|
||||
|
|
|
|||
|
|
@ -22,14 +22,16 @@
|
|||
|
||||
#include "operacake_sctimer.h"
|
||||
|
||||
#include <hackrf_core.h>
|
||||
|
||||
#include <libopencm3/lpc43xx/sgpio.h>
|
||||
#include <libopencm3/lpc43xx/gima.h>
|
||||
#include <libopencm3/lpc43xx/rgu.h>
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#include <libopencm3/lpc43xx/gima.h>
|
||||
#include "sct.h"
|
||||
#if !defined(PRALINE)
|
||||
#include <libopencm3/cm3/common.h>
|
||||
#include <libopencm3/lpc43xx/sgpio.h>
|
||||
#endif
|
||||
|
||||
#include "delay.h"
|
||||
#include "sct.h"
|
||||
|
||||
#define U1CTRL_SET SCT_OUT14_SET
|
||||
#define U1CTRL_CLR SCT_OUT14_CLR
|
||||
|
|
|
|||
|
|
@ -19,14 +19,16 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "platform_detect.h"
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
|
||||
#include "adc.h"
|
||||
#include "delay.h"
|
||||
#include "firmware_info.h"
|
||||
#include "gpio.h"
|
||||
#include "gpio_lpc.h"
|
||||
#include "hackrf_core.h"
|
||||
#include "delay.h"
|
||||
#include "adc.h"
|
||||
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#include "platform_detect.h"
|
||||
#include "platform_scu.h"
|
||||
|
||||
static board_id_t platform = BOARD_ID_UNDETECTED;
|
||||
static board_rev_t revision = BOARD_REV_UNDETECTED;
|
||||
|
|
|
|||
|
|
@ -19,9 +19,14 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include "platform_gpio.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#if defined(HACKRF_ONE)
|
||||
#include "platform_detect.h"
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
|
||||
const platform_gpio_t* platform_gpio(void)
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "gpio.h"
|
||||
#include "gpio_lpc.h"
|
||||
#include "platform_detect.h"
|
||||
|
||||
typedef struct {
|
||||
/* LEDs */
|
||||
|
|
|
|||
|
|
@ -19,9 +19,12 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include "platform_scu.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
|
||||
// clang-format off
|
||||
|
||||
const platform_scu_t* platform_scu(void)
|
||||
|
|
|
|||
|
|
@ -26,8 +26,9 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#include "platform_detect.h"
|
||||
|
||||
/*
|
||||
* SCU PinMux
|
||||
|
|
|
|||
|
|
@ -22,10 +22,15 @@
|
|||
|
||||
#include "portapack.h"
|
||||
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
|
||||
#include "cpld_jtag.h"
|
||||
#include "delay.h"
|
||||
#include "gpio.h"
|
||||
#include "gpio_lpc.h"
|
||||
#include "hackrf_core.h"
|
||||
#include "platform_gpio.h"
|
||||
#include "platform_scu.h"
|
||||
#include "delay.h"
|
||||
|
||||
static void portapack_sleep_milliseconds(const uint32_t milliseconds)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@
|
|||
#ifndef __PORTAPACK_H__
|
||||
#define __PORTAPACK_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define ARRAY_SIZEOF(x) (sizeof(x) / sizeof(x[0]))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
#include "fonts.h"
|
||||
#include "render.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "render.h"
|
||||
|
||||
// Local function: Get next nibble.
|
||||
static int ctr = 0; // offset for next nibble
|
||||
static int hilo = 0; // 0= high nibble next, 1=low nibble next
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
#include "display.h"
|
||||
|
||||
#include "gpio_lpc.h"
|
||||
#include "hackrf_core.h"
|
||||
#include "delay.h"
|
||||
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#include <libopencm3/lpc43xx/ssp.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libopencm3/lpc43xx/ssp.h>
|
||||
|
||||
#include "gpio.h"
|
||||
#include "gpio_lpc.h"
|
||||
#include "delay.h"
|
||||
|
||||
static void delayms(const uint32_t milliseconds)
|
||||
{
|
||||
/* NOTE: Naively assumes 204 MHz instruction cycle clock and five instructions per count */
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
#ifndef __RAD1O_DISPLAY_H__
|
||||
#define __RAD1O_DISPLAY_H__
|
||||
|
||||
#include <libopencm3/cm3/common.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#include <libopencm3/lpc43xx/ssp.h>
|
||||
|
||||
#define RESX 130
|
||||
#define RESY 130
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "print.h"
|
||||
|
||||
#include "display.h"
|
||||
#include "fonts.h"
|
||||
#include "render.h"
|
||||
#include "smallfonts.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef __RENDER_H_
|
||||
#define __RENDER_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "fonts.h"
|
||||
|
||||
void rad1o_setTextColor(uint8_t bg, uint8_t fg);
|
||||
|
|
|
|||
|
|
@ -37,8 +37,14 @@
|
|||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/**************************************************************************/
|
||||
|
||||
#include "smallfonts.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "fonts.h"
|
||||
|
||||
/* System 7x8 */
|
||||
const uint8_t au8Font7x8[] = {
|
||||
0, 0, 0, 0, 0, 0, 0, //' '
|
||||
|
|
|
|||
|
|
@ -38,11 +38,6 @@
|
|||
#ifndef __RAD1O_SMALLFONTS_H__
|
||||
#define __RAD1O_SMALLFONTS_H__
|
||||
|
||||
#include "fonts.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* Partially based on original code for the KS0108 by Stephane Rey */
|
||||
/* Current version by Kevin Townsend */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
#include "ubuntu18.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "fonts.h"
|
||||
|
||||
/* Font data for Ubuntu Regular 18pt */
|
||||
|
||||
/* Copyright 2010 Canonical Ltd. Licensed under the Ubuntu Font Licence 1.0
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef __RAD1O_UBUNTU18_H__
|
||||
#define __RAD1O_UBUNTU18_H__
|
||||
#include "fonts.h"
|
||||
|
||||
extern const struct FONT_DEF Font_Ubuntu18pt;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,16 +19,23 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <libopencm3/dispatch/nvic.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libopencm3/cm3/nvic.h>
|
||||
#include <libopencm3/lpc43xx/m4/nvic.h>
|
||||
|
||||
#include "fixed_point.h"
|
||||
#include "hackrf_core.h"
|
||||
#include "tuning.h"
|
||||
#include "rf_path.h"
|
||||
#include "fpga.h"
|
||||
#include "hackrf_ui.h"
|
||||
#include "max283x.h"
|
||||
#include "platform_detect.h"
|
||||
#include "radio.h"
|
||||
#include "fixed_point.h"
|
||||
#include "hackrf_ui.h"
|
||||
#include "rf_path.h"
|
||||
#include "tuning.h"
|
||||
#if defined(PRALINE)
|
||||
#include "fpga.h"
|
||||
#include "tune_config.h"
|
||||
#endif
|
||||
|
||||
#define MIN(x, y) ((x) < (y) ? (x) : (y))
|
||||
#define MAX(x, y) ((x) > (y) ? (x) : (y))
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@
|
|||
#ifndef __RF_CONFIG_H__
|
||||
#define __RF_CONFIG_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "fixed_point.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -23,18 +23,22 @@
|
|||
|
||||
#include "rf_path.h"
|
||||
|
||||
#include <hackrf_core.h>
|
||||
#if defined(HACKRF_ONE) || defined(RAD1O) || defined(PRALINE)
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#endif
|
||||
|
||||
#include "hackrf_core.h"
|
||||
#include "hackrf_ui.h"
|
||||
#include "gpio_lpc.h"
|
||||
#include "platform_detect.h"
|
||||
#include "platform_scu.h"
|
||||
#include "mixer.h"
|
||||
#include "max283x.h"
|
||||
#include "max5864.h"
|
||||
#include "mixer.h"
|
||||
#include "platform_detect.h"
|
||||
#include "sgpio.h"
|
||||
#if defined(HACKRF_ONE) || defined(RAD1O) || defined(PRALINE)
|
||||
#include "platform_scu.h"
|
||||
#endif
|
||||
|
||||
#if (defined JAWBREAKER || defined HACKRF_ONE || defined RAD1O || defined PRALINE)
|
||||
#if defined(JAWBREAKER) || defined(HACKRF_ONE) || defined(RAD1O) || defined(PRALINE)
|
||||
/*
|
||||
* RF switches on Jawbreaker are controlled by General Purpose Outputs (GPO) on
|
||||
* the RFFC5072.
|
||||
|
|
|
|||
|
|
@ -26,7 +26,9 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "gpio.h"
|
||||
#if defined(HACKRF_ONE) || defined(RAD1O) || defined(PRALINE)
|
||||
#include "gpio.h"
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
RF_PATH_DIRECTION_OFF,
|
||||
|
|
|
|||
|
|
@ -33,13 +33,18 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(PRALINE)
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#endif
|
||||
|
||||
#include "delay.h"
|
||||
#include "rffc5071.h"
|
||||
#include "rffc5071_regs.def" // private register def macros
|
||||
#include "selftest.h"
|
||||
|
||||
#include "hackrf_core.h"
|
||||
#include "delay.h"
|
||||
#include "platform_scu.h"
|
||||
#if defined(PRALINE)
|
||||
#include "platform_scu.h"
|
||||
#endif
|
||||
|
||||
static bool enabled = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,10 +23,11 @@
|
|||
#ifndef __RFFC5071_H
|
||||
#define __RFFC5071_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "spi_bus.h"
|
||||
#include "gpio.h"
|
||||
#include "spi_bus.h"
|
||||
|
||||
/* 31 registers, each containing 16 bits of data. */
|
||||
#define RFFC5071_NUM_REGS 31
|
||||
|
|
|
|||
|
|
@ -20,11 +20,15 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "hackrf_core.h"
|
||||
#include "platform_scu.h"
|
||||
|
||||
#include "rffc5071_spi.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
|
||||
#include "platform_scu.h"
|
||||
|
||||
static void rffc5071_spi_target_select(spi_bus_t* const bus)
|
||||
{
|
||||
const rffc5071_spi_config_t* const config = bus->config;
|
||||
|
|
|
|||
|
|
@ -23,9 +23,10 @@
|
|||
#ifndef __RFFC5071_SPI_H
|
||||
#define __RFFC5071_SPI_H
|
||||
|
||||
#include "spi_bus.h"
|
||||
#include <stddef.h>
|
||||
|
||||
#include "gpio.h"
|
||||
#include "spi_bus.h"
|
||||
|
||||
typedef struct rffc5071_spi_config_t {
|
||||
gpio_t gpio_select;
|
||||
|
|
|
|||
|
|
@ -20,10 +20,11 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "hackrf_core.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#include "hackrf_core.h"
|
||||
#include "rom_iap.h"
|
||||
#include "spi_bus.h"
|
||||
#include "w25q80bv.h"
|
||||
|
||||
#define ROM_IAP_ADDR (0x10400100)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
#ifndef __ROM_IAP__
|
||||
#define __ROM_IAP__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef enum {
|
||||
/* TODO define other commands */
|
||||
|
|
|
|||
|
|
@ -22,13 +22,18 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <libopencm3/cm3/common.h>
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#include <libopencm3/lpc43xx/sgpio.h>
|
||||
|
||||
#include "hackrf_core.h"
|
||||
#include "platform_detect.h"
|
||||
#include "platform_scu.h"
|
||||
|
||||
#include "sgpio.h"
|
||||
#if !defined(PRALINE)
|
||||
#include "hackrf_core.h"
|
||||
#endif
|
||||
|
||||
static void update_q_invert(sgpio_config_t* const config);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,10 +23,8 @@
|
|||
#ifndef __SGPIO_H__
|
||||
#define __SGPIO_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <libopencm3/lpc43xx/sgpio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "gpio.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -20,16 +20,23 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "si5351c.h"
|
||||
#include "clkin.h"
|
||||
#include "platform_detect.h"
|
||||
#include "platform_gpio.h"
|
||||
#include "platform_scu.h"
|
||||
#include "hackrf_core.h"
|
||||
#include "selftest.h"
|
||||
#include "delay.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#if defined(HACKRF_ONE)
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#endif
|
||||
|
||||
#include "clkin.h"
|
||||
#include "delay.h"
|
||||
#include "platform_detect.h"
|
||||
#include "selftest.h"
|
||||
#include "si5351c.h"
|
||||
#if defined(HACKRF_ONE)
|
||||
#include "gpio.h"
|
||||
#include "platform_gpio.h"
|
||||
#include "platform_scu.h"
|
||||
#endif
|
||||
|
||||
static enum pll_sources active_clock_source = PLL_SOURCE_UNINITIALIZED;
|
||||
/* External clock output default is deactivated as it creates noise */
|
||||
|
|
|
|||
|
|
@ -27,8 +27,9 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "i2c_bus.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ typedef struct {
|
|||
const size_t count;
|
||||
} spi_transfer_t;
|
||||
|
||||
struct spi_bus_t;
|
||||
struct spi_bus_t; // IWYU pragma: keep - fixed in #1704
|
||||
typedef struct spi_bus_t spi_bus_t;
|
||||
|
||||
struct spi_bus_t {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@
|
|||
|
||||
#include "spi_ssp.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <libopencm3/lpc43xx/memorymap.h>
|
||||
#include <libopencm3/lpc43xx/rgu.h>
|
||||
#include <libopencm3/lpc43xx/ssp.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,11 +26,10 @@
|
|||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "spi_bus.h"
|
||||
#include <libopencm3/lpc43xx/ssp.h>
|
||||
|
||||
#include "gpio.h"
|
||||
|
||||
#include <libopencm3/lpc43xx/ssp.h>
|
||||
#include "spi_bus.h"
|
||||
|
||||
typedef struct ssp_config_t {
|
||||
ssp_datasize_t data_bits;
|
||||
|
|
|
|||
|
|
@ -23,9 +23,10 @@
|
|||
|
||||
#include <streaming.h>
|
||||
|
||||
#include <libopencm3/lpc43xx/m4/nvic.h>
|
||||
#include <libopencm3/lpc43xx/sgpio.h>
|
||||
|
||||
#include "sgpio.h"
|
||||
|
||||
void baseband_streaming_enable(sgpio_config_t* const sgpio_config)
|
||||
{
|
||||
SGPIO_SET_EN_1 = (1 << SGPIO_SLICE_A);
|
||||
|
|
|
|||
|
|
@ -22,12 +22,18 @@
|
|||
*/
|
||||
|
||||
#include "tuning.h"
|
||||
#include "hackrf_ui.h"
|
||||
|
||||
#include "hackrf_core.h"
|
||||
#include "hackrf_ui.h"
|
||||
#include "max283x.h"
|
||||
#include "mixer.h"
|
||||
#include "sgpio.h"
|
||||
#include "operacake.h"
|
||||
#include "platform_detect.h"
|
||||
#if defined(PRALINE) || defined(HACKRF_ONE)
|
||||
#include "operacake.h"
|
||||
#endif
|
||||
#ifdef PRALINE
|
||||
#include "fpga.h"
|
||||
#endif
|
||||
|
||||
#ifndef PRALINE
|
||||
|
||||
|
|
|
|||
|
|
@ -24,11 +24,13 @@
|
|||
#ifndef __TUNING_H__
|
||||
#define __TUNING_H__
|
||||
|
||||
#include "rf_path.h"
|
||||
#include "tune_config.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "rf_path.h"
|
||||
#if defined(PRALINE)
|
||||
#include "tune_config.h"
|
||||
#endif
|
||||
|
||||
#define FREQ_ONE_MHZ (1000ULL * 1000)
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,13 @@
|
|||
|
||||
#include "ui_portapack.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "portapack.h"
|
||||
#include "radio.h"
|
||||
#include "rf_path.h"
|
||||
|
||||
/* Pixel data within a font or bitmap byte is "reversed": LSB is left-most pixel. */
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,14 @@
|
|||
|
||||
#include "ui_rad1o.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "hackrf_core.h"
|
||||
#include "radio.h"
|
||||
#include "rf_path.h"
|
||||
|
||||
#include "rad1o/display.h"
|
||||
#include "rad1o/draw.h"
|
||||
#include "rad1o/print.h"
|
||||
|
|
@ -29,8 +37,6 @@
|
|||
#include "rad1o/smallfonts.h"
|
||||
#include "rad1o/ubuntu18.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
static uint64_t freq = 0;
|
||||
static uint32_t sample_rate = 0;
|
||||
static uint32_t filter_bw = 0;
|
||||
|
|
|
|||
|
|
@ -20,19 +20,20 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "usb.h"
|
||||
#include "usb_type.h"
|
||||
#include "usb_queue.h"
|
||||
#include "usb_standard_request.h"
|
||||
|
||||
#include <libopencm3/cm3/nvic.h>
|
||||
#include <libopencm3/lpc43xx/creg.h>
|
||||
#include <libopencm3/dispatch/nvic.h>
|
||||
#include <libopencm3/lpc43xx/m4/nvic.h>
|
||||
#include <libopencm3/lpc43xx/rgu.h>
|
||||
#include <libopencm3/lpc43xx/usb.h>
|
||||
|
||||
#include "usb.h"
|
||||
#include "usb_queue.h"
|
||||
#include "usb_standard_request.h"
|
||||
#include "usb_type.h"
|
||||
|
||||
usb_device_t* usb_device_usb0 = 0;
|
||||
|
||||
usb_queue_head_t usb_qh[12] ATTR_ALIGNED(2048);
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@
|
|||
#ifndef __USB_H__
|
||||
#define __USB_H__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// TODO: Refactor to support high performance operations without having to
|
||||
// expose usb_transfer_descriptor_t. Or usb_endpoint_prime(). Or, or, or...
|
||||
#include <libopencm3/lpc43xx/usb.h>
|
||||
|
|
|
|||
|
|
@ -21,12 +21,12 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <libopencm3/cm3/cortex.h>
|
||||
#include <libopencm3/lpc43xx/usb.h>
|
||||
|
||||
#include "locking.h"
|
||||
#include "usb.h"
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
#ifndef __USB_QUEUE_H__
|
||||
#define __USB_QUEUE_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <libopencm3/lpc43xx/usb.h>
|
||||
|
||||
#include "usb_type.h"
|
||||
|
|
|
|||
|
|
@ -20,12 +20,13 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "usb.h"
|
||||
#include "usb_request.h"
|
||||
#include "usb_queue.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "usb.h"
|
||||
#include "usb_queue.h"
|
||||
|
||||
static void usb_request(usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage)
|
||||
{
|
||||
usb_request_status_t status = USB_REQUEST_STATUS_STALL;
|
||||
|
|
|
|||
|
|
@ -20,14 +20,14 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "usb_standard_request.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "usb.h"
|
||||
#include "usb_type.h"
|
||||
#include "usb_queue.h"
|
||||
#include "usb_type.h"
|
||||
|
||||
const uint8_t* usb_endpoint_descriptor(const usb_endpoint_t* const endpoint)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,8 +23,11 @@
|
|||
#ifndef __USB_STANDARD_REQUEST_H__
|
||||
#define __USB_STANDARD_REQUEST_H__
|
||||
|
||||
#include "usb_type.h"
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "usb_request.h"
|
||||
#include "usb_type.h"
|
||||
|
||||
void usb_set_configuration_changed_cb(void (*callback)(usb_device_t* const));
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
#define __USB_TYPE_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
// TODO: Move this to some common compiler-tricks location.
|
||||
#define ATTR_PACKED __attribute__((packed))
|
||||
|
|
|
|||
|
|
@ -27,11 +27,11 @@
|
|||
* programming the flash.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "w25q80bv.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
|
||||
|
||||
#define W25Q80BV_READ_DATA 0x03
|
||||
|
|
|
|||
|
|
@ -24,14 +24,15 @@
|
|||
#ifndef __W25Q80BV_H__
|
||||
#define __W25Q80BV_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "gpio.h"
|
||||
#include "spi_bus.h"
|
||||
|
||||
#define W25Q80BV_DEVICE_ID_RES 0x13 /* Expected device_id for W25Q80BV */
|
||||
#define W25Q16DV_DEVICE_ID_RES 0x14 /* Expected device_id for W25Q16DV */
|
||||
#define W25Q32JV_DEVICE_ID_RES 0x15 /* Expected device_id for W25Q32JV */
|
||||
#include "spi_bus.h"
|
||||
#include "gpio.h"
|
||||
|
||||
typedef union {
|
||||
uint64_t id_64b;
|
||||
|
|
@ -39,7 +40,7 @@ typedef union {
|
|||
uint8_t id_8b[8]; /* 8*8bits 64bits Unique ID */
|
||||
} w25q80bv_unique_id_t;
|
||||
|
||||
struct w25q80bv_driver_t;
|
||||
struct w25q80bv_driver_t; // IWYU pragma: keep - fixed in #1704
|
||||
typedef struct w25q80bv_driver_t w25q80bv_driver_t;
|
||||
|
||||
struct w25q80bv_driver_t {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@
|
|||
|
||||
#include "w25q80bv_target.h"
|
||||
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
|
||||
#include "gpio.h"
|
||||
#include "platform_scu.h"
|
||||
|
||||
/* TODO: Why is CS being controlled manually when SSP0 could do it
|
||||
|
|
|
|||
|
|
@ -9,11 +9,12 @@
|
|||
/* Updated comments to clarify instructions.*/
|
||||
/* Add print in setPort for xapp058_example.exe.*/
|
||||
/*******************************************************/
|
||||
|
||||
#include "ports.h"
|
||||
|
||||
#include "hackrf_core.h"
|
||||
#include "cpld_jtag.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#include "cpld_jtag.h"
|
||||
#include "gpio.h"
|
||||
|
||||
void delay_jtag(uint32_t duration)
|
||||
|
|
|
|||
|
|
@ -21,50 +21,69 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libopencm3/lpc43xx/ipc.h>
|
||||
#include <libopencm3/lpc43xx/m4/nvic.h>
|
||||
#include <libopencm3/lpc43xx/rgu.h>
|
||||
#include <libopencm3/lpc43xx/timer.h>
|
||||
|
||||
#include <streaming.h>
|
||||
|
||||
#include "tuning.h"
|
||||
|
||||
#include "usb.h"
|
||||
#include "usb_standard_request.h"
|
||||
#include <libopencm3/cm3/nvic.h>
|
||||
|
||||
#include <clkin.h>
|
||||
#include <da7219.h>
|
||||
#include <delay.h>
|
||||
#include <hackrf_core.h>
|
||||
#include <hackrf_ui.h>
|
||||
#include <operacake.h>
|
||||
#include <platform_detect.h>
|
||||
#include <radio.h>
|
||||
#include <rf_path.h>
|
||||
#include <rom_iap.h>
|
||||
#include "usb_descriptor.h"
|
||||
#include <selftest.h>
|
||||
#include <usb.h>
|
||||
#include <usb_queue.h>
|
||||
#include <usb_request.h>
|
||||
#include <usb_standard_request.h>
|
||||
#include <usb_type.h>
|
||||
#if defined(HACKRF_ONE)
|
||||
#include <mixer.h>
|
||||
#endif
|
||||
#if defined(PRALINE) || defined(HACKRF_ONE)
|
||||
#include <portapack.h>
|
||||
#endif
|
||||
#if defined(PRALINE) || defined(HACKRF_ONE) || defined(JAWBREAKER)
|
||||
#include <rffc5071.h>
|
||||
#endif
|
||||
#if defined(PRALINE)
|
||||
#include <fpga.h>
|
||||
#if !(defined(DFU_MODE) || defined(RAM_MODE))
|
||||
#include <lz4_buf.h>
|
||||
#include <spi_bus.h>
|
||||
#include <w25q80bv.h>
|
||||
#endif
|
||||
#else
|
||||
#include <cpld_jtag.h>
|
||||
#include <cpld_xc2c.h>
|
||||
#endif
|
||||
|
||||
#include "usb_device.h"
|
||||
#include "usb_endpoint.h"
|
||||
#include "usb_api_board_info.h"
|
||||
#include "usb_api_cpld.h"
|
||||
#include "usb_api_register.h"
|
||||
#include "usb_api_spiflash.h"
|
||||
#include "usb_api_operacake.h"
|
||||
#include "usb_api_praline.h"
|
||||
#include "usb_api_selftest.h"
|
||||
#include "usb_api_adc.h"
|
||||
#include "operacake.h"
|
||||
#include "usb_api_board_info.h"
|
||||
#include "usb_api_m0_state.h"
|
||||
#include "usb_api_operacake.h"
|
||||
#include "usb_api_register.h"
|
||||
#include "usb_api_selftest.h"
|
||||
#include "usb_api_spiflash.h"
|
||||
#include "usb_api_sweep.h"
|
||||
#include "usb_api_transceiver.h"
|
||||
#include "usb_api_ui.h"
|
||||
#include "usb_bulk_buffer.h"
|
||||
#include "usb_api_m0_state.h"
|
||||
#include "cpld_xc2c.h"
|
||||
#include "portapack.h"
|
||||
#include "hackrf_ui.h"
|
||||
#include "platform_detect.h"
|
||||
#include "clkin.h"
|
||||
#include "fpga.h"
|
||||
#include "selftest.h"
|
||||
#include "delay.h"
|
||||
#include "lz4_buf.h"
|
||||
#include "da7219.h"
|
||||
#include "usb_descriptor.h"
|
||||
#include "usb_device.h"
|
||||
#include "usb_endpoint.h"
|
||||
#if defined(PRALINE)
|
||||
#include "usb_api_praline.h"
|
||||
#else
|
||||
#include "usb_api_cpld.h"
|
||||
#endif
|
||||
|
||||
extern uint32_t __m0_start__;
|
||||
extern uint32_t __m0_end__;
|
||||
|
|
|
|||
|
|
@ -19,11 +19,17 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <usb_queue.h>
|
||||
#include "adc.h"
|
||||
#include "usb_api_adc.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <usb_queue.h>
|
||||
#include <usb_request.h>
|
||||
#include <usb_type.h>
|
||||
|
||||
#include "adc.h"
|
||||
|
||||
usb_request_status_t usb_vendor_request_adc_read(
|
||||
usb_endpoint_t* const endpoint,
|
||||
const usb_transfer_stage_t stage)
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@
|
|||
#ifndef __USB_API_ADC_H__
|
||||
#define __USB_API_ADC_H__
|
||||
|
||||
#include <usb_type.h>
|
||||
#include <usb_request.h>
|
||||
#include <usb_type.h>
|
||||
|
||||
usb_request_status_t usb_vendor_request_adc_read(
|
||||
usb_endpoint_t* const endpoint,
|
||||
|
|
|
|||
|
|
@ -22,20 +22,21 @@
|
|||
*/
|
||||
|
||||
#include "usb_api_board_info.h"
|
||||
#include "platform_detect.h"
|
||||
#include "platform_gpio.h"
|
||||
#include "firmware_info.h"
|
||||
|
||||
#include <hackrf_core.h>
|
||||
#include <rom_iap.h>
|
||||
#include <usb_queue.h>
|
||||
#include <libopencm3/lpc43xx/wwdt.h>
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libopencm3/lpc43xx/wwdt.h>
|
||||
|
||||
#include <firmware_info.h>
|
||||
#include <hackrf_core.h>
|
||||
#include <platform_detect.h>
|
||||
#include <rom_iap.h>
|
||||
#include <usb_queue.h>
|
||||
#include <usb_request.h>
|
||||
#include <usb_type.h>
|
||||
#ifdef HACKRF_ONE
|
||||
#include "gpio_lpc.h"
|
||||
#include <gpio.h>
|
||||
#include <platform_gpio.h>
|
||||
#endif
|
||||
|
||||
usb_request_status_t usb_vendor_request_read_board_id(
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <usb_type.h>
|
||||
#include <usb_request.h>
|
||||
#include <usb_type.h>
|
||||
|
||||
typedef struct {
|
||||
uint32_t part_id[2];
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue