EasyManuals Logo

Analog Devices ADRV9002 User Manual

Analog Devices ADRV9002
338 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #36 background imageLoading...
Page #36 background image
UG-1828 Preliminary Technical Data
Rev. PrC | Page 36 of 338
int32_t(*adi_hal_Wait_us)(void *devHalCfg, uint32_t time_us) = linux_uio_TimerWait_us;
The file continues from this point to set the functions which handle the I2C reading and writing, the SPI reading and writing, assigning
the RESET pin, etc. Taking note of the second line of the file, a customer need only define a CUSTOMER_PLATFORM variable for the
pre-processor to use their own platform code. Doing so will change the operation of the adi_platform.c file as follows:
#else
#include "adi_common_hal_customer.h"
#include "adi_adm1293_hal_customer.h"
#include "adi_adrv9001_hal_customer.h"
#include "adi_fpga9001_hal_customer.h"
/* Logging interface */
int32_t(*adi_hal_LogWrite)(void *devHalCfg, uint32_t logLevel, const char *comment, va_list args) = customer_LogWrite;
/* Timer interface */
int32_t(*adi_hal_Wait_us)(void *devHalCfg, uint32_t time_us) = customer_TimerWait_us;
Once done, the adi_platform.c code will automatically switch to using the placeholder customer code under the customer\ folder.
Below is provided a code snippet from adi_adrv9001_hal_customer.c, located under customer\adrv9001\. Here can be seen each function
that is required by the HAL to support a customer-specific platform. It is advisable to have read the example HAL implementation
provided under the linux_uio\ folder to gain an understanding of the purpose of each function, as well as the acceptable return values.
Function names may be modified, if desired, provided the pointer assignments in adi_platform.c are updated accordingly. However, the
function parameters may not be modified, as this would cause compilation errors.
#include "adi_adrv9001_hal_customer.h"
int32_t customer_adi_adrv9001_hal_open(void *devHalCfg)
{
/* Customer code goes here */
return 0;
}
int32_t customer_adi_adrv9001_hal_close(void *devHalCfg)
{
/* Customer code goes here */
return 0;
}
int32_t customer_adi_adrv9001_hal_spi_write(void *devHalCfg, const uint8_t txData[], uint32_t numTxBytes)
{
/* Customer code goes here */

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Analog Devices ADRV9002 and is the answer not in the manual?

Analog Devices ADRV9002 Specifications

General IconGeneral
BrandAnalog Devices
ModelADRV9002
CategoryTransceiver
LanguageEnglish

Related product manuals