![]() |
ISF
2.1
Intelligent Sensing Framework for Kinetis with Processor Expert
|
Data Structures | |
struct | SensorInfo_t |
struct | App1AppSettings_t |
struct | App1AppInstance_t |
Macros | |
#define | startof(type, member) ((int32)&((type *)0)->member) |
#define | App1_Orientation0_DATA_READY_EVENT ((uint32)(1 << 0)) |
#define | App1_Pressure1_DATA_READY_EVENT ((uint32)(1 << 1)) |
#define | App1_ALL_SENSOR_DATA_READY (3) |
#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 | CTRL_STATE_MASK 0x0F |
Control register mask/shift definitions for the application. More... | |
#define | CTRL_STATE_SHIFT 0 |
#define | CTRL_QREN_MASK 0x10 |
#define | CTRL_QREN_SHIFT 4 |
#define | CTRL_RESET_MASK 0x20 |
#define | CTRL_RESET_SHIFT 5 |
#define | CTRL_POWER_MASK 0xC0 |
#define | CTRL_POWER_SHIFT 6 |
#define | CONFIG_SETTINGS_REPORTRATE_BYTE_START (4) |
#define | CONFIG_SETTINGS_REPORTRATE_BYTE_ENDS (7) |
Enumerations | |
enum | App1AppState_t { App1_STATE_STOPPED_UNSUBSCRIBED = 0, App1_STATE_STOPPED_SUBSCRIBED, App1_STATE_STARTED_SUBSCRIBED } |
Functions | |
int32 | App1_GotoState (uint8 desiredState) |
void | TaskApp1_task (uint32_t task_init_data) |
void | App1_MainTask (void) |
ci_response_t | App1_ci_app_callback (ci_host_cmd_packet_t *pHostPacket, ci_app_resp_packet_t *pAppPacket) |
void | App1_ReturnSensorsToInit () |
#define App1_ALL_SENSOR_DATA_READY (3) |
Definition at line 68 of file App1.c.
Referenced by App1_MainTask().
#define App1_Orientation0_DATA_READY_EVENT ((uint32)(1 << 0)) |
Definition at line 64 of file App1.c.
Referenced by App1_MainTask().
#define App1_Pressure1_DATA_READY_EVENT ((uint32)(1 << 1)) |
Definition at line 66 of file App1.c.
Referenced by App1_MainTask().
#define CTRL_POWER_MASK 0xC0 |
Definition at line 90 of file App1.c.
Referenced by App1_ci_app_callback().
#define CTRL_STATE_MASK 0x0F |
Control register mask/shift definitions for the application.
Definition at line 84 of file App1.c.
Referenced by App1_ci_app_callback(), and App1_GotoState().
#define GET_FIELD | ( | name, | |
val | |||
) | ((val&name##_MASK)>>name##_SHIFT) |
Definition at line 81 of file App1.c.
Referenced by App1_ci_app_callback(), App1_GotoState(), and App1_MainTask().
#define SET_FIELD | ( | name, | |
val | |||
) | (((val)<<name##_SHIFT)&(name##_MASK)) |
Macro that extracts one of the fields below.
Definition at line 80 of file App1.c.
Referenced by App1_ci_app_callback(), and App1_GotoState().
#define startof | ( | type, | |
member | |||
) | ((int32)&((type *)0)->member) |
Definition at line 61 of file App1.c.
Referenced by App1_ci_app_callback().
enum App1AppState_t |
ci_response_t App1_ci_app_callback | ( | ci_host_cmd_packet_t * | pHostPacket, |
ci_app_resp_packet_t * | pAppPacket | ||
) |
Definition at line 313 of file App1.c.
References App1_GotoState(), App1_STATE_STOPPED_UNSUBSCRIBED, App1AppInstance_t::appId, ci_host_cmd_packet_t::appId, ci_host_cmd_packet_t::byte_cnt, ci_app_resp_packet_t::bytes_xfer, CI_CMD_READ_APP_DATA, CI_CMD_READ_CONFIG, CI_CMD_RESET_APP, CI_CMD_UPDATE_QUICKREAD, CI_CMD_WRITE_CONFIG, CI_ERROR_COMMAND, CI_ERROR_NONE, CI_INVALID_COUNT, ci_host_cmd_packet_t::cmd, App1AppSettings_t::control, CTRL_POWER_MASK, CTRL_STATE_MASK, App1AppInstance_t::data, GET_FIELD, App1AppInstance_t::instance, isf_ci_app_read(), isf_ci_app_write(), isf_ci_qr_update(), isf_power_set(), isf_SubscriptionSettings_t::nSamplePeriod, ci_host_cmd_packet_t::offset, App1AppSettings_t::OrientSettings_Sub0, App1AppInstance_t::outputBufferLock, App1AppSettings_t::PressSettings_Sub1, SET_FIELD, App1AppInstance_t::settings, and startof.
Definition at line 500 of file App1.c.
References App1_ReturnSensorsToInit(), App1_STATE_STARTED_SUBSCRIBED, App1_STATE_STOPPED_SUBSCRIBED, App1_STATE_STOPPED_UNSUBSCRIBED, configure_sensor(), App1AppSettings_t::control, CTRL_STATE_MASK, App1AppInstance_t::fifos, GET_FIELD, App1AppInstance_t::info, ISF_SUCCESS, App1AppInstance_t::orientDataFifo_Sub0, App1AppInstance_t::OrientInfo_Sub0, App1AppSettings_t::OrientSettings_Sub0, App1AppInstance_t::pressDataFifo_Sub1, App1AppInstance_t::PressInfo_Sub1, App1AppSettings_t::PressSettings_Sub1, SET_FIELD, App1AppInstance_t::settings, shutdown_sensor(), SensorInfo_t::smAdapterHandle, start_sensor(), and stop_sensor().
Referenced by App1_ci_app_callback(), and App1_MainTask().
void App1_MainTask | ( | void | ) |
Definition at line 193 of file App1.c.
References App1_ALL_SENSOR_DATA_READY, App1_GotoState(), App1_Orientation0_DATA_READY_EVENT, App1_Pressure1_DATA_READY_EVENT, App1AppInstance_t::appId, App1AppSettings_t::control, App1AppInstance_t::data, DATA_FIFO_LEN_SUB0, DATA_FIFO_LEN_SUB1, DATA_TYPE_SUB0, DATA_TYPE_SUB1, DSA_MPL3115_1, DSA_ORIENT_1, App1AppInstance_t::fifos, GET_FIELD, App1AppInstance_t::info, init_sensor(), App1AppInstance_t::instance, isf_ci_qr_update(), isf_ci_stream_update_data(), isf_fifo_el_clear(), isf_fifo_init(), isf_fifo_lock(), isf_fifo_unlock(), isf_SubscriptionSettings_t::nFifoDepth, isf_SubscriptionSettings_t::nSamplePeriod, isf_SubscriptionSettings_t::nSettingsToUse, App1AppInstance_t::orientDataFifo_Sub0, App1AppInstance_t::OrientInfo_Sub0, App1AppSettings_t::OrientSettings_Sub0, App1AppInstance_t::outputBufferLock, App1AppInstance_t::pressDataFifo_Sub1, App1AppInstance_t::PressInfo_Sub1, App1AppSettings_t::PressSettings_Sub1, App1SensorData_t::rawOrientData_Sub0, App1SensorData_t::rawPressData_Sub1, isf_SubscriptionSettings_t::resultFormat, isf_SubscriptionSettings_t::resultType, SensorInfo_t::sensorId, App1AppInstance_t::settings, SensorInfo_t::smAdapterHandle, and App1AppInstance_t::smLWEvent.
Referenced by TaskApp1_task().
void App1_ReturnSensorsToInit | ( | ) |
Definition at line 456 of file App1.c.
References isf_SensorHandle_st::adapterStatus, DSA_STATE_CONFIGURED_STARTED, DSA_STATE_CONFIGURED_STOPPED, App1AppInstance_t::info, App1AppInstance_t::OrientInfo_Sub0, App1AppInstance_t::PressInfo_Sub1, shutdown_sensor(), SensorInfo_t::smAdapterHandle, and stop_sensor().
Referenced by App1_GotoState().
void TaskApp1_task | ( | uint32_t | task_init_data | ) |
Definition at line 165 of file App1.c.
References App1_MainTask(), isf_lib_init(), and isf_system_sync().