Skip to content

Commit

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

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

typedef struct hackrf_device hackrf_device;

typedef struct {
Expand All @@ -71,7 +73,7 @@ if not package.loaded['radio.blocks.sinks.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 2112525

Please sign in to comment.