217 #define BasicApp1_TASK_NAME "BasicApp1_task"
219 #define BasicApp1_TASK_STACK_SIZE 1200
221 #define BasicApp1_TASK_PRIORITY 11
268 .nSamplePeriod = 10000,
275 .nSamplePeriod = 10000,
282 .nSamplePeriod = 10000,
289 .nSamplePeriod = 10000,
296 .nSamplePeriod = 10000,
303 .nSamplePeriod = 10000,
310 .nSamplePeriod = 10000,
317 .nSamplePeriod = 10000,
324 .nSamplePeriod = 10000,
331 .nSamplePeriod = 200000,
338 .nSamplePeriod = 10000,
345 .nSamplePeriod = 10000,
352 .nSamplePeriod = 10000,
359 .nSamplePeriod = 10000,
366 .nSamplePeriod = 10000,
373 .nSamplePeriod = 10000,
380 .nSamplePeriod = 8192,
387 .nSamplePeriod = 8192,
394 .nSamplePeriod = 10000,
401 .nSamplePeriod = 10000,
436 .dataReadyEventFlag = ((
uint32)(1 << 0)),
441 .dataReadyEventFlag = ((
uint32)(1 << 1)),
446 .dataReadyEventFlag = ((
uint32)(1 << 2)),
451 .dataReadyEventFlag = ((
uint32)(1 << 3)),
456 .dataReadyEventFlag = ((
uint32)(1 << 4)),
461 .dataReadyEventFlag = ((
uint32)(1 << 5)),
466 .dataReadyEventFlag = ((
uint32)(1 << 6)),
471 .dataReadyEventFlag = ((
uint32)(1 << 7)),
476 .dataReadyEventFlag = ((
uint32)(1 << 8)),
481 .dataReadyEventFlag = ((
uint32)(1 << 9)),
486 .dataReadyEventFlag = ((
uint32)(1 << 10)),
491 .dataReadyEventFlag = ((
uint32)(1 << 11)),
496 .dataReadyEventFlag = ((
uint32)(1 << 12)),
501 .dataReadyEventFlag = ((
uint32)(1 << 13)),
506 .dataReadyEventFlag = ((
uint32)(1 << 14)),
511 .dataReadyEventFlag = ((
uint32)(1 << 15)),
516 .dataReadyEventFlag = ((
uint32)(1 << 16)),
521 .dataReadyEventFlag = ((
uint32)(1 << 17)),
526 .dataReadyEventFlag = ((
uint32)(1 << 18)),
531 .dataReadyEventFlag = ((
uint32)(1 << 19)),
583 event_t sensorLWEvent;
592 OSA_EventCreate(&sensorLWEvent, kEventAutoClear);
593 OSA_EventClear(&sensorLWEvent, 0x00FFFFFF);
604 gSensorInfo[i].dataTypeSize, gSubscriptionSettings[i].nFifoDepth);
608 gSensorInfo[i].sensorId,
609 &(gSensorHandles[i]),
611 gSensorInfo[i].dataReadyEventFlag);
614 &(gSensorHandles[i]),
615 &(gSubscriptionSettings[i]),
638 uint32 signalledEvents = 0;
643 OSA_SemaWait(&gBasicApp1DataBuffers.
outputDataLock, OSA_WAIT_FOREVER);
648 if (signalledEvents & gSensorInfo[i].dataReadyEventFlag)
653 (i+1,gSensorInfo[i].dataTypeSize, 0,
pSensorData[i]);
659 (i, signalledEvents,
pSensorData, &gBasicApp1DataBuffers);
691 (task_param_t)(NULL),
693 &BasicApp1_task_handler);
713 uint8 sensorSubscription = pFlashData[0];
718 pSensorAdapterHandle = &gSensorHandles[sensorSubscription];
semaphore_t outputDataLock
The isf_sensor_configuration_extern.h contains external declarations referenced by the Sensor Manager...
OSA_TASK_DEFINE(BasicApp1, BasicApp1_TASK_STACK_SIZE)
#define ALL_SENSOR_DATA_READY_BasicApp1
BasicApp1SensorData_t gSensorData
DATA_TYPE_SUB9 rawMagnetometerData_Sub9[DATA_FIFO_LEN_SUB9]
int32 stop_sensor(isf_SensorHandle_t *pSensorAdapterHandle)
The isf_magnetometer_types.h file contains the ISF data type definitions for use with the ISF generic...
This is user's event module. Put your event handler code here.
ISF Command Interpreter (CI) stream protocol header file.
void isf_system_sync(void)
This function synchronizes the user tasks and the system initialization.
isf_fifo_status_t isf_fifo_lock(isf_fifo_t *pFifo)
Lock a sample buffer for exclusive access.
isf_fifo_status_t isf_fifo_unlock(isf_fifo_t *pFifo)
Release the exclusive access lock on a sample buffer.
const isf_dsa_Adapter_t * pAdapter
DATA_TYPE_SUB5 rawAccelerometerData_Sub5[DATA_FIFO_LEN_SUB5]
void BasicApp1_Initialization()
DATA_TYPE_SUB19 rawAnalogData_Sub19[DATA_FIFO_LEN_SUB19]
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)
This defines the DSA sensor device handle structure used to invoke the adapter access functions...
isf_fifo_status_t isf_fifo_el_clear(isf_fifo_t *pFifo)
Routine to clear the fifo.
isf_dsa_ControlInterface_t control
DATA_TYPE_SUB7 rawAccelerometerData_Sub7[DATA_FIFO_LEN_SUB7]
The isf_sensor_configuration.h contains the enumerated list of Digital Sensor Abstraction (DSA) senso...
isf_dsa_status_t(* Flash)(isf_SensorHandle_t *pSensorHandle, void *pFlashData, uint8 numBytes)
DATA_TYPE_SUB0 rawAccelerometerData_Sub0[DATA_FIFO_LEN_SUB0]
int32 init_sensor(uint8 nSensorID, isf_SensorHandle_t *pSensorAdapterHandle, event_t *pEventGroup, uint32 nEventFieldIndex)
This function initializes the sensor adapters in the absence of the Sensor Manager.
DATA_TYPE_SUB12 rawPressureData_Sub12[DATA_FIFO_LEN_SUB12]
DATA_TYPE_SUB8 rawMagnetometerData_Sub8[DATA_FIFO_LEN_SUB8]
DATA_TYPE_SUB13 rawTemperatureData_Sub13[DATA_FIFO_LEN_SUB13]
DATA_TYPE_SUB16 rawPedometerData_Sub16[DATA_FIFO_LEN_SUB16]
The isf_pressure_types.h file contains the ISF data type definitions for use with the ISF generic pre...
int8 BasicApp1_FlashSensor(uint8 numBytes, uint8 *pFlashData)
isf_SensorHandle_t gSensorHandles[NUM_SUBSCRIPTIONS]
isf_SubscriptionSettings_t gSubscriptionSettings[]
DATA_TYPE_SUB6 rawAccelerometerData_Sub6[DATA_FIFO_LEN_SUB6]
uint8 gNumSupportedSensors
This is the external declaration of the current number of available sensors.
DATA_TYPE_SUB2 rawAccelerometerData_Sub2[DATA_FIFO_LEN_SUB2]
The isf_gyrometer_types.h file contains the ISF data type definitions for use with the ISF generic gy...
BasicApp1DataBuffers_t gBasicApp1DataBuffers
task_param_t os_task_param_t
DATA_TYPE_SUB4 rawAccelerometerData_Sub4[DATA_FIFO_LEN_SUB4]
void BasicApp1_CI_Callback(void *p_HostPacket, void *p_AppPacket, uint8_t *response)
int32 configure_sensor(isf_SensorHandle_t *pSensorAdapterHandle, isf_SubscriptionSettings_t *pRequiredSettings, isf_fifo_t *pfifo)
isf_status_t isf_lib_init(void *pNull)
API to get ISF information.
int32 start_sensor(isf_SensorHandle_t *pSensorAdapterHandle)
DATA_TYPE_SUB14 rawOrientationData_Sub14[DATA_FIFO_LEN_SUB14]
isf_fifo_status_t isf_fifo_init(isf_fifo_t *pFifo, void *pData, uint16 sampleSize, uint16 bufferCapacity)
Initializes a new fifo structure with a provided buffer.
The isf_altitude_types.h file contains the ISF data type definitions for use with the ISF generic alt...
The isf_temperature_fixed_t.h file contains the ISF data type definitions for use with the ISF generi...
DATA_TYPE_SUB1 rawAccelerometerData_Sub1[DATA_FIFO_LEN_SUB1]
const isf_SensorConfig_t * pSensorStaticConfig
#define NUM_SUBSCRIPTIONS
isf_SensorDataTypes_t resultType
The desired data type of the subscription.
#define BasicApp1_TASK_NAME
void BasicApp1_init(void)
#define BasicApp1_TASK_STACK_SIZE
DATA_TYPE_SUB18 rawCustomData_Sub18[DATA_FIFO_LEN_SUB18]
DATA_TYPE_SUB3 rawAccelerometerData_Sub3[DATA_FIFO_LEN_SUB3]
This structure enables an application to read from or write to the host.
#define BasicApp1_TASK_PRIORITY
This is user's event module. Put your event handler code here.
DATA_TYPE_SUB17 rawPedometerData_Sub17[DATA_FIFO_LEN_SUB17]
This structure contains host command information.
DATA_TYPE_SUB15 rawAltitudeData_Sub15[DATA_FIFO_LEN_SUB15]
This is user's event module. Put your event handler code here.
DATA_TYPE_SUB11 rawGyrometerData_Sub11[DATA_FIFO_LEN_SUB11]
int32 shutdown_sensor(isf_SensorHandle_t *pSensorAdapterHandle)
ci_response_enum
These are the CI errors provided to the host.
The isf_accelerometer_types.h file contains the ISF data type definitions for use with the ISF generi...
isf_status_t isf_ci_stream_update_data(uint8 aDataSetID, uint16 aLength, uint16 aOffset, uint8 *apSrc)
This API updates the data of a dataset.
SensorInfo_t gSensorInfo[]
void BasicApp1_OnAnySensor_Data_Ready(uint8_t sensorIdx, uint32_t signalledEvents, void **pAppSensorData, void *pAppDataBuffers)
DATA_TYPE_SUB10 rawGyrometerData_Sub10[DATA_FIFO_LEN_SUB10]
isf_fifo_t gSensorFifos[NUM_SUBSCRIPTIONS]