当前位置:网站首页>IP - RF data converter -04- API User Guide - system settings related functions

IP - RF data converter -04- API User Guide - system settings related functions

2022-06-21 06:08:00 Vuko-wxh

Preface

This article mainly introduces about RF How to use the system configuration function of the data converter .

user API function

All users API Functions are in the source file xrfdc.c To realize . These prototypes are in the header file xrfdc.h Provided in the .

System settings

All drivers API All functions will InstancePtr As a parameter . It's pointing to XRFdc Pointer to structure , It contains information about the base address 、 Point to RFdc The structure of the default configuration and RF-ADC and RF-DAC tile Information about the configuration structure . InstancePtr Parameter in XRFdc_CfgInitialize API Function . Before calling any other function , call XRFdc_CfgInitialize API Function to initialize InstancePtr.

XRFdc_CfgInitialize

The function prototype

u32 XRFdc_CfgInitialize(XRFdc *InstancePtr, XRFdc_Config *ConfigPtr);

Parameters

  • XRFdc * InstancePtr: Pointer to the driver instance .

  • *XRFdc_Config ConfigPtr: Pointer to the configuration structure .

describe

this API The function populates the appropriate entries in the driver instance by copying related entries from the configuration structure . And RFdc The driver API This function is required for any software interaction with , And must be using any other API Call this function first before the .
Return value

XRFDC_SUCCESS

XRFDC_FAILURE

XRFdc_LookupConfig

The function prototype

XRFdc_Config *XRFdc_LookupConfig(u16 DeviceId);

Parameters

  • u16 DeviceId: Of the device whose configuration information is required ID.

describe

The API The function depends on the uniqueness of the device ID Find device configuration . A table contains configuration information for each device in the system .

Return value

This function returns a pointer to the found configuration , If the specified device is not found ID, Then return to NULL.

XRFdc_RegisterMetal

The function prototype

u32 XRFdc_RegisterMetal(XRFdc *InstancePtr, u16 DeviceId, struct metal_device **DevicePtr);

Parameters

  • XRFdc * InstancePtr: Pointer to the driver instance .

  • u16 Device_Id: Driver's device ID.

  • struct metal_device **DevicePtr: Point to metal Pointer to the device .

describe

The API Function USES Libmetal register RFDC.

Return value

XRFDC_SUCCESS

XRFDC_FAILURE

XRFdc_StartUp

The function prototype

u32 XRFdc_StartUp(XRFdc *InstancePtr, u32 Type, int Tile_Id);

Parameters

  • *XRFdc InstancePtr: Pointer to the driver instance .
  • u32 Type :RF-ADC or RF-DAC; RF-ADC by 0,RF-DAC by 1.
  • int Tile_Id :RF-ADC/RF-DAC Block number . Valid values are 0-3 and -1( Applicable to all pieces ).

describe
this API Functions are based on Tile_Id Request to restart the slice . If -1 As Tile_Id Pass on , This function will restart all enabled slices . Existing register settings are not lost or changed during this process .
Return value

XRFDC_SUCCESS

XRFDC_FAILURE( stay tile Returns... When not enabled or available )

XRFdc_Shutdown

The function prototype

u32 XRFdc_Shutdown(XRFdc *InstancePtr, u32 Type, int Tile_Id);
  • *XRFdc InstancePtr : Pointer to the driver instance .
  • u32 Type : RF-ADC or RF-DAC; RF-ADC by 0,RF-DAC by 1.
  • int Tile_Id: Valid values are 0-3 and -1( Applicable to all blocks ).

describe
this API Functions are based on Tile_Id Request stop slice for . If -1 As Tile_Id Pass on , This function will stop all enabled slices . Existing register settings will not be cleared . This is a RF-ADC and RF-DAC Common to blocks API function .
Return value

XRFDC_SUCCESS

XRFDC_FAILURE( stay tile Returns... When not enabled or available )

XRFdc_Reset

The function prototype

u32 XRFdc_Reset(XRFdc *InstancePtr, u32 Type, int Tile_Id);

Parameters

  • *XRFdc InstancePtr: Pointer to the driver instance .
  • u32 Type: RF-ADC or RF-DAC; RF-ADC by 0,RF-DAC by 1.
  • int Tile_Id : Valid values are 0-3 and -1( Applicable to all blocks ).

describe

this API Function by Tile_Id Request to reset block . If -1 As Tile_Id Pass on , It will reset all enabled tiles . All existing register settings will be cleared and replaced with the originally configured settings . This is a RF-ADC and RF-DAC Common to blocks API function .

Return value

XRFDC_SUCCESS

XRFDC_FAILURE( stay tile Returns... When not enabled or available )

XRFdc_CustomStartUp

The function prototype

u32 XRFdc_CustomStartUp(XRFdc *InstancePtr, u32 Type, int Tile_Id, u32 StartState, u32 EndState);

Parameters

  • *XRFdc InstancePtr: Pointer to the driver instance .
  • u32 Type: RF-ADC or RF-DAC; RF-ADC by 0,RF-DAC by 1.
  • int Tile_Id : Valid values are 0-3 and -1( Applicable to all blocks ).
  • u32 StartState : start-up IPSM The state of .
  • u32 Endstate : The highest IPSM The state of .

image-20220408102254121 describe
this API The function is passed by Tile_Id Request , take IPSM from StartState Run to the EndState. If -1 As Tile_Id Pass on , The function runs for all enabled tiles . If StartState by XRFDC_STATE_OFF, Existing register settings will be lost or changed .

Return value

XRFDC_SUCCESS

XRFDC_FAILURE

XRFdc_DumpRegs

The function prototype

void XRFdc_DumpRegs (XRFdc *InstancePtr, u32 Type, int Tile_Id);

Parameters

  • *XRFdc InstancePtr: Pointer to the driver instance .
  • u32 Type: RF-ADC or RF-DAC; RF-ADC by 0,RF-DAC by 1.
  • int Tile_Id : Valid values are 0-3 and -1( Applicable to all blocks ).

explain

This function is used for debugging purposes . It prints the contents of the register to the console , To display the passed Tile_Id. If it passes -1, It will print out the corresponding RF-ADC or RF-DAC Register contents of all tiles of . It prints out the offset and contents of the register .

原网站

版权声明
本文为[Vuko-wxh]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/172/202206210557325594.html