libbladeRF
2.5.0
Nuand bladeRF library
|
These functions provide the ability to read and write the trigger control registers.
These functions are thread-safe.
Macros | |
#define | BLADERF_TRIGGER_REG_ARM ((uint8_t)(1 << 0)) |
#define | BLADERF_TRIGGER_REG_FIRE ((uint8_t)(1 << 1)) |
#define | BLADERF_TRIGGER_REG_MASTER ((uint8_t)(1 << 2)) |
#define | BLADERF_TRIGGER_REG_LINE ((uint8_t)(1 << 3)) |
Functions | |
API_EXPORT int CALL_CONV | bladerf_read_trigger (struct bladerf *dev, bladerf_channel ch, bladerf_trigger_signal signal, uint8_t *val) |
API_EXPORT int CALL_CONV | bladerf_write_trigger (struct bladerf *dev, bladerf_channel ch, bladerf_trigger_signal signal, uint8_t val) |
#define BLADERF_TRIGGER_REG_ARM ((uint8_t)(1 << 0)) |
Trigger control register "Arm" bit
This bit arms (i.e., enables) the trigger controller when set to 1. Samples will be gated until the "Fire" bit has been asserted.
A 0 in this bit disables the trigger controller. Samples will continue to flow as they normally do in this state.
Definition at line 3669 of file libbladeRF.h.
#define BLADERF_TRIGGER_REG_FIRE ((uint8_t)(1 << 1)) |
Trigger control register "Fire" bit
For a master, this bit causes a trigger to be sent to all slave devices. Once this trigger is received (the master "receives" it immediately as well), devices begin streaming samples.
This bit has no effect on slave devices.
Definition at line 3680 of file libbladeRF.h.
#define BLADERF_TRIGGER_REG_LINE ((uint8_t)(1 << 3)) |
Trigger control registers "line" bit
This is a read-only register bit that denotes the current state of the the trigger signal.
Definition at line 3698 of file libbladeRF.h.
#define BLADERF_TRIGGER_REG_MASTER ((uint8_t)(1 << 2)) |
Trigger control register "Master" bit
Selects whether the device is a trigger master (1) or trigger slave (0). The trigger master drives the trigger signal as an output.
Slave devices configure the trigger signal as an input.
Definition at line 3690 of file libbladeRF.h.
API_EXPORT int CALL_CONV bladerf_read_trigger | ( | struct bladerf * | dev, |
bladerf_channel | ch, | ||
bladerf_trigger_signal | signal, | ||
uint8_t * | val | ||
) |
Read trigger control register
dev | Device handle | |
[in] | ch | Channel |
[in] | signal | Trigger signal (control register) to read from |
[out] | val | Pointer to variable that register is read into See the BLADERF_TRIGGER_REG_* macros for the meaning of each bit. |
API_EXPORT int CALL_CONV bladerf_write_trigger | ( | struct bladerf * | dev, |
bladerf_channel | ch, | ||
bladerf_trigger_signal | signal, | ||
uint8_t | val | ||
) |
Write trigger control register
dev | Device handle | |
[in] | ch | Channel |
[in] | signal | Trigger signal to configure |
[in] | val | Data to write into the trigger control register. See the BLADERF_TRIGGER_REG_* macros for options. |