Purpose
This function will log an SPI exit point to the currently active entry/exit
trace file. The product and component ID's set in the entry will be written
along with the date and time of the when the data was logged. The spiID, along
with any optional data that is passed on the request, will also be logged.
Syntax
unsigned int CWB_ENTRY cwbSV_LogSPIExit(
cwbSV_TraceSPIHandle traceSPIHandle,
unsigned char spiID,
char *spiData,
unsigned long spiDataLength);
Parameters
- cwbSV_TraceSPIHandle traceSPIHandle - input
- Handle that was returned by a previous call to cwbSV_CreateTraceSPIHandle().
- unsigned char spiID - input
- A unique one-byte code that will distinguish this SPI trace point from
others that are logged by your program. Definition of these codes are left
up to the caller of this API. The recommended approach is to use the defined
range (0x00 - 0xFF) for each unique component in your product (that is, start
at 0x00 for each component)
- char * spiData - input
- Points to a buffer that contains additional data (for example, output
parameter values passed back to your caller) that you want to log along with
this exit point. Parameter is optional, it is ignored if the address is NULL
or the data length is zero. This buffer can contain binary data because the
length parameter is used in determining the amount to trace.
- unsigned long spiDataLength - input
- Specifies the number of bytes in the SPI data buffer to log for this
trace entry.
Return Codes
The following list shows common return values.
- CWB_OK
- Successful completion.
- CWB_INVALID_HANDLE
- Handle is not valid.
Usage
This call should allows be used in conjunction with a corresponding "cwbSV_LogSPIEntry()".
It is recommended that these calls would be put at the beginning and end of
an API routine that you write. The other method would be to use these log
functions around calls to external routines that are not written by you.