ApBase API Development Guide

ApBase API Development Guide

Current as of Release 5.0.37

 

Introduction

The ApBase API provides an easy to use interface for controlling Aptina demo kit cameras.
ApBase performs these primary functions:

  •  

    • Enumerate all of the demo kit cameras that are connected to the host PC.

    • Run initialization scripts start the camera or change modes.

    • Provide read/write access to sensor/SOC/ISP registers. Further, ApBase understands what register settings on the sensor do, keeps track of all relevant sensor modes, and automatically updates the demo kit hardware when the sensor mode changes. For example, if a register write enables MIPI output from the sensor, ApBase will automatically enable the MIPI receiver on the demo kit hardware.

    • Receive images from the camera device.

    • Convert the image received from the demo kit into RGB for saving to a file or displaying on the screen.

Additional Information can be found in the following documents

  • State Variables; as used in INI files with "STATE=", see "ap_GetState" and "ap_SetState" for usage.

  • Modes; there are a few modes setings from INI files, see "ap_GetMode" and "ap_SetMode" for usage.

  • "apbase.h"; many other calls are available and found by searching for "ap_".

ApBase API is available in 64-bit only.

Quick Start

To use ApBase in C or C++, include the apbase.h header file, and link to apbase.lib.

When running the application, be sure that the following folders supplied with the DevWare installer are present;

Sample programs can be found here:

 

Here is a minimal procedure to open a demo kit camera, initialize the Aptina device, grab an image and convert it to RGB.

#include "apbase.h"

AP_HANDLE hApBase = ap_Create(0);
if (hApBase == NULL)
    return;

ap_LoadIniPreset(hApBase, NULL, NULL);   // initialize the sensor with the default from "Demo Initialization" preset

       // Read all sensor registers and configure the Demo3 and software according to the sensor settings.
       ap_CheckSensorState(apbase, 0);

size_t bufSize = ap_GrabFrame(hApBase, NULL, 0);
unsigned char *pBuffer = new unsigned char [bufSize];
ap_GrabFrame(hApBase, pBuffer, bufSize);

unsigned char *pRGB = NULL;
ap_u32 rgbWidth = 0, rgbHeight = 0, rgbBitDepth = 0;
if (ap_GetLastError() == MI_CAMERA_SUCCESS)
    pRGB = ap_ColorPipe(hApBase, pBuffer, bufSize, &rgbWidth, &rgbHeight, &rgbBitDepth);

delete [] pBuffer;
ap_Destroy(hApBase);
ap_Finalize();

Note: The call to ap_LoadIniPreset() with NULL parameters is only applicable in situations where the default initialization is sufficient. For demo kits with multiple possible configurations, such as ISP + sensor combinations or different connection options, you will need to specify the particular initialization preset for the configuration.

Note: when using a Demo3, it is recommended to perform a single call to ap_GrabFrame() after the call to ap_LoadIniPreset() to ensure that the Demo3 FIFO doesn't have a partial frame.

Please check out our YouTube video on ApBase for a quick overview.

Functions for Enumerating and Opening Devices

If using a specific verison of Python, set the path first using ap_SetPythonEnvPath().

To access the camera, first create a device handle using a Create call, or a Probe call followed by a Create call.

void ap_SetPythonEnvPath(const char *szPythonDir)

Parameters

Python install path; for example, "\\Users\\acecoder\\AppData\\Local\\Programs\\Python\\Python39".

Remarks

Must be called before device creation - recommended to make it the first ApBase call.

ap_s32 ap_DeviceProbe(const char *szSensorDataDirOrFile)

Parameters

A pointer to a file name or directory name. Can be NULL.

Return Value

Error code.

Remarks

Search the system for Aptina demo kit devices or other compatible camera devices, identify the type of sensor or ISP, and build a set of internal data structures for each device. Use ap_Create() to create the handle used by the other API functions to access the device.

If the parameter is NULL, the default installation directory is searched for a sensor data file matching each device. Otherwise the parameter can be a specific sensor data file (.xsdat file) to be used with the device, or a directory to be searched for compatible sensor data files.

ApBase will keep track of the modes and state of all of the devices. When the application is done using the ApBase API, call ap_Finalize() to close all drivers and free all memory associated with the devices.

ap_s32 ap_DeviceProbeDll(const char *szSensorDataDirOrFile, const char *szTransportDll)

Parameters

szSensorDataDirOrFile: a pointer to a file name or directory name. Can be NULL.

szTransportDll: a pointer to the location of the replacement Transport DLL. Can be NULL.

Return Value

Error code.

Remarks

Like ap_DeviceProbe(), except an alternative Transport DLL can be defined.  See ap_DeviceProbe() for additional information.

void ap_CancelProbe()

Cancel a device probe in progress in another thread.

int ap_NumCameras()

Return Value

Number of cameras.

Remarks

Return the number of cameras discovered by the device probe function.

void ap_Finalize()

Close all drivers and free all memory associated with the devices. Any existing AP_HANDLEs become invalid, so destroy all handles first.

ap_s32 ap_GetLastError()

Return Value

Error code.

Remarks

Return the error code from the last function call made in the current thread.

AP_HANDLE ap_Create(int nDeviceIndex)

Parameters

A device index, 0…ap_NumCameras() – 1.

Return Value

A device handle to be used with other ApBase functions.

Remarks

Create a handle to one of the devices discovered by the device probe. If the device probe has not been done yet, this function will call ap_DeviceProbe() with the default parameters.

This handle is used by the rest of the API calls to specify which device that function should apply to. Creating and destroying these handles does not affect the device or the device state information kept within ApBase.

void ap_Destroy(AP_HANDLE apbase)

Parameters

Device handle.

Remarks

Delete a handle created by ap_Create(). All handles should be destroyed before calling ap_Finalize().

int ap_GetCameraIndex(AP_HANDLE apbase)

Parameters

Device handle.

Return Value

Camera index.

Remarks

When multiple cameras are attached, return the index.  A call to ap_NumCameras() should be made first, anad then the return value can be used where nDeviceIndex is supplied.

AP_HANDLE ap_CreateFromImageFile(const char *szFilename)

Parameters

A pointer to an image file name. Cannot be NULL.

Return Value

Device handle.

Remarks

Create a device handle from an image file. This is a way to make use of the image file reading feature of ApBase. Calling ap_GrabFrame() on this handle will retrieve the image. The ap_ColorPipe() call can convert it to RGB if it is not RGB already, for example a Bayer image or YCbCr image.

Note:Although it's possible to pass an image file name to ap_DeviceProbe() and call ap_Create(0) to get a handle, that method then precludes the possibility of probing for physical camera devices. This function is the preferred way to make a device handle from an image file.

Destroying this handle frees all associated memory and data structures.

AP_HANDLE ap_CreateVirtual(const char *szFilename)

Parameters

A pointer to a sensor data (.xsdat) file name. Cannot be NULL.

Return Value

Device handle.

Remarks

Create a handle from a sensor data (.xsdat) file without connecting to a physical camera; just create the data structures in memory. This is a way to make use of the xsdat file parser in ApBase. Functions like mi_FindRegister() and mi_FindRegisterAddr() can be used to translate register symbolic names to addresses and vice-versa. I/O functions will do nothing.

Destroying this handle frees all associated memory and data structures.

AP_HANDLE ap_CreateFromMidlibCamera(mi_camera_t *pCamera)

Parameters

A Midlib camera structure pointer, as returned from mi_OpenCameras(). Cannot be NULL.

Return Value

Device handle.

Remarks

Create an ApBase handle from a pre-existing Midlib camera structure pointer. This can be useful to make an ApBase call in an application that originally used only Midlib calls, and has already done a device probe with Midlib mi_OpenCameras().

const char * ap_GetPartNumber(AP_HANDLE apbase)

Parameters

Device handle.

Return Value

Device Part Number string.

Remarks

The display name of the device; e.g. AR0132.

const char * ap_GetCameraSerialNumber(AP_HANDLE apbase)

Parameters

Device handle.

Return Value

Device Serial Number string of the device; e.g. A253821364.

Remarks

The display name of the device; e.g. AR0132.

const char * ap_GetFuseID(AP_HANDLE apbase, ap_s32 nIndex, char *pBuffer, ap_u32 nBufferSize)

Parameters

apbase – Device handle.
nIndex – Index to indicate the device if there is more than one
pBuffer –  Memory buffer to receive the FuseID as an ASCII string.
nBufferSize – Size of pBuffer in bytes

Return Value

Number of bytes of data copied to pBuffer, including the NUL byte.

Remarks

Gets the FuseID of the device as ASCII hex digits. The nIndex parameter can be used if there are more than one device with a FuseID; for example in the case of an AP0200 with an AR0140 attached, nIndex = 0 will get the AP0200 FuseID, and nIndex = 1 will get the AR0140 FuseID. Use 0 in most cases. If pBuffer is NULL then the function returns the amount of memory needed.

ap_u32 ap_GetShipAddr(AP_HANDLE apbase)

Parameters

Device handle.

Return Value

Device's "Ship" address (I2C address).

Remarks

The unsigned I2C address of the device; e.g. 0x20.

void ap_SetShipAddr(AP_HANDLE apbase, ap_u32 nShipAddr)

Parameters

Device handle.
nShipAddr - unsigned I2C address to be assigned for sensor.

Remarks

Must be a possible value for the given sensor.

mi_camera_t *ap_GetMidlibCamera(AP_HANDLE apbase)

Parameters

Device handle.

Return Value

Pointer to a Midlib camera structure.

Remarks

Retrieve a pointer to the Midlib camera structure for this device. This can be used to make Midlib calls to the device.

Note:Midlib can be used to write sensor registers or change the state of the camera device, but that can cause the state of the sensor to get out of sync with the state kept by ApBase. In that case use ap_CheckSensorState() to re-sync.

ap_u32 ap_GetMode(AP_HANDLE apbase, const char *szMode)

Parameters

apbase – Device handle.
szMode – Pointer to a mode name.

Return Value

The mode value.

Remarks

Get the current value of a demo kit device mode. The szMode strings are the same as the Midlib mi_modes symbols found in midlib2.h, without the MI_ prefix. For example "RX_TYPE". These modes affect the demo kit boards, not the sensor. Use ap_GetLastError() to get the error code.

ap_s32 ap_SetMode(AP_HANDLE apbase, const char *szMode, ap_u32 nValue)

Parameters

apbase – Device handle.
szMode – Pointer to a mode name.
nValue – New value for the mode.

Return Value

Error code.

Remarks

Set the current value of a demo kit device mode. The szMode strings are the same as the Midlib mi_modes symbols found in midlib2.h, without the MI_ prefix. For example "RX_TYPE". These modes affect the demo kit boards, not the sensor. Use ap_GetLastError() to get the error code.

Functions for the Debug Log

ApBase can log I/O activity and other info to a text file, which can be useful for debugging, or understanding what ApBase is doing at a low level. Your application can also output messages to the log.

void ap_OpenIoLog(ap_u32 nLogFlags, const char *szFilename)

Parameters

nLogFlags – A combination of AP_LOG_x flags. Determines what data to log.
szFilename – Name of a file for the log data. A new file is created each time this function is called. Digits 0, 1, etc. will be appended to the file name.

Remarks

Starts a new log file. The file extension is usually .txt. Digits are appended to the filename so the previous log is not overwritten when the program is run again. Use ap_GetIoLogFilename() to get the actual log filename if needed.

void ap_CloseIoLog()

Remarks

Close the current I/O log file.

const char * ap_GetIoLogFilename()

Return Value

The current I/O log file name.

Remarks

This function can be called after ap_CloseIoLog(), and will return the most recent log filename.

ap_u32 ap_GetIoLogFlags()

Return Value

The current I/O log flags.

Remarks

This function can be called after ap_CloseIoLog(), and will return the most recent log flags.

void ap_SetIoLogFlags(ap_u32 nLogFlags)

Return Value

Change the current I/O log flags.

Remarks

This function does nothing if a log file has not been started yet.

void ap_IoLogMsg(const char *szText)

Parameters

szText – A text string to add to the log.

Remarks

The text will be added to the log if there is a log file currently open and AP_LOG was one of the flags passed to OpenIoLog(). A newline at the end of the string is not needed. The text will be preceded by a timestamp in the log file.

void ap_IoLogDebugMsg(const char *szText, const char *szSource, const char *szFunc, ap_u32 nLine)

Parameters

szText – The message for the log.
szSource – Name of the current source file. Can be NULL.
szFunc – Name of the calling function.
nLine – Line number of the source file.

Remarks

The text will be added to the log if there is a log file currently open and AP_LOG_DEBUG was one of the flags passed to OpenIoLog(). A newline at the end of the string is not needed. The text will be preceded by a timestamp in the log file.

The szSource, szFunc, and nLine parameters are optional; if included they will be appended to the message. They are included to make it easy to find the location in your source code where a debug message originated from. Many compilers have macros like _FILE, __FUNCTION, __LINE_ that can be used here.

Functions for Executing Scripts

Scripts for initializing cameras and setting camera modes are contained in INI files.

ap_s32 ap_LoadIniPreset(AP_HANDLE apbase, const char *szIniFile, const char *szPreset)

Parameters

apbase – Device handle.
szIniFile – Pointer to an ini file name. Can be NULL.
szPreset – Name of the preset to run. Can be NULL.

Return Value

Error code. Returns 256 if successful.

Remarks

Execute the ini file preset specified. If the szIniFile parameter is NULL, the default ini file is used. If the szPreset parameter is NULL, the default initialization procedure is executed, usually "Python:", if it exists, followed by "Demo Initialization".

Note: Ini files with Python scripts may expect the preset named "Python:" to be executed once prior to any other preset in the file. ApBase will execute it if szPreset is NULL, but otherwise does not enforce this. The application should ensure that the "Python:" preset gets executed.

Note: if “Demo Initialization” ends up containing a “Prompt” command and that callback is not handled, it will choose the first option of the “Prompt” command.
If you run DevWareX with your sensor headboard, run “Demo Initialization”, and there is a separate Prompt dialog that appears, it will use the first one.
If you do have that case, then select the specific preset name you want to use so no user interaction is required.

ap_s32 ap_RunPython(AP_HANDLE apbase, const char *szStatements)

Parameters

apbase – Device handle.
szStatements – Pointer to a text string consisting of executable Python statements.

Return Value

Error code.

Remarks

Invoke the Python interpreter to execute the given statements.

Note: If your Python statements expect the preset named "Python:" in the default ini file to be executed prior, you may need to do that explicitly in your application using ap_LoadIniPreset().

ap_s64 ap_EvalPythonAsString(AP_HANDLE apbase, const char* szStatements, char* szResult, mi_s64 nBufferSize)

Parameters

apbase – Device handle.
szStatements – Pointer to a text string consisting of executable Python statements.
szResult - Pointer to result string.  "None" if no issues.
nBufferSize - size of szResult buffer.

Return Value

Size of szResult string.

Remarks

Invoke the Python interpreter to evaluate the given statement(s).

ap_s64 ap_EvalPythonAsBytes(AP_HANDLE apbase, const char* szStatements, unsigned char* szResult, mi_s64 nBufferSize)

Parameters

apbase – Device handle.
szStatements – Pointer to a text string consisting of executable Python statements.
szResult - Pointer to result string.  "None" if no issues.
nBufferSize - size of szResult buffer.

Return Value

Size of szResult string.

Remarks

Invoke the Python interpreter to evaluate the given statement(s).

ap_s32 ap_CheckSensorState(AP_HANDLE apbase , unsigned int nCheckFlags)

Parameters

apbase – Device handle.
nCheckFlags – Not used, pass zero.

Return Value

Error code.

Remarks

Re-read all registers on the device to determine the current modes, and update the internal data structures and the demo kit hardware.

Although ApBase examines all register writes as they happen to track the current modes of the camera, there are cases where the internal state of ApBase can get out of sync with the device. For example, downloading a firmware patch to an SOC or ISP can have results that can't be predicted by the software. This function can be used to re-sync ApBase to the device state.

Functions for Reading Sensor or ISP Registers

ap_s32 ap_GetSensorRegister(AP_HANDLE apbase, const char *szRegisterName, const char *szBitfieldName, ap_u32 *pnValue, ap_u32 bCached)

Parameters

apbase – Device handle.
szRegisterName – Register name, from xsdat file.
szBitfieldName – Bitfield name, from xsdat file. Can be NULL to read the whole register.
pnValue – Pointer to memory to receive the value from the register.
bCached – If non-zero, use a cached register value if available.

Return Value

Error code.

Remarks

Read the contents of a sensor or ISP register or bitfield, referenced by symbolic name.

ap_s32 ap_GetSensorRegisterAddr(AP_HANDLE apbase, mi_addr_type nAddrType, ap_u32 nAddrSpace, ap_u32 nAddr, ap_u32 nDataBits, ap_u32 *pnValue, ap_u32 bCached)

Parameters

apbase – Device handle.
nAddrType – Address type symbol (MI_REG_ADDR, etc.)
nAddrSpace – Register page or addressable region.
nAddr – Register address.
nDataBits – Width of the register read operation.
pnValue – Pointer to memory to receive the value from the register.
bCached – If non-zero, use a cached value if available.

Return Value

Error code.

Remarks

Read the contents of a sensor or ISP register, referenced by register type and address.

Functions for Writing Sensor or ISP Registers

Register write flags

Some register write functions can return status flags.

AP_FLAG_OK – No side-effect.
AP_FLAG_REALLOC – Image format (width, height) or buffer size may change.
AP_FLAG_PAUSE – Sensor may stop streaming.
AP_FLAG_RESUME – Sensor may resume streaming.
AP_FLAG_NOT_SUPPORTED – Selecting a mode that is not supported by the demo system.
AP_FLAG_ILLEGAL_REG_COMBO – The new value creates an invalid combination with some other register(s).
AP_FLAG_ILLEGAL_REG_VALUE – The new value is not supported by the device.
AP_FLAG_REGISTER_RESET – Many other register values will change (reset or state change).
AP_FLAG_CLOCK_FREQUENCY – The clock frequency will change (this is a PLL register or clock divider).
AP_FLAG_REG_LIST_CHANGED – The set of camera registers will change.
AP_FLAG_NOT_ACCESSIBLE – Register is not accessible (standby).
AP_FLAG_READONLY – Writing a read-only register.
AP_FLAG_WRITEONLY – Reading a write-only register.
AP_FLAG_OUTSIDE_REG_MASK – Writing outside the register mask (setting an undefined bit).

ap_s32 ap_SetSensorRegister(AP_HANDLE apbase, const char *szRegisterName, const char *szBitfieldName, ap_u32 nValue, ap_s32 *pnSideEffects)

Parameters

apbase – Device handle.
szRegisterName – Register name, from xsdat file.
szBitfieldName – Bitfield name, from xsdat file. Can be NULL to write the whole register.
nValue – New register value.
pnSideEffects – Pointer to a memory location to receive the side effects flags. Can be NULL.

Return Value

Error code.

Remarks

Write the contents of a sensor or ISP register or bitfield, referenced by symbolic name.
The pnSideEffects parameter will be set with flags indicating side-effects of writing the register. This parameter can be NULL.

ap_s32 ap_SetSensorRegisterAddr(AP_HANDLE apbase, mi_addr_type nAddrType, ap_u32 nAddrSpace, ap_u32 nAddr, ap_u32 nDataBits, ap_u32 nValue, ap_s32 *pnSideEffects)

Parameters

apbase – Device handle.
nAddrType – Address type symbol (MI_REG_ADDR, etc.)
nAddrSpace – Register page or addressable region.
nAddr – Register address.
nDataBits – Width of the register read operation.
nValue – New value for the register.
pnSideEffects – Pointer to a memory location to receive the side effects flags. Can be NULL.

Return Value

Error code.

Remarks

Same as ap_SetSensorRegisterA(), but the register is referenced by register type and address, and always writes the whole register.

ap_s32 ap_TestSetSensorRegister(AP_HANDLE apbase, const char *szRegisterName, ap_u32 nNewValue, ap_u32 nOldValue, ap_u32 *pnOldValue)

Parameters

apbase – Device handle.
szRegisterName – Register name, from xsdat file.
nNewValue – New register value.
nOldValue – Current register value.
pnOldValue – Pointer to a memory location to receive the current register value. May be NULL.

Return Value

A combination of side-effects flags.

Remarks

Get the side-effects of a register write, without writing the register; the register being referenced by symbolic name. This lets the application know if a register write will have side-effects or an error before writing the register. For example, if there is an error flag, the application could skip the register write, or prompt the user.

If pnOldValue is non-NULL, ap_TestSetSensorRegister() will read the current value of the register from the device. If the current value of the register is already known to the caller, pass it in nOldValue and pass NULL for pnOldValue. Otherwise pass a pointer to a variable as pnOldValue.

If the side-effects flags include AP_FLAG_REALLOC then the image format would change, and background threads streaming images should be stopped before the register is written.

ap_s32 ap_ TestSetSensorRegisterAddr(AP_HANDLE apbase, mi_addr_type nAddrType, ap_u32 nAddrSpace, ap_u32 nAddr, ap_u32 nDataBits, ap_u32 nNewValue, ap_u32 nOldValue, ap_u32 *pnOldValue)

Parameters

apbase – Device handle.
nAddrType – Address type symbol (MI_REG_ADDR, etc.)
nAddrSpace – Register page or addressable region.
nAddr – Register address.
nDataBits – Width of the register read operation.
nNewValue – New value for the register.
nOldValue – Current register value.
pnOldValue – Pointer to a memory location to receive the current register value. May be NULL.

Return Value

A combination of side-effects flags.

Remarks

Same as ap_TestSetSensorRegisterA(), but the register referenced by address type and address.

ap_s32 ap_GetLastSideEffects()

Return Value

Combination of side-effects flags.

Remarks

Returns the side-effects flags from the last sensor register-set function called in the current thread.

Functions for Enumerating Sensor, ISP or Demo Kit Registers

These functions enable enumerating all of the named registers in a .xsdat file or .cdat file, for example to create a register dump or populate a GUI.

ap_s32 ap_NumRegisters(AP_HANDLE apbase, const char *szDevice)

Parameters

apbase – Device handle.
szDevice – Part number of sensor or ISP, or chip name of Demo kit FPGA. Can be NULL or empty, which will refer to the sensor or ISP.

Return Value

Number of registers on the device, or 0 on error.

Remarks

This function can also be used to test for the existence of specific demo kit hardware.

AP_HANDLE ap_Register(AP_HANDLE apbase, const char *szDevice, int nIndex)

Parameters

apbase – Device handle.
szDevice – Part number of sensor or ISP, or chip name of Demo kit FPGA. Can be NULL or empty, which will refer to the sensor or ISP.
nIndex – Ordinal of a register, 0 to ap_NumRegisters() – 1.

Return Value

A register object handle for the register property functions.

Remarks

Use ap_DestroyRegister() to free the handle.

AP_HANDLE ap_FindRegister(AP_HANDLE apbase, const char *szDevice, const char *szRegister)

Parameters

apbase – Device handle.
szDevice – Part number of sensor or ISP, or chip name of Demo kit FPGA. Can be NULL or empty, which will refer to the sensor or ISP.
szRegister – Symbolic name of a register.

Return Value

A register object handle for the register property functions.

Remarks

Use ap_DestroyRegister() to free the handle.

void ap_DestroyRegister(AP_HANDLE apreg)

Parameters

apreg – Register handle.

Remarks

Free the handle.

const char * ap_RegisterSymbol(AP_HANDLE apreg)

Parameters

apreg – Register handle.

Return Value

Symbolic name of the register.

Remarks

This name is used by other API calls, in INI file scripts, etc.

const char * ap_RegisterDisplayName(AP_HANDLE apreg)

Parameters

apreg – Register handle.

Return Value

Display name of the register.

Remarks

Very often this is the same as the symbolic name, but lower case.

const char * ap_RegisterDetail(AP_HANDLE apreg)

Parameters

apreg – Register handle.

Return Value

Short description of the register.

Remarks

A one-line description of the register.

const char * ap_RegisterLongDesc(AP_HANDLE apreg)

Parameters

apreg – Register handle.

Return Value

Long description of the register.

Remarks

This is the full data sheet documentation of the register.

ap_u32 ap_RegisterBitwidth(AP_HANDLE apreg)

Parameters

apreg – Register handle.

Return Value

The width of the register in bits.

Remarks

Can be 8, 16 or 32. In many cases, only a subset of the bits are meaningful.

ap_u32 ap_RegisterMask(AP_HANDLE apreg)

Parameters

apreg – Register handle.

Return Value

Which bits of the register are meaningful.

Remarks
.

ap_u32 ap_RegisterDefault(AP_HANDLE apreg)

Parameters

apreg – Register handle.

Return Value

The default value of the register.

Remarks
.

const char * ap_RegisterDatatype(AP_HANDLE apreg)

Parameters

apreg – Register handle.

Return Value

Data type of the register.

Remarks

Example values are "unsigned", "signed", "fixed8", etc.

double ap_RegisterMinimum(AP_HANDLE apreg)

Parameters

apreg – Register handle.

Return Value

The minimum recommended or useful value of the register.

Remarks

The return value is converted to floating point according to the data type of the register.

double ap_RegisterMaximum(AP_HANDLE apreg)

Parameters

apreg – Register handle.

Return Value

The maximum recommended or useful value of the register.

Remarks

The return value is converted to floating point according to the data type of the register.

ap_u32 ap_RegisterAddr(AP_HANDLE apreg)

Parameters

apreg – Register handle.

Return Value

The register address.

Remarks

ap_u32 ap_RegisterAddrSpace(AP_HANDLE apreg)

Parameters