Skip to content

Commit

Permalink
blocks/sinks/hackrf: use enum for consistency with public api in ffi …
Browse files Browse the repository at this point in the history
…cdefs
  • Loading branch information
vsergeev committed Feb 27, 2020
1 parent 2112525 commit 3da7e37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion radio/blocks/sinks/hackrf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ end

if not package.loaded['radio.blocks.sources.hackrf'] then
ffi.cdef[[
enum hackrf_error { HACKRF_SUCCESS = 0, };

typedef struct hackrf_device hackrf_device;

typedef struct {
Expand All @@ -63,7 +65,7 @@ if not package.loaded['radio.blocks.sources.hackrf'] then

typedef int (*hackrf_sample_block_cb_fn)(hackrf_transfer* transfer);

const char* hackrf_error_name(int errcode);
const char* hackrf_error_name(enum hackrf_error errcode);

int hackrf_init(void);
int hackrf_exit(void);
Expand Down

0 comments on commit 3da7e37

Please sign in to comment.