libbladeRF  2.5.0
Nuand bladeRF library
Macros | Functions
Error codes

Description

bladeRF library routines return negative values to indicate errors. Values >= 0 are used to indicate success.

int status = bladerf_set_gain(dev, BLADERF_CHANNEL_RX(0), 2);
if (status < 0) {
handle_error();
}
#define BLADERF_CHANNEL_RX(ch)
Definition: libbladeRF.h:664
API_EXPORT int CALL_CONV bladerf_set_gain(struct bladerf *dev, bladerf_channel ch, bladerf_gain gain)

Macros

#define BLADERF_ERR_UNEXPECTED   (-1)
 
#define BLADERF_ERR_RANGE   (-2)
 
#define BLADERF_ERR_INVAL   (-3)
 
#define BLADERF_ERR_MEM   (-4)
 
#define BLADERF_ERR_IO   (-5)
 
#define BLADERF_ERR_TIMEOUT   (-6)
 
#define BLADERF_ERR_NODEV   (-7)
 
#define BLADERF_ERR_UNSUPPORTED   (-8)
 
#define BLADERF_ERR_MISALIGNED   (-9)
 
#define BLADERF_ERR_CHECKSUM   (-10)
 
#define BLADERF_ERR_NO_FILE   (-11)
 
#define BLADERF_ERR_UPDATE_FPGA   (-12)
 
#define BLADERF_ERR_UPDATE_FW   (-13)
 
#define BLADERF_ERR_TIME_PAST   (-14)
 
#define BLADERF_ERR_QUEUE_FULL   (-15)
 
#define BLADERF_ERR_FPGA_OP   (-16)
 
#define BLADERF_ERR_PERMISSION   (-17)
 
#define BLADERF_ERR_WOULD_BLOCK   (-18)
 
#define BLADERF_ERR_NOT_INIT   (-19)
 

Functions

API_EXPORT const char *CALL_CONV bladerf_strerror (int error)
 

Macro Definition Documentation

◆ BLADERF_ERR_CHECKSUM

#define BLADERF_ERR_CHECKSUM   (-10)

Invalid checksum

Definition at line 4251 of file libbladeRF.h.

◆ BLADERF_ERR_FPGA_OP

#define BLADERF_ERR_FPGA_OP   (-16)

An FPGA operation reported failure

Definition at line 4258 of file libbladeRF.h.

◆ BLADERF_ERR_INVAL

#define BLADERF_ERR_INVAL   (-3)

Invalid operation/parameter

Definition at line 4244 of file libbladeRF.h.

◆ BLADERF_ERR_IO

#define BLADERF_ERR_IO   (-5)

File/Device I/O error

Definition at line 4246 of file libbladeRF.h.

◆ BLADERF_ERR_MEM

#define BLADERF_ERR_MEM   (-4)

Memory allocation error

Definition at line 4245 of file libbladeRF.h.

◆ BLADERF_ERR_MISALIGNED

#define BLADERF_ERR_MISALIGNED   (-9)

Misaligned flash access

Definition at line 4250 of file libbladeRF.h.

◆ BLADERF_ERR_NO_FILE

#define BLADERF_ERR_NO_FILE   (-11)

File not found

Definition at line 4252 of file libbladeRF.h.

◆ BLADERF_ERR_NODEV

#define BLADERF_ERR_NODEV   (-7)

No device(s) available

Definition at line 4248 of file libbladeRF.h.

◆ BLADERF_ERR_NOT_INIT

#define BLADERF_ERR_NOT_INIT   (-19)

Device insufficiently initialized for operation

Definition at line 4267 of file libbladeRF.h.

◆ BLADERF_ERR_PERMISSION

#define BLADERF_ERR_PERMISSION   (-17)

Insufficient permissions for the requested operation

Definition at line 4260 of file libbladeRF.h.

◆ BLADERF_ERR_QUEUE_FULL

#define BLADERF_ERR_QUEUE_FULL   (-15)

Could not enqueue data into full queue

Definition at line 4257 of file libbladeRF.h.

◆ BLADERF_ERR_RANGE

#define BLADERF_ERR_RANGE   (-2)

Provided parameter is out of range

Definition at line 4243 of file libbladeRF.h.

◆ BLADERF_ERR_TIME_PAST

#define BLADERF_ERR_TIME_PAST   (-14)

Requested timestamp is in the past

Definition at line 4255 of file libbladeRF.h.

◆ BLADERF_ERR_TIMEOUT

#define BLADERF_ERR_TIMEOUT   (-6)

Operation timed out

Definition at line 4247 of file libbladeRF.h.

◆ BLADERF_ERR_UNEXPECTED

#define BLADERF_ERR_UNEXPECTED   (-1)

An unexpected failure occurred

Definition at line 4242 of file libbladeRF.h.

◆ BLADERF_ERR_UNSUPPORTED

#define BLADERF_ERR_UNSUPPORTED   (-8)

Operation not supported

Definition at line 4249 of file libbladeRF.h.

◆ BLADERF_ERR_UPDATE_FPGA

#define BLADERF_ERR_UPDATE_FPGA   (-12)

An FPGA update is required

Definition at line 4253 of file libbladeRF.h.

◆ BLADERF_ERR_UPDATE_FW

#define BLADERF_ERR_UPDATE_FW   (-13)

A firmware update is requied

Definition at line 4254 of file libbladeRF.h.

◆ BLADERF_ERR_WOULD_BLOCK

#define BLADERF_ERR_WOULD_BLOCK   (-18)

Operation would block, but has been requested to be non-blocking. This indicates to a caller that it may need to retry the operation later.

Definition at line 4265 of file libbladeRF.h.

Function Documentation

◆ bladerf_strerror()

API_EXPORT const char* CALL_CONV bladerf_strerror ( int  error)

Obtain a textual description of a value from the Error codes list

Parameters
[in]errorError value to look up
Returns
Error string