📄 testengine.h
字号:
defines the handle to the host / host controller connection. This
value is used as a parameter for all other function calls.
Description : An initTestEngine function has to be called before any
communication with BlueCore can begin.
Note that over SPI transport the function set is limited to those
that use BCCMD. Commands not supported will return
TE_UNSUPPORTED_FUNCTION.
*************************************************************************************/
TESTENGINE_API(uint32) initTestEngineSpi(int aPort, int aMulti, char aStopOnSpiAccess);
/*************************************************************************************
Function Name : int closeTestEngine( uint32 handle);
Parameters :
handle - handle to the device.
Returns : Always 1.
Description : This function should always be called when terminating
communications with BlueCore. This function will NOT issue a reset.
*************************************************************************************/
TESTENGINE_API(int) closeTestEngine( uint32 handle);
/*******************************************************************************
Function Name : uint32 teGetLastError(uint32 handle);
Parameters :
handle - handle to the device.
Returns : Last reported error code. If this value is zero then no error
was reported. A non-zero value signifies an error and the
value is decoded as follows:
<table>
<tr><td>Byte 1 (0x000000ff) = BCCMD error
<tr><td>Byte 2 (0x0000ff00) = Reserved
<tr><td>Byte 3 (0x00ff0000) = HCI / DM error
<tr><td>Byte 4 (0xff000000) = Reserved
</table>
BCCMD errors are defined as:
<table>
<tr><td>0 = No error
<tr><td>1 = BCCMD command ID not supported
<tr><td>2 = Data exceeded
<tr><td>3 = Variable ahs no value
<tr><td>4 = Get or set command held an error
<tr><td>5 = Value inaccessable
<tr><td>6 = Unwriteable
<tr><td>7 = Unreadable
<tr><td>8 = Other error
<tr><td>9 = Request not allowed
</table>
HCI / DM errors are defined in the Bluetooth specification.
Description : This function can be called to obtain a more detailed error
description when a TestEngine function fails.<br>
The return value of this function should not be relied upon
unless the preceding TestEngine function call returned 0 (for
failure).<br>
Error codes in the format returned by this function are
defined at the top of TestEngine.h.
*******************************************************************************/
TESTENGINE_API(uint32) teGetLastError(uint32 handle);
/*************************************************************************************
Function Name : int bccmdSetColdReset( uint32 handle, int usbTimeout);
Parameters :
handle - handle to the device.
usbTimeout - where transport = 2, this parameter will define the
timeout to allow the USB device to ennumerate if it
has not already ennumerated. It has been found that some PC's
take a longer time than expected to ennumerate a USB device and,
in some cases, the PC's internal USB hub may have been reset
which can cause a further delay in ennumeration. This parameter
can be set to accomodate the extra time taken to reset USB devices.
Returns : -1 on invalid handle, 1 on success, 0 on failure.
Description : This command forces a hardware reset of BlueCore, deliberately
discarding all of its current state - the command emulates removing
power from the chip, then restoring it. It will attempt to
reinitialise communication using the same transport settings as
declared in initTestEngine(..). If the reset or the
re-establishment fails the objects associated with the
communication stack will be deleted.
*************************************************************************************/
TESTENGINE_API(int) bccmdSetColdReset( uint32 handle, int usbTimeout);
/*************************************************************************************
Function Name : int bccmdSetWarmReset( uint32 handle, int usbTimeout);
Parameters :
handle - handle to the device.
usbTimeout - where transport = 2, this parameter will define the
timeout to allow the USB device to ennumerate if it
has not already ennumerated. It has been found that some PC's
take a longer time than expected to ennumerate a USB device and,
in some cases, the PC's internal USB hub may have been reset
which can cause a further delay in ennumeration. This parameter
can be set to accomodate the extra time taken to reset USB devices.
Returns : -1 on invalid handle, 1 on success, 0 on failure.
Description : This forces a hardware reset of the BlueCore, arranging that
some elements of the chip抯 current state may be available when
the chip is restarted, assuming the chip remains powered through
the reset. It will then attempt to reinitialise communication
using the same transport settings as declared in
initTestEngine(). If the reset or the re-establishment fails the
objects associated with the communication stack will be deleted.
*************************************************************************************/
TESTENGINE_API(int) bccmdSetWarmReset( uint32 handle, int usbTimeout);
/*************************************************************************************
MISC. TESTS
*************************************************************************************/
/*************************************************************************************
Function Name : int radiotestPause( uint32 handle);
Parameters : handle - handle to the device
Returns : -1 on invalid handle, 1 on success, 0 on failure.
Description : This function will cause any tests running to terminate.
*************************************************************************************/
TESTENGINE_API(int) radiotestPause( uint32 handle);
/*************************************************************************************
Function Name : int radiotestDeepSleep(uint32 handle);
Parameters : handle - handle to the device
Returns : -1 on invalid handle, 1 on success, 0 on failure
Description : This function will cause the DUT to enter deep sleep.
*************************************************************************************/
TESTENGINE_API(int) radiotestDeepSleep(uint32 handle);
/*************************************************************************************
Function Name : int radiotestPcmExtLb(uint32 handle, uint16 pcm_mode);
Parameters : handle - handle to the device
pcm_mode - can be
<table>
<tr><td>0 Slave in normal 4-wire configuration
<tr><td>1 Master in normal 4-wire configuration
<tr><td>2 Master in Alcatel-specific 2-wire configuration
</table>
Returns : -1 on invalid handle, 1 on success, 0 on failure
Description : This command enables PCM external loopback test mode in which a
block of random data is written to the PCM output port and is read
back again on the PCM input port. A check is made that the data
matches. External wiring must be provided between the corresponding
pins. The pcm_mode parameter can take the following values:
0 Slave in normal four-wire configuration
1 Master in normal four-wire configuration
2 Master in Manchester encoded, two-wire configuration
For a 憂ormal
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -