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

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
rli_project.c File Reference

rli_Project.c is an embedded application written using ISF to demonstrate the functionality of the rli for over I2C/SPI interfaces. More...

`#include "isf_target.h"`
`#include "isf_types.h"`
`#include "isf.h"`
`#include "isf_init.h"`
`#include "isf_ci.h"`
`#include "isf_ci_stream.h"`
`#include "isf_pm.h"`
`#include "isf_bm.h"`
`#include "isf_devmsg.h"`
`#include "isf_sysconf_comms.h"`
`#include "isf_sysconf_types.h"`
`#include "isf_rli.h"`
`#include "fsl_i2c_master_driver.h"`
`#include "isf_i2c_master_types.h"`
`#include "isf_spi_master_types.h"`
Include dependency graph for rli_project.c:

Go to the source code of this file.

## Data Structures
struct | rliConfigRegister_t
struct | rliAppStatus_t
| rli application configuration buffer format. More...
struct | rliAppState_t
struct | device_periodic_read_cfg_packet_t
| rli overall application state buffer format. More...
struct | device_cmd_packet_t
struct | rli_app_info_t

## Macros
#define | SENSOR_DATA_READY_EVENT ((uint32)(1 << 10))
#define | RLI_COMM_BUFFER_SIZE (255)
#define | RLI_CMD_BUFFER_SIZE (24)
#define | SET_FIELD(name, val) (((val)<<name##_SHIFT)&(name##_MASK))
| Macro that extracts one of the fields below. More...
#define | GET_FIELD(name, val) ((val&name##_MASK)>>name##_SHIFT)
#define | RLI_APP_DATA "RLI App"

## Typedefs
typedef uint8_t | rcvBuffer_t[RLI_COMM_BUFFER_SIZE]
typedef uint8_t | cmdBuffer_t[RLI_CMD_BUFFER_SIZE]

## Enumerations
enum | { RLI_APP_STATE_CLOSED = 0, RLI_APP_STATE_OPEN = 1, RLI_APP_STATE_ERROR = 0xFF }
enum | { CONFIGURE_PERIODIC_READ = 11, STOP_PERIODIC_READ = 12 }

## Functions
ci_response_t | rli_ci_app_callback (ci_host_cmd_packet_t *pHostPacket, ci_app_resp_packet_t *pAppPacket)
void | rli_app_task (void)
int32 | open_channel (rliAppState_t *appState)
int32 | close_channel (rliAppState_t *appState)
int32 | device_connect (rliAppState_t *appState)
int32 | device_disconnect (rliAppState_t *appState)
spi_master_CommSpecificInfo_t | rli_spi_get_config (uint16 spiAddress)
void | rli_PeriodicCallback (rliAppState_t *rliAppState)

## Variables
const sys_channelDescriptor_t | gSys_ConfiguredChannelList []
| This data structure/variable holds the complete state of the rli magnetometer sensor embedded application. More...

## Detailed Description

rli_Project.c is an embedded application written using ISF to demonstrate the functionality of the rli for over I2C/SPI interfaces.

The rli_project.c is a working example of an ISF embedded application that enables host configuration of the rli I2C magnetometer sensor. This application uses the ISF Command Interpreter directly. It can be easily used as a starting point for modifications to allow anyone to write their own embedded application. The source code has been commented to explain the various parts of the application.

Copyright
  Copyright (c) 2015, Freescale Semiconductor, Inc.

Definition in file rli_project.c.

## Macro Definition Documentation

#define GET_FIELD | ( |  | name,
|  |  | val
| ) |  | ((val&name##_MASK)>>name##_SHIFT)

Definition at line 54 of file rli_project.c.

#define RLI_APP_DATA "RLI App"

Definition at line 118 of file rli_project.c.

#define RLI_CMD_BUFFER_SIZE (24)

Definition at line 42 of file rli_project.c.

#define RLI_COMM_BUFFER_SIZE (255)

Definition at line 41 of file rli_project.c.

#define SENSOR_DATA_READY_EVENT ((uint32)(1 << 10))

Definition at line 40 of file rli_project.c.

#define SET_FIELD | ( |  | name,
|  |  | val
| ) |  | (((val)<<name##_SHIFT)&(name##_MASK))

Macro that extracts one of the fields below.

Definition at line 53 of file rli_project.c.

## Typedef Documentation

typedef uint8_t cmdBuffer_t[RLI_CMD_BUFFER_SIZE]

Definition at line 44 of file rli_project.c.

typedef uint8_t rcvBuffer_t[RLI_COMM_BUFFER_SIZE]

Definition at line 43 of file rli_project.c.

## Enumeration Type Documentation

anonymous enum

Enumerator
CONFIGURE_PERIODIC_READ |
STOP_PERIODIC_READ |

Definition at line 57 of file rli_project.c.

anonymous enum

Enumerator
RLI_APP_STATE_CLOSED |
RLI_APP_STATE_OPEN |
RLI_APP_STATE_ERROR |

Definition at line 46 of file rli_project.c.

## Function Documentation

int32 close_channel | ( | rliAppState_t * | appState | ) |

int32 device_connect | ( | rliAppState_t * | appState | ) |

Definition at line 444 of file rli_project.c.

References rliAppState_t::CfgBuffer, rliAppStatus_t::channel, rliConfigRegister_t::channelID, rliAppStatus_t::device, rliConfigRegister_t::deviceAddress, isf_rli_init(), isf_rli_open(), rliAppState_t::pChannelDescriptor, rliAppState_t::pHandle, RLI_APP_STATE_ERROR, RLI_APP_STATE_OPEN, rli_spi_get_config(), and rliAppState_t::status.

Referenced by rli_app_task(), and rli_ci_app_callback().

Here is the call graph for this function:

Here is the caller graph for this function:

int32 device_disconnect | ( | rliAppState_t * | appState | ) |

Definition at line 495 of file rli_project.c.

References rliAppStatus_t::channel, rliAppStatus_t::device, isf_rli_close(), isf_rli_deint(), rliAppState_t::pChannelDescriptor, rliAppState_t::pHandle, RLI_APP_STATE_CLOSED, RLI_APP_STATE_ERROR, and rliAppState_t::status.

Referenced by rli_ci_app_callback().

Here is the call graph for this function:

Here is the caller graph for this function:

int32 open_channel | ( | rliAppState_t * | appState | ) |

void rli_PeriodicCallback | ( | rliAppState_t * | rliAppState | ) |

Definition at line 175 of file rli_project.c.

References rliAppStatus_t::error, isf_ci_stream_update_data(), isf_rli_read(), ISF_SUCCESS, rliAppState_t::periodicNRead, rliAppState_t::periodicRcvBuffer, rliAppState_t::periodicStartAddress, rliAppState_t::pHandle, rliAppState_t::status, and rliAppState_t::streamId.

Referenced by rli_ci_app_callback().

Here is the call graph for this function:

Here is the caller graph for this function:

## Variable Documentation

const sys_channelDescriptor_t gSys_ConfiguredChannelList[]

This data structure/variable holds the complete state of the rli magnetometer sensor embedded application.

Definition at line 71 of file isf_sysconf_comms.c.

- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.