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

- Main Page
- Modules
- Data Structures
- Files

Data Structures | Macros | Typedefs | Functions | Variables
BasicApp1 module documentation

## Data Structures
struct | BasicApp1_app_info_t
struct | SensorInfo_t
struct | BasicApp1SensorData_t
struct | BasicApp1DataBuffers_t

## Macros
#define | BasicApp1_TASK_NAME "BasicApp1_task"
#define | BasicApp1_TASK_STACK_SIZE 1200
#define | BasicApp1_TASK_PRIORITY 11
#define | BasicApp1_APP_DATA ""
#define | DATA_FIFO_LEN_SUB0 1
#define | DATA_TYPE_SUB0 FXLC95000_1_DATA_TYPE
#define | DATA_FIFO_LEN_SUB1 1
#define | DATA_TYPE_SUB1 FXLC95000_2_DATA_TYPE
#define | DATA_FIFO_LEN_SUB2 1
#define | DATA_TYPE_SUB2 FXLS8471_1_DATA_TYPE
#define | DATA_FIFO_LEN_SUB3 1
#define | DATA_TYPE_SUB3 FXLS8471_2_DATA_TYPE
#define | DATA_FIFO_LEN_SUB4 1
#define | DATA_TYPE_SUB4 FXLS8952_1_DATA_TYPE
#define | DATA_FIFO_LEN_SUB5 1
#define | DATA_TYPE_SUB5 FXOS8700_1_DATA_TYPE
#define | DATA_FIFO_LEN_SUB6 1
#define | DATA_TYPE_SUB6 MMA8491Q_1_DATA_TYPE
#define | DATA_FIFO_LEN_SUB7 1
#define | DATA_TYPE_SUB7 MMA865x_1_DATA_TYPE
#define | DATA_FIFO_LEN_SUB8 1
#define | DATA_TYPE_SUB8 FXOS8700_2_DATA_TYPE
#define | DATA_FIFO_LEN_SUB9 1
#define | DATA_TYPE_SUB9 MAG3110_1_DATA_TYPE
#define | DATA_FIFO_LEN_SUB10 1
#define | DATA_TYPE_SUB10 FXAS21002_1_DATA_TYPE
#define | DATA_FIFO_LEN_SUB11 1
#define | DATA_TYPE_SUB11 FXAS21002_2_DATA_TYPE
#define | DATA_FIFO_LEN_SUB12 1
#define | DATA_TYPE_SUB12 MPL3115_1_DATA_TYPE
#define | DATA_FIFO_LEN_SUB13 1
#define | DATA_TYPE_SUB13 MPL3115_1_DATA_TYPE
#define | DATA_FIFO_LEN_SUB14 1
#define | DATA_TYPE_SUB14 ORIENT_1_DATA_TYPE
#define | DATA_FIFO_LEN_SUB15 1
#define | DATA_TYPE_SUB15 MPL3115_1_DATA_TYPE
#define | DATA_FIFO_LEN_SUB16 1
#define | DATA_TYPE_SUB16 MMA955x_1_DATA_TYPE
#define | DATA_FIFO_LEN_SUB17 1
#define | DATA_TYPE_SUB17 MMA955x_2_DATA_TYPE
#define | DATA_FIFO_LEN_SUB18 1
#define | DATA_TYPE_SUB18 Custom_1_DATA_TYPE
#define | DATA_FIFO_LEN_SUB19 1
#define | DATA_TYPE_SUB19 Analog_1_DATA_TYPE
#define | SENSOR_IDX_Accelerometer0 0
#define | SENSOR_IDX_Accelerometer1 1
#define | SENSOR_IDX_Accelerometer2 2
#define | SENSOR_IDX_Accelerometer3 3
#define | SENSOR_IDX_Accelerometer4 4
#define | SENSOR_IDX_Accelerometer5 5
#define | SENSOR_IDX_Accelerometer6 6
#define | SENSOR_IDX_Accelerometer7 7
#define | SENSOR_IDX_Magnetometer8 8
#define | SENSOR_IDX_Magnetometer9 9
#define | SENSOR_IDX_Gyrometer10 10
#define | SENSOR_IDX_Gyrometer11 11
#define | SENSOR_IDX_Pressure12 12
#define | SENSOR_IDX_Temperature13 13
#define | SENSOR_IDX_Orientation14 14
#define | SENSOR_IDX_Altitude15 15
#define | SENSOR_IDX_Pedometer16 16
#define | SENSOR_IDX_Pedometer17 17
#define | SENSOR_IDX_Custom18 18
#define | SENSOR_IDX_Analog19 19
#define | ALL_SENSOR_DATA_READY_BasicApp1 (1048575)
#define | NUM_SUBSCRIPTIONS 20

## Typedefs
typedef void( | sensordataHandler_t) (uint8, void **, void *)

## Functions
| OSA_TASK_DEFINE (BasicApp1, BasicApp1_TASK_STACK_SIZE)
ci_response_t | BasicApp1_ci_app_callback (ci_host_cmd_packet_t *pHostPacket, ci_app_resp_packet_t *pAppPacket)
void | BasicApp1_MainTask (os_task_param_t task_init_data)
void | BasicApp1_init (void)
int8 | BasicApp1_FlashSensor (uint8 numBytes, uint8 *pFlashData)

## Variables
volatile int | gAppStatus
isf_fifo_t | gSensorFifos [NUM_SUBSCRIPTIONS]
isf_SensorHandle_t | gSensorHandles [NUM_SUBSCRIPTIONS]
BasicApp1SensorData_t | gSensorData
BasicApp1DataBuffers_t | gBasicApp1DataBuffers
isf_SubscriptionSettings_t | gSubscriptionSettings []
void * | pSensorData []
SensorInfo_t | gSensorInfo []
void * | pSensorData []
BasicApp1DataBuffers_t | gBasicApp1DataBuffers

## Detailed Description

## Macro Definition Documentation

#define ALL_SENSOR_DATA_READY_BasicApp1 (1048575)

Definition at line 360 of file BasicApp1_types.h.

Referenced by BasicApp1_MainTask().

#define BasicApp1_APP_DATA ""

Definition at line 211 of file BasicApp1_types.h.

#define BasicApp1_TASK_NAME "BasicApp1_task"

Definition at line 217 of file BasicApp1.c.

Referenced by BasicApp1_init().

#define BasicApp1_TASK_PRIORITY 11

Definition at line 221 of file BasicApp1.c.

Referenced by BasicApp1_init().

#define BasicApp1_TASK_STACK_SIZE 1200

Definition at line 219 of file BasicApp1.c.

Referenced by BasicApp1_init().

#define DATA_FIFO_LEN_SUB0 1

Definition at line 276 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB1 1

Definition at line 278 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB10 1

Definition at line 296 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB11 1

Definition at line 298 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB12 1

Definition at line 300 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB13 1

Definition at line 302 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB14 1

Definition at line 304 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB15 1

Definition at line 306 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB16 1

Definition at line 308 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB17 1

Definition at line 310 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB18 1

Definition at line 312 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB19 1

Definition at line 314 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB2 1

Definition at line 280 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB3 1

Definition at line 282 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB4 1

Definition at line 284 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB5 1

Definition at line 286 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB6 1

Definition at line 288 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB7 1

Definition at line 290 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB8 1

Definition at line 292 of file BasicApp1_types.h.

#define DATA_FIFO_LEN_SUB9 1

Definition at line 294 of file BasicApp1_types.h.

#define DATA_TYPE_SUB0 FXLC95000_1_DATA_TYPE

Definition at line 277 of file BasicApp1_types.h.

#define DATA_TYPE_SUB1 FXLC95000_2_DATA_TYPE

Definition at line 279 of file BasicApp1_types.h.

#define DATA_TYPE_SUB10 FXAS21002_1_DATA_TYPE

Definition at line 297 of file BasicApp1_types.h.

#define DATA_TYPE_SUB11 FXAS21002_2_DATA_TYPE

Definition at line 299 of file BasicApp1_types.h.

#define DATA_TYPE_SUB12 MPL3115_1_DATA_TYPE

Definition at line 301 of file BasicApp1_types.h.

#define DATA_TYPE_SUB13 MPL3115_1_DATA_TYPE

Definition at line 303 of file BasicApp1_types.h.

#define DATA_TYPE_SUB14 ORIENT_1_DATA_TYPE

Definition at line 305 of file BasicApp1_types.h.

#define DATA_TYPE_SUB15 MPL3115_1_DATA_TYPE

Definition at line 307 of file BasicApp1_types.h.

#define DATA_TYPE_SUB16 MMA955x_1_DATA_TYPE

Definition at line 309 of file BasicApp1_types.h.

#define DATA_TYPE_SUB17 MMA955x_2_DATA_TYPE

Definition at line 311 of file BasicApp1_types.h.

#define DATA_TYPE_SUB18 Custom_1_DATA_TYPE

Definition at line 313 of file BasicApp1_types.h.

#define DATA_TYPE_SUB19 Analog_1_DATA_TYPE

Definition at line 315 of file BasicApp1_types.h.

#define DATA_TYPE_SUB2 FXLS8471_1_DATA_TYPE

Definition at line 281 of file BasicApp1_types.h.

#define DATA_TYPE_SUB3 FXLS8471_2_DATA_TYPE

Definition at line 283 of file BasicApp1_types.h.

#define DATA_TYPE_SUB4 FXLS8952_1_DATA_TYPE

Definition at line 285 of file BasicApp1_types.h.

#define DATA_TYPE_SUB5 FXOS8700_1_DATA_TYPE

Definition at line 287 of file BasicApp1_types.h.

#define DATA_TYPE_SUB6 MMA8491Q_1_DATA_TYPE

Definition at line 289 of file BasicApp1_types.h.

#define DATA_TYPE_SUB7 MMA865x_1_DATA_TYPE

Definition at line 291 of file BasicApp1_types.h.

#define DATA_TYPE_SUB8 FXOS8700_2_DATA_TYPE

Definition at line 293 of file BasicApp1_types.h.

#define DATA_TYPE_SUB9 MAG3110_1_DATA_TYPE

Definition at line 295 of file BasicApp1_types.h.

#define NUM_SUBSCRIPTIONS 20

Definition at line 361 of file BasicApp1_types.h.

Referenced by BasicApp1_MainTask().

#define SENSOR_IDX_Accelerometer0 0

Definition at line 318 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Accelerometer1 1

Definition at line 319 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Accelerometer2 2

Definition at line 320 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Accelerometer3 3

Definition at line 321 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Accelerometer4 4

Definition at line 322 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Accelerometer5 5

Definition at line 323 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Accelerometer6 6

Definition at line 324 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Accelerometer7 7

Definition at line 325 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Altitude15 15

Definition at line 333 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Analog19 19

Definition at line 337 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Custom18 18

Definition at line 336 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Gyrometer10 10

Definition at line 328 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Gyrometer11 11

Definition at line 329 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Magnetometer8 8

Definition at line 326 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Magnetometer9 9

Definition at line 327 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Orientation14 14

Definition at line 332 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Pedometer16 16

Definition at line 334 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Pedometer17 17

Definition at line 335 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Pressure12 12

Definition at line 330 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

#define SENSOR_IDX_Temperature13 13

Definition at line 331 of file BasicApp1_types.h.

Referenced by BasicApp1_OnAnySensor_Data_Ready().

## Typedef Documentation

typedef void( sensordataHandler_t) (uint8, void **, void *)

Definition at line 404 of file BasicApp1_types.h.

## Function Documentation

ci_response_t BasicApp1_ci_app_callback | ( | ci_host_cmd_packet_t * | pHostPacket,
|  | ci_app_resp_packet_t * | pAppPacket
| ) |  |

Definition at line 554 of file BasicApp1.c.

References BasicApp1_CI_Callback(), and CI_ERROR_COMMAND.

Here is the call graph for this function:

int8 BasicApp1_FlashSensor | ( | uint8 | numBytes,
|  | uint8 * | pFlashData
| ) |  |

Definition at line 711 of file BasicApp1.c.

References isf_dsa_Adapter_st::control, isf_dsa_ControlInterface_st::Flash, gNumSupportedSensors, SensorConfig_st::pAdapter, and isf_SensorHandle_st::pSensorStaticConfig.

Referenced by BasicApp1_CI_Callback().

Here is the caller graph for this function:

void BasicApp1_init | ( | void |  | ) |

Definition at line 683 of file BasicApp1.c.

References BasicApp1_MainTask(), BasicApp1_TASK_NAME, BasicApp1_TASK_PRIORITY, and BasicApp1_TASK_STACK_SIZE.

Referenced by Components_Init().

Here is the call graph for this function:

Here is the caller graph for this function:

void BasicApp1_MainTask | ( | os_task_param_t | task_init_data | ) |

Definition at line 579 of file BasicApp1.c.

References ALL_SENSOR_DATA_READY_BasicApp1, BasicApp1_Initialization(), BasicApp1_OnAnySensor_Data_Ready(), configure_sensor(), FALSE, gAppStatus, init_sensor(), isf_ci_stream_update_data(), isf_fifo_el_clear(), isf_fifo_init(), isf_fifo_lock(), isf_fifo_unlock(), isf_lib_init(), ISF_SUCCESS, isf_system_sync(), NUM_SUBSCRIPTIONS, BasicApp1DataBuffers_t::outputDataLock, pSensorData, shutdown_sensor(), start_sensor(), and stop_sensor().

Referenced by BasicApp1_init().

Here is the call graph for this function:

Here is the caller graph for this function:

OSA_TASK_DEFINE | ( | BasicApp1 | ,
|  | BasicApp1_TASK_STACK_SIZE |
| ) |  |

## Variable Documentation

volatile int gAppStatus

Definition at line 248 of file BasicApp1.c.

Referenced by BasicApp1_MainTask().

BasicApp1DataBuffers_t gBasicApp1DataBuffers

Definition at line 260 of file BasicApp1.c.

Referenced by BasicApp1_CI_Callback().

BasicApp1DataBuffers_t gBasicApp1DataBuffers

Definition at line 260 of file BasicApp1.c.

Referenced by BasicApp1_CI_Callback().

BasicApp1SensorData_t gSensorData

Definition at line 257 of file BasicApp1.c.

isf_fifo_t gSensorFifos[NUM_SUBSCRIPTIONS]

Definition at line 251 of file BasicApp1.c.

isf_SensorHandle_t gSensorHandles[NUM_SUBSCRIPTIONS]

Definition at line 254 of file BasicApp1.c.

SensorInfo_t gSensorInfo[]

Definition at line 432 of file BasicApp1.c.

isf_SubscriptionSettings_t gSubscriptionSettings[]

Definition at line 263 of file BasicApp1.c.

void* pSensorData[]

Definition at line 408 of file BasicApp1.c.

Referenced by BasicApp1_MainTask(), BasicApp1_OnAnySensor_Data_Ready(), Custom_1_fsl_Sensor_Custom_PeriodicCallback(), fxls8471_GetData(), and mma865x_GetData().

void* pSensorData[]

Initial value:
=
{
(void *)&gSensorData.rawAccelerometerData_Sub0,
(void *)&gSensorData.rawAccelerometerData_Sub1,
(void *)&gSensorData.rawAccelerometerData_Sub2,
(void *)&gSensorData.rawAccelerometerData_Sub3,
(void *)&gSensorData.rawAccelerometerData_Sub4,
(void *)&gSensorData.rawAccelerometerData_Sub5,
(void *)&gSensorData.rawAccelerometerData_Sub6,
(void *)&gSensorData.rawAccelerometerData_Sub7,
(void *)&gSensorData.rawMagnetometerData_Sub8,
(void *)&gSensorData.rawMagnetometerData_Sub9,
(void *)&gSensorData.rawGyrometerData_Sub10,
(void *)&gSensorData.rawGyrometerData_Sub11,
(void *)&gSensorData.rawPressureData_Sub12,
(void *)&gSensorData.rawTemperatureData_Sub13,
(void *)&gSensorData.rawOrientationData_Sub14,
(void *)&gSensorData.rawAltitudeData_Sub15,
(void *)&gSensorData.rawPedometerData_Sub16,
(void *)&gSensorData.rawPedometerData_Sub17,
(void *)&gSensorData.rawCustomData_Sub18,
(void *)&gSensorData.rawAnalogData_Sub19,
}
gSensorData
BasicApp1SensorData_t gSensorData
Definition: BasicApp1.c:257
BasicApp1SensorData_t::rawMagnetometerData_Sub9
DATA_TYPE_SUB9 rawMagnetometerData_Sub9[DATA_FIFO_LEN_SUB9]
Definition: BasicApp1_types.h:383
BasicApp1SensorData_t::rawAccelerometerData_Sub5
DATA_TYPE_SUB5 rawAccelerometerData_Sub5[DATA_FIFO_LEN_SUB5]
Definition: BasicApp1_types.h:379
BasicApp1SensorData_t::rawAnalogData_Sub19
DATA_TYPE_SUB19 rawAnalogData_Sub19[DATA_FIFO_LEN_SUB19]
Definition: BasicApp1_types.h:393
BasicApp1SensorData_t::rawAccelerometerData_Sub7
DATA_TYPE_SUB7 rawAccelerometerData_Sub7[DATA_FIFO_LEN_SUB7]
Definition: BasicApp1_types.h:381
BasicApp1SensorData_t::rawAccelerometerData_Sub0
DATA_TYPE_SUB0 rawAccelerometerData_Sub0[DATA_FIFO_LEN_SUB0]
Definition: BasicApp1_types.h:374
BasicApp1SensorData_t::rawPressureData_Sub12
DATA_TYPE_SUB12 rawPressureData_Sub12[DATA_FIFO_LEN_SUB12]
Definition: BasicApp1_types.h:386
BasicApp1SensorData_t::rawMagnetometerData_Sub8
DATA_TYPE_SUB8 rawMagnetometerData_Sub8[DATA_FIFO_LEN_SUB8]
Definition: BasicApp1_types.h:382
BasicApp1SensorData_t::rawTemperatureData_Sub13
DATA_TYPE_SUB13 rawTemperatureData_Sub13[DATA_FIFO_LEN_SUB13]
Definition: BasicApp1_types.h:387
BasicApp1SensorData_t::rawPedometerData_Sub16
DATA_TYPE_SUB16 rawPedometerData_Sub16[DATA_FIFO_LEN_SUB16]
Definition: BasicApp1_types.h:390
BasicApp1SensorData_t::rawAccelerometerData_Sub6
DATA_TYPE_SUB6 rawAccelerometerData_Sub6[DATA_FIFO_LEN_SUB6]
Definition: BasicApp1_types.h:380
BasicApp1SensorData_t::rawAccelerometerData_Sub2
DATA_TYPE_SUB2 rawAccelerometerData_Sub2[DATA_FIFO_LEN_SUB2]
Definition: BasicApp1_types.h:376
BasicApp1SensorData_t::rawAccelerometerData_Sub4
DATA_TYPE_SUB4 rawAccelerometerData_Sub4[DATA_FIFO_LEN_SUB4]
Definition: BasicApp1_types.h:378
BasicApp1SensorData_t::rawOrientationData_Sub14
DATA_TYPE_SUB14 rawOrientationData_Sub14[DATA_FIFO_LEN_SUB14]
Definition: BasicApp1_types.h:388
BasicApp1SensorData_t::rawAccelerometerData_Sub1
DATA_TYPE_SUB1 rawAccelerometerData_Sub1[DATA_FIFO_LEN_SUB1]
Definition: BasicApp1_types.h:375
BasicApp1SensorData_t::rawCustomData_Sub18
DATA_TYPE_SUB18 rawCustomData_Sub18[DATA_FIFO_LEN_SUB18]
Definition: BasicApp1_types.h:392
BasicApp1SensorData_t::rawAccelerometerData_Sub3
DATA_TYPE_SUB3 rawAccelerometerData_Sub3[DATA_FIFO_LEN_SUB3]
Definition: BasicApp1_types.h:377
BasicApp1SensorData_t::rawPedometerData_Sub17
DATA_TYPE_SUB17 rawPedometerData_Sub17[DATA_FIFO_LEN_SUB17]
Definition: BasicApp1_types.h:391
BasicApp1SensorData_t::rawAltitudeData_Sub15
DATA_TYPE_SUB15 rawAltitudeData_Sub15[DATA_FIFO_LEN_SUB15]
Definition: BasicApp1_types.h:389
BasicApp1SensorData_t::rawGyrometerData_Sub11
DATA_TYPE_SUB11 rawGyrometerData_Sub11[DATA_FIFO_LEN_SUB11]
Definition: BasicApp1_types.h:385
BasicApp1SensorData_t::rawGyrometerData_Sub10
DATA_TYPE_SUB10 rawGyrometerData_Sub10[DATA_FIFO_LEN_SUB10]
Definition: BasicApp1_types.h:384

Definition at line 408 of file BasicApp1.c.

Referenced by BasicApp1_MainTask(), BasicApp1_OnAnySensor_Data_Ready(), Custom_1_fsl_Sensor_Custom_PeriodicCallback(), fxls8471_GetData(), and mma865x_GetData().

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