![]() |
ISF
2.1
Intelligent Sensing Framework for Kinetis with Processor Expert
|
Go to the source code of this file.
Functions | |
RLI_CHANNEL_HANDLE * | isf_rli_init (uint32 channelID) |
This function initializes a register level interface. More... | |
RLI_DEV_HANDLE * | isf_rli_open (RLI_CHANNEL_HANDLE *pHdl, void *pSlaveInfo) |
This function creates a RLI connection handle at a specified device address. More... | |
isf_status_t | isf_rli_write (RLI_DEV_HANDLE *pDevHdl, int32 startAddress, uint32 aNbyteWrite, uint8 *apWriteBuffer) |
This function writes to the device registers. More... | |
isf_status_t | isf_rli_read (RLI_DEV_HANDLE *pDevHdl, int32 startAddress, uint32 aNbyteRead, uint8 *apReadBuffer) |
This function reads from the device registers. More... | |
isf_status_t | isf_rli_close (RLI_DEV_HANDLE *pDevHdl) |
This function closes the RLI connection. More... | |
isf_status_t | isf_rli_deint (RLI_CHANNEL_HANDLE *pHdl) |
This function de-initialize the RLI channel. More... | |
isf_status_t isf_rli_close | ( | RLI_DEV_HANDLE * | apRLIDeviceHandle | ) |
This function closes the RLI connection.
The isf_rli_close() function is used when no further communication with the device is needed using RLI. A closed device should not be passed to isf_rli_write() or isf_rli_write().
[in] | apRLIDeviceHandle | The address of the RLI connection handle to be closed. |
ISF_SUCCESS | is returned when the device is closed. |
ISF_RLI_ERR_NULLPTR | is returned when a NULL pointer argument was passed into the function. |
Definition at line 93 of file isf_rli.c.
References ISF_RLI_ERR_NULLPTR, and ISF_SUCCESS.
Referenced by device_disconnect().
isf_status_t isf_rli_deint | ( | RLI_CHANNEL_HANDLE * | apRLIChannelHandle | ) |
This function de-initialize the RLI channel.
The isf_rli_deint() function is used when no further communication with the device is needed using RLI for the specified channel.
[in] | apRLIChannelHandle | The address of the RLI connection handle to be closed. |
ISF_SUCCESS | is returned when the device is closed. |
ISF_RLI_ERR_NULLPTR | is returned when a NULL pointer argument was passed into the function. |
Definition at line 106 of file isf_rli.c.
References ISF_RLI_ERR_NULLPTR, and ISF_SUCCESS.
Referenced by close_channel().
RLI_CHANNEL_HANDLE* isf_rli_init | ( | uint32 | aChannelId | ) |
This function initializes a register level interface.
The Initialization creates the RLI channel and initializes the data structures required to manage the channel.
[in] | aChannelId | The ID of the channel to initialize. |
: | a valid channel handle is returned when it successfully initialized. |
: | NULL is returned when channel could be created. |
Definition at line 20 of file isf_rli.c.
References dm_channel_init(), dm_channel_start(), and ISF_SUCCESS.
Referenced by open_channel(), and rli_app_task().
RLI_DEV_HANDLE* isf_rli_open | ( | RLI_CHANNEL_HANDLE * | apRLIChannelHandle, |
void * | apSlaveInfo | ||
) |
This function creates a RLI connection handle at a specified device address.
The isf_rli_open() function may be used to get a handle to a device at a known device information.
[in] | apRLIChannelHandle | The handle of the RLI channel. |
[in] | apSlaveInfo | The known information of a slave device. |
: | a valid device handle is returned when it successfully opened. |
: | NULL is returned when device could be opened. |
Definition at line 43 of file isf_rli.c.
References dm_device_open(), and ISF_SUCCESS.
Referenced by device_connect().
isf_status_t isf_rli_read | ( | RLI_DEV_HANDLE * | apRLIDeviceHandle, |
int32 | startAddress, | ||
uint32 | aNbyteRead, | ||
uint8 * | apReadBuffer | ||
) |
This function reads from the device registers.
isf_rli_read() reads data from the specified device registers.
[in] | apRLIDeviceHandle | The RLI handle to the device from which to read. |
[in] | startAddress | The offset/sub address from which the read is performed. |
[in] | apReadBuffer | The Buffer address where any returned data is placed. |
[in] | aNbyteRead | The number of bytes to read. |
ISF_SUCCESS | is returned when data from the device was read successfully. |
COMM_ERROR_INIT | is returned when the channel handle refers to a non-initialized channel. |
COMM_ERROR_BUF_SIZE | is returned when the provided buffer is too small to hold all the data or the number of bytes read is zero. |
COMM_ERROR_NO_ACK | is returned when no acknowledgement was received from the device. |
COMM_ERROR_NULL_PTR | is returned when a NULL pointer argument was passed into the function. |
COMM_ERROR_TIME_OUT | is returned when the request could not be fulfilled in the specified timeout period. |
COMM_ERROR_LOCK | is returned when a lock could not be acquired properly. |
COMM_ERROR_DEV_CLOSED | is returned when the read is invoked on a closed device. |
Definition at line 79 of file isf_rli.c.
References dm_device_read(), and ISF_RLI_ERR_NULLPTR.
Referenced by rli_ci_app_callback().
isf_status_t isf_rli_write | ( | RLI_DEV_HANDLE * | apRLIDeviceHandle, |
int32 | startAddress, | ||
uint32 | aNbyteWrite, | ||
uint8 * | apWriteBuffer | ||
) |
This function writes to the device registers.
isf_rli_write() writes data to the specified device registers.
[in] | apRLIDeviceHandle | The handle of the device to which to write. |
[in] | startAddress | The offset/sub address to which the write is performed. |
[in] | apWriteBuffer | The Buffer address where any write data is placed. |
[in] | aNbyteWrite | The number of bytes to write. |
ISF_SUCCESS | is returned when the device was written successfully. |
COMM_ERROR_INIT | is returned when the channel handle refers to a non-initialized channel. |
COMM_ERROR_STOP | is returned when the write is invoked on a stopped channel. |
COMM_ERROR_NO_ACK | is returned when no acknowledgement was received from the device. |
COMM_ERROR_NULL_PTR | is returned when a NULL pointer argument was passed into the function. |
COMM_ERROR_TIME_OUT | is returned when the request could not be fulfilled in the specified timeout period. |
COMM_ERROR_LOCK | is returned when a lock could not be acquired properly. |
COMM_ERROR_DEV_CLOSED | is returned when the write is invoked on a closed device. |
Definition at line 64 of file isf_rli.c.
References dm_device_write(), and ISF_RLI_ERR_NULLPTR.
Referenced by rli_ci_app_callback().