Skip to content

Commit

Permalink
Exposed a function to tell the number of IQ samples to expect in the …
Browse files Browse the repository at this point in the history
…callback.
  • Loading branch information
touil committed Jul 26, 2019
1 parent 6574cbd commit 613852a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions libairspyhf/src/airspyhf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,12 @@ int ADDCALL airspyhf_close(airspyhf_device_t* device)
return result;
}

int ADDCALL airspyhf_get_output_size(airspyhf_device_t * device)
{
// Todo: Make this configurable
return SAMPLES_TO_TRANSFER;
}

int ADDCALL airspyhf_is_low_if(airspyhf_device_t* device)
{
return device->is_low_if;
Expand Down
5 changes: 3 additions & 2 deletions libairspyhf/src/airspyhf.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSI

#include <stdint.h>

#define AIRSPYHF_VERSION "1.6.7"
#define AIRSPYHF_VERSION "1.6.8"
#define AIRSPYHF_VER_MAJOR 1
#define AIRSPYHF_VER_MINOR 6
#define AIRSPYHF_VER_REVISION 7
#define AIRSPYHF_VER_REVISION 8

#define AIRSPYHF_ENDPOINT_IN (1)

Expand Down Expand Up @@ -123,6 +123,7 @@ extern ADDAPI int ADDCALL airspyhf_list_devices(uint64_t *serials, int count);
extern ADDAPI int ADDCALL airspyhf_open(airspyhf_device_t** device);
extern ADDAPI int ADDCALL airspyhf_open_sn(airspyhf_device_t** device, uint64_t serial_number);
extern ADDAPI int ADDCALL airspyhf_close(airspyhf_device_t* device);
extern ADDAPI int ADDCALL airspyhf_get_output_size(airspyhf_device_t* device); /* Returns the number of IQ samples to expect in the callback */
extern ADDAPI int ADDCALL airspyhf_start(airspyhf_device_t* device, airspyhf_sample_block_cb_fn callback, void* ctx);
extern ADDAPI int ADDCALL airspyhf_stop(airspyhf_device_t* device);
extern ADDAPI int ADDCALL airspyhf_is_streaming(airspyhf_device_t* device);
Expand Down

0 comments on commit 613852a

Please sign in to comment.