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

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

mma955x.h
Go to the documentation of this file.
1 /**
2 * @file mma955x.h
3 * @brief The \b mma955x.h contains the mma955x Intelligent Sensor register definitions, access macros, and
4 * device access functions.
5 *
6 * @copyright Copyright (c) 2015, Freescale Semiconductor, Inc.
7 */
8
9 #ifndef mma955x_H_
10 #define mma955x_H_
11
12 #include "isf_types.h"
13
14
15 typedef int32 mma955x_status_t;
16
17 typedef struct
18 {
19 uint16 pedometer_status_register;
20 uint16 step_count;
21 uint16 distance;
22 uint16 speed;
23 uint16 calories;
24 uint16 sleep_count;
25 } mma955x_PedometerData_t;
26
27 typedef struct
28 {
29 uint16 sleep_minimum;
30 uint16 sleep_maximum;
31 uint16 sleep_count_threshold;
32 uint8 config;
33 uint8 step_length;
34 uint8 height;
35 uint8 weight;
36 uint8 filter_step;
37 uint8 filter_time;
38 uint8 speed_period;
39 uint8 step_threshold;
40 uint16 activity_count_threshold;
41 uint8 step_coalesce;
42 uint8 padding[3];
43 } mma955x_appConfigRegister_t;
44
45 typedef struct
46 {
47 uint8 responseBytes[4];
48 mma955x_PedometerData_t pedometerData;
49 } readPedometerResponseBuffer_t;
50
51 typedef struct
52 {
53 uint8 responseBytes[4];
54 mma955x_appConfigRegister_t configData;
55 } mma955x_readConfigResponseBuffer_t;
56
57 typedef struct
58 {
59 int32 offset;
60 uint32 nByteWrite;
61 uint8* const pWriteBuffer;
62 } mma955x_Command_t;
63
64 typedef struct
65 {
66 uint32 numCommands;
67 const mma955x_Command_t* commands;
68 } mma955x_CommandList_t;
69
70 typedef struct
71 {
72 const int32 sampleDataOffset;
73 const int32 sampleDataSize;
74 const int32 commandReadOffset;
75 const int32 commandReadSize;
76 const float engFloatConversionFactor;
77 const uint8 engFixedTotalWidth;
78 const uint8 engFixedIntegerWidth;
79 const uint8 engFixedSignBit;
80 const mma955x_CommandList_t writeConfigCommands;
81 const mma955x_CommandList_t readConfigCommands;
82 const mma955x_CommandList_t validateSettingsCommands;
83 const mma955x_CommandList_t initializeCommands;
84 const mma955x_CommandList_t configureCommands;
85 const mma955x_CommandList_t startDataCommands;
86 const mma955x_CommandList_t endDataCommands;
87 const mma955x_CommandList_t calibrateCommands;
88 const mma955x_CommandList_t shutdownCommands;
89 const mma955x_CommandList_t getPedometerDataCommands;
90 } mma955x_Sensor_Specific_Settings_t;
91
92
93
94 #endif /* mma955x_H_ */
mma955x_Sensor_Specific_Settings_t::sampleDataSize
const int32 sampleDataSize
Definition: mma955x.h:73
mma955x_Sensor_Specific_Settings_t
Definition: mma955x.h:70
mma955x_Sensor_Specific_Settings_t::writeConfigCommands
const mma955x_CommandList_t writeConfigCommands
Definition: mma955x.h:80
mma955x_appConfigRegister_t::step_length
uint8 step_length
Definition: mma955x.h:33
uint8
unsigned char uint8
Definition: isf_types.h:76
mma955x_PedometerData_t::sleep_count
uint16 sleep_count
Definition: mma955x.h:24
mma955x_appConfigRegister_t::sleep_count_threshold
uint16 sleep_count_threshold
Definition: mma955x.h:31
mma955x_appConfigRegister_t::sleep_minimum
uint16 sleep_minimum
Definition: mma955x.h:29
mma955x_CommandList_t::numCommands
uint32 numCommands
Definition: mma955x.h:66
mma955x_Command_t::offset
int32 offset
Definition: mma955x.h:59
mma955x_appConfigRegister_t::config
uint8 config
Definition: mma955x.h:32
mma955x_PedometerData_t::step_count
uint16 step_count
Definition: mma955x.h:20
mma955x_Sensor_Specific_Settings_t::engFixedIntegerWidth
const uint8 engFixedIntegerWidth
Definition: mma955x.h:78
mma955x_appConfigRegister_t::filter_step
uint8 filter_step
Definition: mma955x.h:36
mma955x_CommandList_t
Definition: mma955x.h:64
mma955x_readConfigResponseBuffer_t
Definition: mma955x.h:51
mma955x_PedometerData_t::distance
uint16 distance
Definition: mma955x.h:21
isf_types.h
The isf_types.h file contains the ISF data type definitions and some of the globally used macros...
mma955x_appConfigRegister_t::height
uint8 height
Definition: mma955x.h:34
mma955x_Sensor_Specific_Settings_t::endDataCommands
const mma955x_CommandList_t endDataCommands
Definition: mma955x.h:86
mma955x_Command_t::pWriteBuffer
uint8 *const pWriteBuffer
Definition: mma955x.h:61
mma955x_Sensor_Specific_Settings_t::commandReadSize
const int32 commandReadSize
Definition: mma955x.h:75
mma955x_Sensor_Specific_Settings_t::readConfigCommands
const mma955x_CommandList_t readConfigCommands
Definition: mma955x.h:81
mma955x_Command_t::nByteWrite
uint32 nByteWrite
Definition: mma955x.h:60
mma955x_Sensor_Specific_Settings_t::sampleDataOffset
const int32 sampleDataOffset
Definition: mma955x.h:72
mma955x_appConfigRegister_t::weight
uint8 weight
Definition: mma955x.h:35
mma955x_PedometerData_t::pedometer_status_register
uint16 pedometer_status_register
Definition: mma955x.h:19
mma955x_appConfigRegister_t::step_coalesce
uint8 step_coalesce
Definition: mma955x.h:41
mma955x_appConfigRegister_t::sleep_maximum
uint16 sleep_maximum
Definition: mma955x.h:30
mma955x_Sensor_Specific_Settings_t::getPedometerDataCommands
const mma955x_CommandList_t getPedometerDataCommands
Definition: mma955x.h:89
mma955x_status_t
int32 mma955x_status_t
Definition: mma955x.h:15
mma955x_Sensor_Specific_Settings_t::startDataCommands
const mma955x_CommandList_t startDataCommands
Definition: mma955x.h:85
mma955x_readConfigResponseBuffer_t::configData
mma955x_appConfigRegister_t configData
Definition: mma955x.h:54
mma955x_appConfigRegister_t::speed_period
uint8 speed_period
Definition: mma955x.h:38
mma955x_PedometerData_t::calories
uint16 calories
Definition: mma955x.h:23
mma955x_appConfigRegister_t::step_threshold
uint8 step_threshold
Definition: mma955x.h:39
int32
signed long int int32
Definition: isf_types.h:74
uint16
unsigned short int uint16
Definition: isf_types.h:77
mma955x_Sensor_Specific_Settings_t::configureCommands
const mma955x_CommandList_t configureCommands
Definition: mma955x.h:84
mma955x_appConfigRegister_t::activity_count_threshold
uint16 activity_count_threshold
Definition: mma955x.h:40
mma955x_Sensor_Specific_Settings_t::calibrateCommands
const mma955x_CommandList_t calibrateCommands
Definition: mma955x.h:87
mma955x_appConfigRegister_t::filter_time
uint8 filter_time
Definition: mma955x.h:37
mma955x_PedometerData_t::speed
uint16 speed
Definition: mma955x.h:22
mma955x_CommandList_t::commands
const mma955x_Command_t * commands
Definition: mma955x.h:67
mma955x_appConfigRegister_t
Definition: mma955x.h:27
mma955x_Command_t
Definition: mma955x.h:57
mma955x_Sensor_Specific_Settings_t::commandReadOffset
const int32 commandReadOffset
Definition: mma955x.h:74
mma955x_Sensor_Specific_Settings_t::engFixedSignBit
const uint8 engFixedSignBit
Definition: mma955x.h:79
mma955x_Sensor_Specific_Settings_t::validateSettingsCommands
const mma955x_CommandList_t validateSettingsCommands
Definition: mma955x.h:82
uint32
unsigned long int uint32
Definition: isf_types.h:78
mma955x_Sensor_Specific_Settings_t::engFloatConversionFactor
const float engFloatConversionFactor
Definition: mma955x.h:76
readPedometerResponseBuffer_t::pedometerData
mma955x_PedometerData_t pedometerData
Definition: mma955x.h:48
mma955x_Sensor_Specific_Settings_t::shutdownCommands
const mma955x_CommandList_t shutdownCommands
Definition: mma955x.h:88
mma955x_Sensor_Specific_Settings_t::initializeCommands
const mma955x_CommandList_t initializeCommands
Definition: mma955x.h:83
mma955x_Sensor_Specific_Settings_t::engFixedTotalWidth
const uint8 engFixedTotalWidth
Definition: mma955x.h:77
readPedometerResponseBuffer_t
Definition: mma955x.h:45
mma955x_PedometerData_t
Definition: mma955x.h:17
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.