no-OS
|
API definitions header file. More...
#include <stdint.h>
Go to the source code of this file.
Classes | |
struct | adi_reg_data |
struct | adi_chip_id_t |
struct | jesd_param_t |
Macros | |
#define | ADI_POW2_48 ((uint64_t)1u<<48) |
#define | ADI_MAXUINT48 (ADI_POW2_48 - 1) |
#define | ADI_POW2_32 ((uint64_t)1u<<32) |
#define | ADI_MAXUINT32 (ADI_POW2_32 - 1) |
#define | ADI_MAXUINT24 (0xFFFFFF) |
#define | ADI_GET_BYTE(w, p) (uint8_t)(((w) >> (p)) & 0xFF) |
#define | ALL -1 |
#define | U64MSB 0x8000000000000000ull |
Typedefs | |
typedef int32_t(* | spi_xfer_t) (void *user_data, uint8_t *indata, uint8_t *outdata, int32_t size_bytes) |
Platform dependent SPI access functions. More... | |
typedef int32_t(* | delay_us_t) (void *user_data, uint32_t us) |
Delay for specified number of microseconds. Platform Dependant. More... | |
typedef int(* | hw_open_t) (void *user_data) |
Platform hardware initialisation for the AD9164 Device. More... | |
typedef int(* | hw_close_t) (void *user_data) |
Closes any platform hardware resources for the AD9164 Device. More... | |
typedef int(* | event_handler_t) (uint16_t event, uint8_t ref, void *data) |
Client Event Handler. More... | |
typedef int(* | tx_en_pin_ctrl_t) (void *user_data, uint8_t enable) |
TX_ENABLE PIN CONTROL FUNCTION. More... | |
typedef int(* | reset_pin_ctrl_t) (void *user_data, uint8_t enable) |
RESETB PIN CONTROL FUNCTION. More... | |
Enumerations | |
enum | spi_sdo_config_t { SPI_NONE = 0, SPI_SDO = 1, SPI_SDIO = 2, SPI_CONFIG_MAX = 3, SPI_NONE = 0, SPI_SDO = 1, SPI_SDIO = 2, SPI_CONFIG_MAX = 3 } |
enum | signal_type_t { SIGNAL_CMOS = 0, SIGNAL_LVDS, SIGNAL_UNKNOWN, SIGNAL_CMOS = 0, SIGNAL_LVDS, SIGNAL_UNKNOWN } |
enum | signal_coupling_t { COUPLING_AC = 0, COUPLING_DC, COUPLING_UNKNOWN, COUPLING_AC = 0, COUPLING_DC, COUPLING_UNKNOWN } |
enum | jesd_link_t { JESD_LINK_0 = 0x0, JESD_LINK_1 = 0x1, JESD_LINK_ALL = 0xFF, JESD_LINK_0 = 0x0, JESD_LINK_1 = 0x1, JESD_LINK_ALL = 0xFF } |
enum | jesd_syncoutb_t { SYNCOUTB_0 = 0x0, SYNCOUTB_1 = 0x1, SYNCOUTB_ALL = 0xFF, SYNCOUTB_0 = 0x0, SYNCOUTB_1 = 0x1, SYNCOUTB_ALL = 0xFF } |
enum | jesd_sysref_mode_t { SYSREF_NONE = 0x0, SYSREF_ONESHOT, SYSREF_CONT, SYSREF_MON, SYSREF_MODE_INVLD, SYSREF_NONE, SYSREF_ONESHOT, SYSREF_CONT, SYSREF_MON, SYSREF_MODE_INVLD } |
enum | jesd_prbs_pattern_t { PRBS_NONE, PRBS7, PRBS15, PRBS31, PRBS_MAX, PRBS_NONE, PRBS7, PRBS15, PRBS31, PRBS_MAX } |
API definitions header file.
This file contains all common API definitions.
Copyright(c) 2016 Analog Devices, Inc. All Rights Reserved. This software is proprietary to Analog Devices, Inc. and its licensors. By using this software you agree to the terms of the associated Analog Devices Software License Agreement.
#define ADI_GET_BYTE | ( | w, | |
p | |||
) | (uint8_t)(((w) >> (p)) & 0xFF) |
#define ADI_MAXUINT24 (0xFFFFFF) |
#define ADI_MAXUINT32 (ADI_POW2_32 - 1) |
#define ADI_MAXUINT48 (ADI_POW2_48 - 1) |
#define ADI_POW2_32 ((uint64_t)1u<<32) |
#define ADI_POW2_48 ((uint64_t)1u<<48) |
#define ALL -1 |
#define U64MSB 0x8000000000000000ull |
typedef int32_t(* delay_us_t) (void *user_data, uint32_t us) |
Delay for specified number of microseconds. Platform Dependant.
Performs a blocking or sleep delay for the specified time in microseconds The implementation of this function is platform dependant and is required for correct operation of the API.
0 | for success |
Any | non-zero value indicates an error |
us | - time to delay/sleep in microseconds. |
typedef int(* event_handler_t) (uint16_t event, uint8_t ref, void *data) |
Client Event Handler.
event | A uint16_t value representing the event that occurred. |
ref | A uint8_t value indicating the reference for that event if any. For example 0 if even occured on lane 0. |
data | A void pointer to any user data that may pertain to that event. |
0 | for success |
Any | non-zero value indicates an error |
typedef int(* hw_close_t) (void *user_data) |
Closes any platform hardware resources for the AD9164 Device.
This function shall close or shutdown all external hardware resources required by the AD9164 Device and API for correct functionatlity as per the target platform. For example initialisation of SPI, GPIO resources, clocks etc. It should close and free any resources assigned in the hw_open_t function.
*user_data | - A void pointer to a client defined structure containing any parameters/settings that may be required by the function to close/shutdown the hardware for the ADI Device. |
0 | for success |
Any | non-zero value indicates an error |
typedef int(* hw_open_t) (void *user_data) |
Platform hardware initialisation for the AD9164 Device.
This function shall initialize all external hardware resources required by the ADI Device and API for correct functionatlity as per the target platform. For example initialisation of SPI, GPIO resources, clocks etc.
*user_data | - A void pointer to a client defined structure containing any parameters/settings that may be required by the function to initialise the hardware for the ADI Device. |
0 | for success |
Any | non-zero value indicates an error |
typedef int(* reset_pin_ctrl_t) (void *user_data, uint8_t enable) |
RESETB PIN CONTROL FUNCTION.
*user_data | A void pointer to a client defined structure containing any parameters/settings that may be required by the function to control the hardware for the ADI Device RESETB PIN. |
enable | A uint8_t value indicating the desired enable/disable reset via the ADI device RESETB pin. A value of 1 indicates RESETB pin is set LOW A value of 0 indicates RESETB pin is set HIGH |
0 | for success |
Any | non-zero value indicates an error |
typedef int32_t(* spi_xfer_t) (void *user_data, uint8_t *indata, uint8_t *outdata, int32_t size_bytes) |
Platform dependent SPI access functions.
indata | Pointer to array with the data to be sent on the SPI |
outdata | Pointer to array where the data to which the SPI will be written |
size_bytes | The size in bytes allocated for each of the indata and outdata arrays. |
0 | for success |
Any | non-zero value indicates an error |
typedef int(* tx_en_pin_ctrl_t) (void *user_data, uint8_t enable) |
TX_ENABLE PIN CONTROL FUNCTION.
*user_data | A void pointer to a client defined structure containing any parameters/settings that may be required by the function to control the hardware for the ADI Device TX_ENABLE PIN. |
enable | A uint8_t value indicating the desired enable/disable setting for the tx_enable pin. A value of 1 indicates TX_ENABLE pin is set HIGH A value of 0 indicates TX_ENABLE pin is set LOW |
0 | for success |
Any | non-zero value indicates an error |
enum jesd_link_t |
enum jesd_prbs_pattern_t |
enum jesd_syncoutb_t |
enum jesd_sysref_mode_t |
Enumerates SYSREF Synchronization Mode
enum signal_coupling_t |
enum signal_type_t |
enum spi_sdo_config_t |