| ISF 2.2 rev 5 Intelligent Sensing Framework for Kinetis with Processor Expert

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Functions
isf_rli.c File Reference
`#include "isf.h"`
`#include "isf_devmsg.h"`
`#include "isf_rli.h"`
Include dependency graph for isf_rli.c:

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...

## Function Documentation

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().

Parameters

  [in] | apRLIDeviceHandle | The address of the RLI connection handle to be closed.

Returns
  isf_rli_close() returns a value of type isf_status_t indicating whether the operation was successful or unsuccessful.

Return values

  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.

Reentrant: Yes

Link Libraries:
  None

Definition at line 97 of file isf_rli.c.

References dm_device_close(), ISF_RLI_ERR_CLOSE, ISF_RLI_ERR_NULLPTR, and ISF_SUCCESS.

Referenced by device_disconnect().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters

  [in] | apRLIChannelHandle | The address of the RLI connection handle to be closed.

Returns
  isf_rli_deint() returns a value of type isf_status_t indicating whether the operation was successful or unsuccessful.

Return values

  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.

Reentrant: Yes

Link Libraries:
  None

Definition at line 113 of file isf_rli.c.

References ISF_RLI_ERR_NULLPTR, and ISF_SUCCESS.

Referenced by device_disconnect().

Here is the caller graph for this function:

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.

Parameters

  [in] | aChannelId | The ID of the channel to initialize.

Returns
  isf_rli_init() returns a RLI channel handle to specified channel.

Return values

  : | a valid channel handle is returned when it successfully initialized.
  : | NULL is returned when channel could be created.

Reentrant: Yes

Link Libraries:
  None

Definition at line 24 of file isf_rli.c.

References dm_channel_init(), dm_channel_start(), and ISF_SUCCESS.

Referenced by device_connect(), and rli_app_task().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters

  [in] | apRLIChannelHandle | The handle of the RLI channel.
  [in] | apSlaveInfo | The known information of a slave device.

Returns
  isf_rli_open() returns a RLI device handle.

Return values

  : | a valid device handle is returned when it successfully opened.
  : | NULL is returned when device could be opened.

Reentrant: Yes

Link Libraries:
  None

Definition at line 47 of file isf_rli.c.

References dm_device_open(), and ISF_SUCCESS.

Referenced by device_connect().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters

  [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.

Returns
  isf_rli_read() returns a value of type isf_status_t indicating whether the operation was successful or unsuccessful.

Return values

  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.

Reentrant: Yes

Link Libraries:
  None

Definition at line 83 of file isf_rli.c.

References dm_device_read(), and ISF_RLI_ERR_NULLPTR.

Referenced by rli_ci_app_callback(), and rli_PeriodicCallback().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters

  [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.

Returns
  dm_device_write() returns a value of type isf_status_t indicating whether the operation was successful or unsuccessful.

Return values

  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.

Reentrant: Yes

Link Libraries:
  None

Definition at line 68 of file isf_rli.c.

References dm_device_write(), and ISF_RLI_ERR_NULLPTR.

Referenced by rli_ci_app_callback().

Here is the call graph for this function:

Here is the caller graph for this function:
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.