Skip to content

Commit

Permalink
Change to async SDR acquire thread (merbanan#1978)
Browse files Browse the repository at this point in the history
  • Loading branch information
zuckschwerdt authored Mar 7, 2023
1 parent fa13eb6 commit 46de49f
Show file tree
Hide file tree
Showing 7 changed files with 294 additions and 282 deletions.
30 changes: 0 additions & 30 deletions include/compat_alarm.h

This file was deleted.

1 change: 1 addition & 0 deletions include/rtl_433.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ typedef struct r_cfg {
struct dm_state *demod;
char const *sr_filename;
int sr_execopen;
int watchdog; ///< SDR acquire stall watchdog
/* stats*/
time_t frames_since; ///< stats start time
unsigned frames_count; ///< stats counter for interval
Expand Down
8 changes: 5 additions & 3 deletions include/sdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,14 @@ int sdr_reset(sdr_dev_t *dev, int verbose);
Make sure none are in use anymore.
@param dev the device handle
@param cb a callback for sdr_event_t messages
@param ctx a user context to be passed to @p cb
@param async_cb a callback for sdr_event_t messages
@param async_ctx a user context to be passed to @p async_cb
@param buf_num the number of buffers to keep
@param buf_len the size in bytes of each buffer
@return 0 on success
*/
int sdr_start(sdr_dev_t *dev, sdr_event_cb_t cb, void *ctx, uint32_t buf_num, uint32_t buf_len);
int sdr_start(sdr_dev_t *dev, sdr_event_cb_t async_cb, void *async_ctx, uint32_t buf_num, uint32_t buf_len);
int sdr_start_sync(sdr_dev_t *dev, sdr_event_cb_t cb, void *ctx, uint32_t buf_num, uint32_t buf_len);

/** Stop the SDR data acquisition.
Expand All @@ -203,6 +204,7 @@ int sdr_start(sdr_dev_t *dev, sdr_event_cb_t cb, void *ctx, uint32_t buf_num, ui
@return 0 on success
*/
int sdr_stop(sdr_dev_t *dev);
int sdr_stop_sync(sdr_dev_t *dev);

/** Redirect SoapySDR library logging.
*/
Expand Down
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ add_library(r_433 STATIC
am_analyze.c
baseband.c
bitbuffer.c
compat_alarm.c
compat_paths.c
compat_time.c
confparse.c
Expand Down
85 changes: 0 additions & 85 deletions src/compat_alarm.c

This file was deleted.

Loading

0 comments on commit 46de49f

Please sign in to comment.