Skip to content

Commit

Permalink
Fix linking error in previous linux builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
cozycactus committed Jan 11, 2024
1 parent cb246b5 commit 0328378
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions include/librx888.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ extern "C" {
#endif

#include <stdint.h>
#include <rx888_export.h>

typedef struct rx888_dev rx888_dev_t;

Expand All @@ -36,15 +37,15 @@ typedef struct rx888_dev rx888_dev_t;
*
* \return the number of available devices
*/
uint32_t rx888_get_device_count(void);
RX888_API uint32_t rx888_get_device_count(void);

/*!
* Get the name of a device.
*
* \param index the device index
* \return the device name
*/
const char* rx888_get_device_name(uint32_t index);
RX888_API const char* rx888_get_device_name(uint32_t index);

/*!
* Get USB device strings.
Expand All @@ -57,7 +58,7 @@ const char* rx888_get_device_name(uint32_t index);
* \param serial serial number, may be NULL
* \return 0 on success
*/
int rx888_get_device_usb_strings(uint32_t index,
RX888_API int rx888_get_device_usb_strings(uint32_t index,
char *manufact,
char *product,
char *serial);
Expand All @@ -72,7 +73,7 @@ int rx888_get_device_usb_strings(uint32_t index,
* \return -2 if no devices were found at all
* \return -3 if devices were found, but none with matching name
*/
int rx888_get_index_by_serial(const char *serial);
RX888_API int rx888_get_index_by_serial(const char *serial);

/*!
* Open a device by index.
Expand All @@ -81,15 +82,15 @@ int rx888_get_index_by_serial(const char *serial);
* \param index the device index
* \return 0 on success
*/
int rx888_open(rx888_dev_t **dev, uint32_t index);
RX888_API int rx888_open(rx888_dev_t **dev, uint32_t index);

/*!
* Close a device.
*
* \param dev the device handle given by rx888_open()
* \return 0 on success
*/
int rx888_close(rx888_dev_t *dev);
RX888_API int rx888_close(rx888_dev_t *dev);

enum rx888_device {
RX888_DEVICE = 0
Expand All @@ -106,7 +107,7 @@ enum rx888_variant {
RX888_VARIANT_RX888MK3 = 0x07,
};

int rx888_set_hf_attenuation(void *dev, double rf_gain);
RX888_API int rx888_set_hf_attenuation(void *dev, double rf_gain);

/*!
* Set the sample rate for the device.
Expand All @@ -117,15 +118,15 @@ int rx888_set_hf_attenuation(void *dev, double rf_gain);
* sample loss is to be expected for rates > 150000000
* \return 0 on success, -EINVAL on invalid rate
*/
int rx888_set_sample_rate(rx888_dev_t *dev, uint32_t rate);
RX888_API int rx888_set_sample_rate(rx888_dev_t *dev, uint32_t rate);

/*!
* Get actual sample rate the device is configured to.
*
* \param dev the device handle given by rx888_open()
* \return 0 on error, sample rate in Hz otherwise
*/
uint32_t rx888_get_sample_rate(rx888_dev_t *dev);
RX888_API uint32_t rx888_get_sample_rate(rx888_dev_t *dev);

typedef void(*rx888_read_async_cb_t)(unsigned char *buf, uint32_t len, void *ctx);

Expand All @@ -143,7 +144,7 @@ typedef void(*rx888_read_async_cb_t)(unsigned char *buf, uint32_t len, void *ctx
* for default buffer length (16 * 32 * 512)
* \return 0 on success
*/
int rx888_read_async(rx888_dev_t *dev,
RX888_API int rx888_read_async(rx888_dev_t *dev,
rx888_read_async_cb_t cb,
void *ctx,
uint32_t buf_num,
Expand All @@ -155,7 +156,7 @@ int rx888_read_async(rx888_dev_t *dev,
* \param dev the device handle given by rx888_open()
* \return 0 on success
*/
int rx888_cancel_async(rx888_dev_t *dev);
RX888_API int rx888_cancel_async(rx888_dev_t *dev);

#ifdef __cplusplus
}
Expand Down

0 comments on commit 0328378

Please sign in to comment.