| libbladeRF 2.6.0-git-fcf94233-dirty Nuand bladeRF library

Loading...
Searching...
No Matches
Macros | Functions
Trigger Control
Low-level Functions

## Description

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)

## Macro Definition Documentation

## ◆ BLADERF_TRIGGER_REG_ARM

#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 3761 of file libbladeRF.h.

## ◆ BLADERF_TRIGGER_REG_FIRE

#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 3772 of file libbladeRF.h.

## ◆ BLADERF_TRIGGER_REG_LINE

#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 3790 of file libbladeRF.h.

## ◆ BLADERF_TRIGGER_REG_MASTER

#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 3782 of file libbladeRF.h.

## Function Documentation

## ◆ bladerf_read_trigger()

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

Parameters

  | 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.

Returns
  0 on success, value from Error codes list on failure

## ◆ bladerf_write_trigger()

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

Parameters

  | 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.

Returns
  0 on success, value from Error codes list on failure