Merge branch 'multi-device-hardware-sync' of https://github.com/dodgymike/hackrf into dodgymike-multi-device-hardware-sync
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@
|
|||||||
*.hex
|
*.hex
|
||||||
*.srec
|
*.srec
|
||||||
host/build/
|
host/build/
|
||||||
|
host/**/build
|
||||||
|
|
||||||
# Operating system spew
|
# Operating system spew
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
@ -36,15 +36,13 @@ int main(void)
|
|||||||
led_on(LED2);
|
led_on(LED2);
|
||||||
led_on(LED3);
|
led_on(LED3);
|
||||||
|
|
||||||
for (i = 0; i < 2000000; i++) /* Wait a bit. */
|
delay(2000000);
|
||||||
__asm__("nop");
|
|
||||||
|
|
||||||
led_off(LED1);
|
led_off(LED1);
|
||||||
led_off(LED2);
|
led_off(LED2);
|
||||||
led_off(LED3);
|
led_off(LED3);
|
||||||
|
|
||||||
for (i = 0; i < 2000000; i++) /* Wait a bit. */
|
delay(2000000);
|
||||||
__asm__("nop");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -85,6 +85,17 @@ static struct gpio_t gpio_rffc5072_select = GPIO(2, 13);
|
|||||||
static struct gpio_t gpio_rffc5072_clock = GPIO(5, 6);
|
static struct gpio_t gpio_rffc5072_clock = GPIO(5, 6);
|
||||||
static struct gpio_t gpio_rffc5072_data = GPIO(3, 3);
|
static struct gpio_t gpio_rffc5072_data = GPIO(3, 3);
|
||||||
static struct gpio_t gpio_rffc5072_reset = GPIO(2, 14);
|
static struct gpio_t gpio_rffc5072_reset = GPIO(2, 14);
|
||||||
|
|
||||||
|
/*
|
||||||
|
static struct gpio_t gpio_sync_in_a = GPIO(3, 8);
|
||||||
|
static struct gpio_t gpio_sync_in_b = GPIO(3, 9);
|
||||||
|
static struct gpio_t gpio_sync_out_a = GPIO(3, 10);
|
||||||
|
static struct gpio_t gpio_sync_out_b = GPIO(3, 11);
|
||||||
|
*/
|
||||||
|
static struct gpio_t gpio_sync_in_a = GPIO(3, 10);
|
||||||
|
static struct gpio_t gpio_sync_in_b = GPIO(3, 11);
|
||||||
|
static struct gpio_t gpio_sync_out_a = GPIO(3, 8);
|
||||||
|
static struct gpio_t gpio_sync_out_b = GPIO(3, 9);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* RF LDO control */
|
/* RF LDO control */
|
||||||
@ -841,6 +852,15 @@ void pin_setup(void) {
|
|||||||
|
|
||||||
/* Safe state: start with VAA turned off: */
|
/* Safe state: start with VAA turned off: */
|
||||||
disable_rf_power();
|
disable_rf_power();
|
||||||
|
|
||||||
|
scu_pinmux(SCU_PINMUX_GPIO3_10, SCU_GPIO_PDN | SCU_CONF_FUNCTION0);
|
||||||
|
scu_pinmux(SCU_PINMUX_GPIO3_11, SCU_GPIO_PDN | SCU_CONF_FUNCTION0);
|
||||||
|
|
||||||
|
gpio_input(&gpio_sync_in_a);
|
||||||
|
gpio_input(&gpio_sync_in_b);
|
||||||
|
|
||||||
|
gpio_output(&gpio_sync_out_a);
|
||||||
|
gpio_output(&gpio_sync_out_b);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* enable input on SCL and SDA pins */
|
/* enable input on SCL and SDA pins */
|
||||||
@ -886,3 +906,34 @@ void led_off(const led_t led) {
|
|||||||
void led_toggle(const led_t led) {
|
void led_toggle(const led_t led) {
|
||||||
gpio_toggle(&gpio_led[led]);
|
gpio_toggle(&gpio_led[led]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void hw_sync_syn() {
|
||||||
|
gpio_set(&gpio_sync_out_a);
|
||||||
|
}
|
||||||
|
|
||||||
|
void hw_sync_stop() {
|
||||||
|
gpio_clear(&gpio_sync_out_a);
|
||||||
|
gpio_clear(&gpio_sync_out_b);
|
||||||
|
}
|
||||||
|
|
||||||
|
void hw_sync_ack() {
|
||||||
|
gpio_set(&gpio_sync_out_b);
|
||||||
|
}
|
||||||
|
|
||||||
|
void hw_sync_copy_state() {
|
||||||
|
if(gpio_read(&gpio_sync_in_a)) {
|
||||||
|
gpio_set(&gpio_sync_out_a);
|
||||||
|
} else {
|
||||||
|
gpio_clear(&gpio_sync_out_a);
|
||||||
|
}
|
||||||
|
if(gpio_read(&gpio_sync_in_b)) {
|
||||||
|
gpio_set(&gpio_sync_out_b);
|
||||||
|
} else {
|
||||||
|
gpio_clear(&gpio_sync_out_b);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool hw_sync_ready() {
|
||||||
|
return (gpio_read(&gpio_sync_in_a) && gpio_read(&gpio_sync_in_b));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -225,6 +225,11 @@ typedef enum {
|
|||||||
TRANSCEIVER_MODE_CPLD_UPDATE = 4
|
TRANSCEIVER_MODE_CPLD_UPDATE = 4
|
||||||
} transceiver_mode_t;
|
} transceiver_mode_t;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
HW_SYNC_MODE_OFF = 0,
|
||||||
|
HW_SYNC_MODE_ON = 1,
|
||||||
|
} hw_sync_mode_t;
|
||||||
|
|
||||||
void delay(uint32_t duration);
|
void delay(uint32_t duration);
|
||||||
|
|
||||||
/* TODO: Hide these configurations */
|
/* TODO: Hide these configurations */
|
||||||
@ -272,6 +277,13 @@ void led_on(const led_t led);
|
|||||||
void led_off(const led_t led);
|
void led_off(const led_t led);
|
||||||
void led_toggle(const led_t led);
|
void led_toggle(const led_t led);
|
||||||
|
|
||||||
|
void hw_sync_syn();
|
||||||
|
void hw_sync_stop();
|
||||||
|
void hw_sync_ack();
|
||||||
|
bool hw_sync_ready();
|
||||||
|
void hw_sync_copy_state();
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -43,7 +43,6 @@
|
|||||||
#include "usb_api_operacake.h"
|
#include "usb_api_operacake.h"
|
||||||
#include "operacake.h"
|
#include "operacake.h"
|
||||||
#include "usb_api_sweep.h"
|
#include "usb_api_sweep.h"
|
||||||
|
|
||||||
#include "usb_api_transceiver.h"
|
#include "usb_api_transceiver.h"
|
||||||
#include "usb_bulk_buffer.h"
|
#include "usb_bulk_buffer.h"
|
||||||
|
|
||||||
@ -80,7 +79,8 @@ static const usb_request_handler_fn vendor_request_handler[] = {
|
|||||||
usb_vendor_request_read_wcid, // USB_WCID_VENDOR_REQ
|
usb_vendor_request_read_wcid, // USB_WCID_VENDOR_REQ
|
||||||
usb_vendor_request_init_sweep,
|
usb_vendor_request_init_sweep,
|
||||||
usb_vendor_request_operacake_get_boards,
|
usb_vendor_request_operacake_get_boards,
|
||||||
usb_vendor_request_operacake_set_ports
|
usb_vendor_request_operacake_set_ports,
|
||||||
|
usb_vendor_request_set_hw_sync_mode
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint32_t vendor_request_handler_count =
|
static const uint32_t vendor_request_handler_count =
|
||||||
@ -193,6 +193,8 @@ int main(void) {
|
|||||||
sweep_mode();
|
sweep_mode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
start_streaming_on_hw_sync();
|
||||||
|
|
||||||
// Set up IN transfer of buffer 0.
|
// Set up IN transfer of buffer 0.
|
||||||
if ( usb_bulk_buffer_offset >= 16384
|
if ( usb_bulk_buffer_offset >= 16384
|
||||||
&& phase == 1
|
&& phase == 1
|
||||||
|
@ -230,7 +230,11 @@ usb_request_status_t usb_vendor_request_set_freq_explicit(
|
|||||||
}
|
}
|
||||||
|
|
||||||
static volatile transceiver_mode_t _transceiver_mode = TRANSCEIVER_MODE_OFF;
|
static volatile transceiver_mode_t _transceiver_mode = TRANSCEIVER_MODE_OFF;
|
||||||
|
static volatile hw_sync_mode_t _hw_sync_mode = HW_SYNC_MODE_OFF;
|
||||||
|
|
||||||
|
void set_hw_sync_mode(const hw_sync_mode_t new_hw_sync_mode) {
|
||||||
|
_hw_sync_mode = new_hw_sync_mode;
|
||||||
|
}
|
||||||
|
|
||||||
transceiver_mode_t transceiver_mode(void) {
|
transceiver_mode_t transceiver_mode(void) {
|
||||||
return _transceiver_mode;
|
return _transceiver_mode;
|
||||||
@ -261,18 +265,27 @@ void set_transceiver_mode(const transceiver_mode_t new_transceiver_mode) {
|
|||||||
led_off(LED3);
|
led_off(LED3);
|
||||||
rf_path_set_direction(&rf_path, RF_PATH_DIRECTION_OFF);
|
rf_path_set_direction(&rf_path, RF_PATH_DIRECTION_OFF);
|
||||||
vector_table.irq[NVIC_SGPIO_IRQ] = sgpio_isr_rx;
|
vector_table.irq[NVIC_SGPIO_IRQ] = sgpio_isr_rx;
|
||||||
|
|
||||||
|
hw_sync_stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hw_sync_stop();
|
||||||
|
|
||||||
if( _transceiver_mode != TRANSCEIVER_MODE_OFF ) {
|
if( _transceiver_mode != TRANSCEIVER_MODE_OFF ) {
|
||||||
si5351c_activate_best_clock_source(&clock_gen);
|
si5351c_activate_best_clock_source(&clock_gen);
|
||||||
|
|
||||||
|
if( _hw_sync_mode != HW_SYNC_MODE_OFF) {
|
||||||
|
hw_sync_syn();
|
||||||
|
} else {
|
||||||
baseband_streaming_enable(&sgpio_config);
|
baseband_streaming_enable(&sgpio_config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
usb_request_status_t usb_vendor_request_set_transceiver_mode(
|
usb_request_status_t usb_vendor_request_set_transceiver_mode(
|
||||||
usb_endpoint_t* const endpoint,
|
usb_endpoint_t* const endpoint,
|
||||||
const usb_transfer_stage_t stage
|
const usb_transfer_stage_t stage)
|
||||||
) {
|
{
|
||||||
if( stage == USB_TRANSFER_STAGE_SETUP ) {
|
if( stage == USB_TRANSFER_STAGE_SETUP ) {
|
||||||
switch( endpoint->setup.value ) {
|
switch( endpoint->setup.value ) {
|
||||||
case TRANSCEIVER_MODE_OFF:
|
case TRANSCEIVER_MODE_OFF:
|
||||||
@ -293,3 +306,27 @@ usb_request_status_t usb_vendor_request_set_transceiver_mode(
|
|||||||
return USB_REQUEST_STATUS_OK;
|
return USB_REQUEST_STATUS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
usb_request_status_t usb_vendor_request_set_hw_sync_mode(
|
||||||
|
usb_endpoint_t* const endpoint,
|
||||||
|
const usb_transfer_stage_t stage)
|
||||||
|
{
|
||||||
|
if( stage == USB_TRANSFER_STAGE_SETUP ) {
|
||||||
|
set_hw_sync_mode(endpoint->setup.value);
|
||||||
|
usb_transfer_schedule_ack(endpoint->in);
|
||||||
|
return USB_REQUEST_STATUS_OK;
|
||||||
|
} else {
|
||||||
|
return USB_REQUEST_STATUS_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void start_streaming_on_hw_sync()
|
||||||
|
{
|
||||||
|
if( _hw_sync_mode != HW_SYNC_MODE_OFF) {
|
||||||
|
while(!hw_sync_ready()) { }
|
||||||
|
hw_sync_ack();
|
||||||
|
led_on(LED3);
|
||||||
|
|
||||||
|
baseband_streaming_enable(&sgpio_config);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include <usb_type.h>
|
#include <usb_type.h>
|
||||||
#include <usb_request.h>
|
#include <usb_request.h>
|
||||||
|
|
||||||
|
void set_hw_sync_mode(const hw_sync_mode_t new_hw_sync_mode);
|
||||||
usb_request_status_t usb_vendor_request_set_transceiver_mode(
|
usb_request_status_t usb_vendor_request_set_transceiver_mode(
|
||||||
usb_endpoint_t* const endpoint,
|
usb_endpoint_t* const endpoint,
|
||||||
const usb_transfer_stage_t stage);
|
const usb_transfer_stage_t stage);
|
||||||
@ -52,10 +53,11 @@ usb_request_status_t usb_vendor_request_set_antenna_enable(
|
|||||||
usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage);
|
usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage);
|
||||||
usb_request_status_t usb_vendor_request_set_freq_explicit(
|
usb_request_status_t usb_vendor_request_set_freq_explicit(
|
||||||
usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage);
|
usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage);
|
||||||
|
usb_request_status_t usb_vendor_request_set_hw_sync_mode(
|
||||||
|
usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage);
|
||||||
|
|
||||||
transceiver_mode_t transceiver_mode(void);
|
transceiver_mode_t transceiver_mode(void);
|
||||||
void set_transceiver_mode(const transceiver_mode_t new_transceiver_mode);
|
void set_transceiver_mode(const transceiver_mode_t new_transceiver_mode);
|
||||||
usb_request_status_t usb_vendor_request_set_transceiver_mode(
|
void start_streaming_on_hw_sync();
|
||||||
usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage);
|
|
||||||
|
|
||||||
#endif/*__USB_API_TRANSCEIVER_H__*/
|
#endif/*__USB_API_TRANSCEIVER_H__*/
|
||||||
|
@ -114,6 +114,11 @@ typedef enum {
|
|||||||
TRANSCEIVER_MODE_SS = 3,
|
TRANSCEIVER_MODE_SS = 3,
|
||||||
} transceiver_mode_t;
|
} transceiver_mode_t;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
HW_SYNC_MODE_OFF = 0,
|
||||||
|
HW_SYNC_MODE_ON = 1,
|
||||||
|
} hw_sync_mode_t;
|
||||||
|
|
||||||
/* WAVE or RIFF WAVE file format containing IQ 2x8bits data for HackRF compatible with SDR# Wav IQ file */
|
/* WAVE or RIFF WAVE file format containing IQ 2x8bits data for HackRF compatible with SDR# Wav IQ file */
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -303,6 +308,8 @@ volatile uint32_t byte_count = 0;
|
|||||||
bool signalsource = false;
|
bool signalsource = false;
|
||||||
uint32_t amplitude = 0;
|
uint32_t amplitude = 0;
|
||||||
|
|
||||||
|
bool hw_sync = false;
|
||||||
|
|
||||||
bool receive = false;
|
bool receive = false;
|
||||||
bool receive_wav = false;
|
bool receive_wav = false;
|
||||||
|
|
||||||
@ -463,6 +470,7 @@ static void usage() {
|
|||||||
printf("\t[-R] # Repeat TX mode (default is off) \n");
|
printf("\t[-R] # Repeat TX mode (default is off) \n");
|
||||||
printf("\t[-b baseband_filter_bw_hz] # Set baseband filter bandwidth in Hz.\n\tPossible values: 1.75/2.5/3.5/5/5.5/6/7/8/9/10/12/14/15/20/24/28MHz, default < sample_rate_hz.\n" );
|
printf("\t[-b baseband_filter_bw_hz] # Set baseband filter bandwidth in Hz.\n\tPossible values: 1.75/2.5/3.5/5/5.5/6/7/8/9/10/12/14/15/20/24/28MHz, default < sample_rate_hz.\n" );
|
||||||
printf("\t[-C ppm] # Set Internal crystal clock error in ppm.\n");
|
printf("\t[-C ppm] # Set Internal crystal clock error in ppm.\n");
|
||||||
|
printf("\t[-H] # Synchronise USB transfer using GPIO pins.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static hackrf_device* device = NULL;
|
static hackrf_device* device = NULL;
|
||||||
@ -506,11 +514,14 @@ int main(int argc, char** argv) {
|
|||||||
float time_diff;
|
float time_diff;
|
||||||
unsigned int lna_gain=8, vga_gain=20, txvga_gain=0;
|
unsigned int lna_gain=8, vga_gain=20, txvga_gain=0;
|
||||||
|
|
||||||
while( (opt = getopt(argc, argv, "wr:t:f:i:o:m:a:p:s:n:b:l:g:x:c:d:C:R")) != EOF )
|
while( (opt = getopt(argc, argv, "Hwr:t:f:i:o:m:a:p:s:n:b:l:g:x:c:d:C:R")) != EOF )
|
||||||
{
|
{
|
||||||
result = HACKRF_SUCCESS;
|
result = HACKRF_SUCCESS;
|
||||||
switch( opt )
|
switch( opt )
|
||||||
{
|
{
|
||||||
|
case 'H':
|
||||||
|
hw_sync = true;
|
||||||
|
break;
|
||||||
case 'w':
|
case 'w':
|
||||||
receive_wav = true;
|
receive_wav = true;
|
||||||
break;
|
break;
|
||||||
@ -917,6 +928,15 @@ int main(int argc, char** argv) {
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fprintf(stderr, "call hackrf_set_hw_sync_mode(%d)\n",
|
||||||
|
hw_sync);
|
||||||
|
result = hackrf_set_hw_sync_mode(device, hw_sync ? HW_SYNC_MODE_ON : HW_SYNC_MODE_OFF);
|
||||||
|
if( result != HACKRF_SUCCESS ) {
|
||||||
|
fprintf(stderr, "hackrf_set_hw_sync_mode() failed: %s (%d)\n", hackrf_error_name(result), result);
|
||||||
|
usage();
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
if( transceiver_mode == TRANSCEIVER_MODE_RX ) {
|
if( transceiver_mode == TRANSCEIVER_MODE_RX ) {
|
||||||
result = hackrf_set_vga_gain(device, vga_gain);
|
result = hackrf_set_vga_gain(device, vga_gain);
|
||||||
result |= hackrf_set_lna_gain(device, lna_gain);
|
result |= hackrf_set_lna_gain(device, lna_gain);
|
||||||
|
@ -71,6 +71,7 @@ typedef enum {
|
|||||||
HACKRF_VENDOR_REQUEST_INIT_SWEEP = 26,
|
HACKRF_VENDOR_REQUEST_INIT_SWEEP = 26,
|
||||||
HACKRF_VENDOR_REQUEST_OPERACAKE_GET_BOARDS = 27,
|
HACKRF_VENDOR_REQUEST_OPERACAKE_GET_BOARDS = 27,
|
||||||
HACKRF_VENDOR_REQUEST_OPERACAKE_SET_PORTS = 28,
|
HACKRF_VENDOR_REQUEST_OPERACAKE_SET_PORTS = 28,
|
||||||
|
HACKRF_VENDOR_REQUEST_SET_HW_SYNC_MODE = 29,
|
||||||
} hackrf_vendor_request;
|
} hackrf_vendor_request;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -86,6 +87,11 @@ typedef enum {
|
|||||||
TRANSCEIVER_MODE_CPLD_UPDATE = 4,
|
TRANSCEIVER_MODE_CPLD_UPDATE = 4,
|
||||||
} hackrf_transceiver_mode;
|
} hackrf_transceiver_mode;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
HACKRF_HW_SYNC_MODE_OFF = 0,
|
||||||
|
HACKRF_HW_SYNC_MODE_ON = 1,
|
||||||
|
} hackrf_hw_sync_mode;
|
||||||
|
|
||||||
struct hackrf_device {
|
struct hackrf_device {
|
||||||
libusb_device_handle* usb_device;
|
libusb_device_handle* usb_device;
|
||||||
struct libusb_transfer** transfers;
|
struct libusb_transfer** transfers;
|
||||||
@ -390,7 +396,7 @@ hackrf_device_list_t* ADDCALL hackrf_device_list()
|
|||||||
serial_number_length = libusb_get_string_descriptor_ascii(usb_device, serial_descriptor_index, (unsigned char*)serial_number, sizeof(serial_number));
|
serial_number_length = libusb_get_string_descriptor_ascii(usb_device, serial_descriptor_index, (unsigned char*)serial_number, sizeof(serial_number));
|
||||||
if( serial_number_length == 32 ) {
|
if( serial_number_length == 32 ) {
|
||||||
serial_number[32] = 0;
|
serial_number[32] = 0;
|
||||||
list->serial_numbers[idx] = strdup(serial_number);
|
list->serial_numbers[idx] = strndup(serial_number, serial_number_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
libusb_close(usb_device);
|
libusb_close(usb_device);
|
||||||
@ -1553,6 +1559,26 @@ int ADDCALL hackrf_close(hackrf_device* device)
|
|||||||
return result1;
|
return result1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ADDCALL hackrf_set_hw_sync_mode(hackrf_device* device, const uint8_t value) {
|
||||||
|
int result = libusb_control_transfer(
|
||||||
|
device->usb_device,
|
||||||
|
LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE,
|
||||||
|
HACKRF_VENDOR_REQUEST_SET_HW_SYNC_MODE,
|
||||||
|
value,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
);
|
||||||
|
|
||||||
|
if( result != 0 )
|
||||||
|
{
|
||||||
|
return HACKRF_ERROR_LIBUSB;
|
||||||
|
} else {
|
||||||
|
return HACKRF_SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const char* ADDCALL hackrf_error_name(enum hackrf_error errcode)
|
const char* ADDCALL hackrf_error_name(enum hackrf_error errcode)
|
||||||
{
|
{
|
||||||
switch(errcode)
|
switch(errcode)
|
||||||
|
@ -198,6 +198,9 @@ extern ADDAPI int ADDCALL hackrf_set_txvga_gain(hackrf_device* device, uint32_t
|
|||||||
/* antenna port power control */
|
/* antenna port power control */
|
||||||
extern ADDAPI int ADDCALL hackrf_set_antenna_enable(hackrf_device* device, const uint8_t value);
|
extern ADDAPI int ADDCALL hackrf_set_antenna_enable(hackrf_device* device, const uint8_t value);
|
||||||
|
|
||||||
|
/* set hardware sync mode */
|
||||||
|
extern ADDAPI int ADDCALL hackrf_set_hw_sync_mode(hackrf_device* device, const uint8_t value);
|
||||||
|
|
||||||
extern ADDAPI const char* ADDCALL hackrf_error_name(enum hackrf_error errcode);
|
extern ADDAPI const char* ADDCALL hackrf_error_name(enum hackrf_error errcode);
|
||||||
extern ADDAPI const char* ADDCALL hackrf_board_id_name(enum hackrf_board_id board_id);
|
extern ADDAPI const char* ADDCALL hackrf_board_id_name(enum hackrf_board_id board_id);
|
||||||
extern ADDAPI const char* ADDCALL hackrf_usb_board_id_name(enum hackrf_usb_board_id usb_board_id);
|
extern ADDAPI const char* ADDCALL hackrf_usb_board_id_name(enum hackrf_usb_board_id usb_board_id);
|
||||||
|
Reference in New Issue
Block a user