Add spacing lines between declarations in hackrf.h.

This commit is contained in:
Martin Ling
2022-07-07 10:53:35 +01:00
parent c0d13de598
commit e8e6784881

View File

@ -191,6 +191,7 @@ struct hackrf_device_list {
void** usb_devices; void** usb_devices;
int usb_devicecount; int usb_devicecount;
}; };
typedef struct hackrf_device_list hackrf_device_list_t; typedef struct hackrf_device_list hackrf_device_list_t;
typedef int (*hackrf_sample_block_cb_fn)(hackrf_transfer* transfer); typedef int (*hackrf_sample_block_cb_fn)(hackrf_transfer* transfer);
@ -200,42 +201,52 @@ extern "C" {
#endif #endif
extern ADDAPI int ADDCALL hackrf_init(); extern ADDAPI int ADDCALL hackrf_init();
extern ADDAPI int ADDCALL hackrf_exit(); extern ADDAPI int ADDCALL hackrf_exit();
extern ADDAPI const char* ADDCALL hackrf_library_version(); extern ADDAPI const char* ADDCALL hackrf_library_version();
extern ADDAPI const char* ADDCALL hackrf_library_release(); extern ADDAPI const char* ADDCALL hackrf_library_release();
extern ADDAPI hackrf_device_list_t* ADDCALL hackrf_device_list(); extern ADDAPI hackrf_device_list_t* ADDCALL hackrf_device_list();
extern ADDAPI int ADDCALL hackrf_device_list_open( extern ADDAPI int ADDCALL hackrf_device_list_open(
hackrf_device_list_t* list, hackrf_device_list_t* list,
int idx, int idx,
hackrf_device** device); hackrf_device** device);
extern ADDAPI void ADDCALL hackrf_device_list_free(hackrf_device_list_t* list); extern ADDAPI void ADDCALL hackrf_device_list_free(hackrf_device_list_t* list);
extern ADDAPI int ADDCALL hackrf_open(hackrf_device** device); extern ADDAPI int ADDCALL hackrf_open(hackrf_device** device);
extern ADDAPI int ADDCALL hackrf_open_by_serial( extern ADDAPI int ADDCALL hackrf_open_by_serial(
const char* const desired_serial_number, const char* const desired_serial_number,
hackrf_device** device); hackrf_device** device);
extern ADDAPI int ADDCALL hackrf_close(hackrf_device* device); extern ADDAPI int ADDCALL hackrf_close(hackrf_device* device);
extern ADDAPI int ADDCALL hackrf_start_rx( extern ADDAPI int ADDCALL hackrf_start_rx(
hackrf_device* device, hackrf_device* device,
hackrf_sample_block_cb_fn callback, hackrf_sample_block_cb_fn callback,
void* rx_ctx); void* rx_ctx);
extern ADDAPI int ADDCALL hackrf_stop_rx(hackrf_device* device); extern ADDAPI int ADDCALL hackrf_stop_rx(hackrf_device* device);
extern ADDAPI int ADDCALL hackrf_start_tx( extern ADDAPI int ADDCALL hackrf_start_tx(
hackrf_device* device, hackrf_device* device,
hackrf_sample_block_cb_fn callback, hackrf_sample_block_cb_fn callback,
void* tx_ctx); void* tx_ctx);
extern ADDAPI int ADDCALL hackrf_stop_tx(hackrf_device* device); extern ADDAPI int ADDCALL hackrf_stop_tx(hackrf_device* device);
extern ADDAPI int ADDCALL hackrf_get_m0_state( extern ADDAPI int ADDCALL hackrf_get_m0_state(
hackrf_device* device, hackrf_device* device,
hackrf_m0_state* value); hackrf_m0_state* value);
extern ADDAPI int ADDCALL hackrf_set_tx_underrun_limit( extern ADDAPI int ADDCALL hackrf_set_tx_underrun_limit(
hackrf_device* device, hackrf_device* device,
uint32_t value); uint32_t value);
extern ADDAPI int ADDCALL hackrf_set_rx_overrun_limit( extern ADDAPI int ADDCALL hackrf_set_rx_overrun_limit(
hackrf_device* device, hackrf_device* device,
uint32_t value); uint32_t value);
@ -247,6 +258,7 @@ extern ADDAPI int ADDCALL hackrf_max2837_read(
hackrf_device* device, hackrf_device* device,
uint8_t register_number, uint8_t register_number,
uint16_t* value); uint16_t* value);
extern ADDAPI int ADDCALL hackrf_max2837_write( extern ADDAPI int ADDCALL hackrf_max2837_write(
hackrf_device* device, hackrf_device* device,
uint8_t register_number, uint8_t register_number,
@ -256,6 +268,7 @@ extern ADDAPI int ADDCALL hackrf_si5351c_read(
hackrf_device* device, hackrf_device* device,
uint16_t register_number, uint16_t register_number,
uint16_t* value); uint16_t* value);
extern ADDAPI int ADDCALL hackrf_si5351c_write( extern ADDAPI int ADDCALL hackrf_si5351c_write(
hackrf_device* device, hackrf_device* device,
uint16_t register_number, uint16_t register_number,
@ -269,23 +282,28 @@ extern ADDAPI int ADDCALL hackrf_rffc5071_read(
hackrf_device* device, hackrf_device* device,
uint8_t register_number, uint8_t register_number,
uint16_t* value); uint16_t* value);
extern ADDAPI int ADDCALL hackrf_rffc5071_write( extern ADDAPI int ADDCALL hackrf_rffc5071_write(
hackrf_device* device, hackrf_device* device,
uint8_t register_number, uint8_t register_number,
uint16_t value); uint16_t value);
extern ADDAPI int ADDCALL hackrf_spiflash_erase(hackrf_device* device); extern ADDAPI int ADDCALL hackrf_spiflash_erase(hackrf_device* device);
extern ADDAPI int ADDCALL hackrf_spiflash_write( extern ADDAPI int ADDCALL hackrf_spiflash_write(
hackrf_device* device, hackrf_device* device,
const uint32_t address, const uint32_t address,
const uint16_t length, const uint16_t length,
unsigned char* const data); unsigned char* const data);
extern ADDAPI int ADDCALL hackrf_spiflash_read( extern ADDAPI int ADDCALL hackrf_spiflash_read(
hackrf_device* device, hackrf_device* device,
const uint32_t address, const uint32_t address,
const uint16_t length, const uint16_t length,
unsigned char* data); unsigned char* data);
extern ADDAPI int ADDCALL hackrf_spiflash_status(hackrf_device* device, uint8_t* data); extern ADDAPI int ADDCALL hackrf_spiflash_status(hackrf_device* device, uint8_t* data);
extern ADDAPI int ADDCALL hackrf_spiflash_clear_status(hackrf_device* device); extern ADDAPI int ADDCALL hackrf_spiflash_clear_status(hackrf_device* device);
/* device will need to be reset after hackrf_cpld_write */ /* device will need to be reset after hackrf_cpld_write */
@ -295,15 +313,18 @@ extern ADDAPI int ADDCALL hackrf_cpld_write(
const unsigned int total_length); const unsigned int total_length);
extern ADDAPI int ADDCALL hackrf_board_id_read(hackrf_device* device, uint8_t* value); extern ADDAPI int ADDCALL hackrf_board_id_read(hackrf_device* device, uint8_t* value);
extern ADDAPI int ADDCALL hackrf_version_string_read( extern ADDAPI int ADDCALL hackrf_version_string_read(
hackrf_device* device, hackrf_device* device,
char* version, char* version,
uint8_t length); uint8_t length);
extern ADDAPI int ADDCALL hackrf_usb_api_version_read( extern ADDAPI int ADDCALL hackrf_usb_api_version_read(
hackrf_device* device, hackrf_device* device,
uint16_t* version); uint16_t* version);
extern ADDAPI int ADDCALL hackrf_set_freq(hackrf_device* device, const uint64_t freq_hz); extern ADDAPI int ADDCALL hackrf_set_freq(hackrf_device* device, const uint64_t freq_hz);
extern ADDAPI int ADDCALL hackrf_set_freq_explicit( extern ADDAPI int ADDCALL hackrf_set_freq_explicit(
hackrf_device* device, hackrf_device* device,
const uint64_t if_freq_hz, const uint64_t if_freq_hz,
@ -315,6 +336,7 @@ extern ADDAPI int ADDCALL hackrf_set_sample_rate_manual(
hackrf_device* device, hackrf_device* device,
const uint32_t freq_hz, const uint32_t freq_hz,
const uint32_t divider); const uint32_t divider);
extern ADDAPI int ADDCALL hackrf_set_sample_rate( extern ADDAPI int ADDCALL hackrf_set_sample_rate(
hackrf_device* device, hackrf_device* device,
const double freq_hz); const double freq_hz);
@ -343,14 +365,18 @@ extern ADDAPI int ADDCALL hackrf_set_antenna_enable(
const uint8_t value); 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( extern ADDAPI const char* ADDCALL hackrf_usb_board_id_name(
enum hackrf_usb_board_id usb_board_id); enum hackrf_usb_board_id usb_board_id);
extern ADDAPI const char* ADDCALL hackrf_filter_path_name(const enum rf_path_filter path); extern ADDAPI const char* ADDCALL hackrf_filter_path_name(const enum rf_path_filter path);
/* Compute nearest freq for bw filter (manual filter) */ /* Compute nearest freq for bw filter (manual filter) */
extern ADDAPI uint32_t ADDCALL hackrf_compute_baseband_filter_bw_round_down_lt( extern ADDAPI uint32_t ADDCALL hackrf_compute_baseband_filter_bw_round_down_lt(
const uint32_t bandwidth_hz); const uint32_t bandwidth_hz);
/* Compute best default value depending on sample rate (auto filter) */ /* Compute best default value depending on sample rate (auto filter) */
extern ADDAPI uint32_t ADDCALL hackrf_compute_baseband_filter_bw( extern ADDAPI uint32_t ADDCALL hackrf_compute_baseband_filter_bw(
const uint32_t bandwidth_hz); const uint32_t bandwidth_hz);
@ -376,23 +402,28 @@ extern ADDAPI int ADDCALL hackrf_init_sweep(
extern ADDAPI int ADDCALL hackrf_get_operacake_boards( extern ADDAPI int ADDCALL hackrf_get_operacake_boards(
hackrf_device* device, hackrf_device* device,
uint8_t* boards); uint8_t* boards);
extern ADDAPI int ADDCALL hackrf_set_operacake_mode( extern ADDAPI int ADDCALL hackrf_set_operacake_mode(
hackrf_device* device, hackrf_device* device,
uint8_t address, uint8_t address,
enum operacake_switching_mode mode); enum operacake_switching_mode mode);
extern ADDAPI int ADDCALL hackrf_get_operacake_mode( extern ADDAPI int ADDCALL hackrf_get_operacake_mode(
hackrf_device* device, hackrf_device* device,
uint8_t address, uint8_t address,
enum operacake_switching_mode* mode); enum operacake_switching_mode* mode);
extern ADDAPI int ADDCALL hackrf_set_operacake_ports( extern ADDAPI int ADDCALL hackrf_set_operacake_ports(
hackrf_device* device, hackrf_device* device,
uint8_t address, uint8_t address,
uint8_t port_a, uint8_t port_a,
uint8_t port_b); uint8_t port_b);
extern ADDAPI int ADDCALL hackrf_set_operacake_dwell_times( extern ADDAPI int ADDCALL hackrf_set_operacake_dwell_times(
hackrf_device* device, hackrf_device* device,
hackrf_operacake_dwell_time* dwell_times, hackrf_operacake_dwell_time* dwell_times,
uint8_t count); uint8_t count);
extern ADDAPI int ADDCALL hackrf_set_operacake_freq_ranges( extern ADDAPI int ADDCALL hackrf_set_operacake_freq_ranges(
hackrf_device* device, hackrf_device* device,
hackrf_operacake_freq_range* freq_ranges, hackrf_operacake_freq_range* freq_ranges,
@ -413,11 +444,13 @@ extern ADDAPI int ADDCALL hackrf_operacake_gpio_test(
hackrf_device* device, hackrf_device* device,
uint8_t address, uint8_t address,
uint16_t* test_result); uint16_t* test_result);
#ifdef HACKRF_ISSUE_609_IS_FIXED #ifdef HACKRF_ISSUE_609_IS_FIXED
extern ADDAPI int ADDCALL hackrf_cpld_checksum(hackrf_device* device, uint32_t* crc); extern ADDAPI int ADDCALL hackrf_cpld_checksum(hackrf_device* device, uint32_t* crc);
#endif /* HACKRF_ISSUE_609_IS_FIXED */ #endif /* HACKRF_ISSUE_609_IS_FIXED */
extern ADDAPI int ADDCALL hackrf_set_ui_enable(hackrf_device* device, const uint8_t value); extern ADDAPI int ADDCALL hackrf_set_ui_enable(hackrf_device* device, const uint8_t value);
extern ADDAPI int ADDCALL hackrf_start_rx_sweep( extern ADDAPI int ADDCALL hackrf_start_rx_sweep(
hackrf_device* device, hackrf_device* device,
hackrf_sample_block_cb_fn callback, hackrf_sample_block_cb_fn callback,