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

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

fxlc95000.h
Go to the documentation of this file.
1 /**
2 * @file fxlc95000.h
3 * @brief The \b fxlc95000.h contains the FXLC95000 Intelligent Sensor register definitions, access macros, and
4 * device access functions.
5 *
6 * @copyright Copyright (c) 2015, Freescale Semiconductor, Inc.
7 */
8
9 #ifndef FXLC95000_H_
10 #define FXLC95000_H_
11
12 #include "isf_types.h"
13
14 #define startof(type,member) ((int32)&((type *)0)->member)
15
16 typedef int32 fxlc95000_status_t;
17
18 /* These map to the ISF1P195K types */
19 #pragma pack(push,1)
20 typedef struct
21 {
22 uint8 nSettingsToUse; //!< 1 = current; 2=given; 3=best possible
23 uint8 nFifoDepth; //!< 1 = no FIFO, or another value < ::SM_MAX_FIFO_DEPTH
24 uint32 nCurrentReportRate; //!< Sample period in microseconds
25 uint8 nCurrentResolution; //!< Expected sensor resolution.
26 uint8 nRange; //!< Expected sensor dynamic range.
27 uint8 nMode; //!< sensor specific mode
28 } fxlc95000_SensorSetting_t;
29
30 typedef struct
31 {
32 uint8 control;
33 fxlc95000_SensorSetting_t settings;
34 } fxlc95000_appConfigRegister_t;
35
36 typedef struct
37 {
38 uint8 responseBytes[2];
39 fxlc95000_appConfigRegister_t configData;
40 } fxlc95000_readConfigResponseBuffer_t;
41
42
43 #define REPORTRATE_OFFSET startof(fxlc95000_SensorSetting_t,nCurrentReportRate)
44 #define RESOLUTION_OFFSET startof(fxlc95000_SensorSetting_t,nCurrentResolution)
45 #define RANGE_OFFSET startof(fxlc95000_SensorSetting_t,nRange)
46 #define MODE_OFFSET startof(fxlc95000_SensorSetting_t,nMode)
47
48 #pragma pack(pop)
49
50 typedef struct
51 {
52 int32 offset;
53 uint32 nByteWrite;
54 uint8* const pWriteBuffer;
55 } fxlc95000_Command_t;
56
57 typedef struct
58 {
59 uint32 numCommands;
60 const fxlc95000_Command_t *commands;
61 } fxlc95000_CommandList_t;
62
63 typedef struct
64 {
65 const int32 sampleDataOffset;
66 const int32 sampleDataSize;
67 const int32 configRegisterReadOffset;
68 const int32 configRegisterReadSize;
69 const float engFloatConversionFactor;
70 const uint8 engFixedTotalWidth;
71 const uint8 engFixedIntegerWidth;
72 const uint8 engFixedSignBit;
73 const uint8 resolution;
74 const uint8 range;
75 const uint8 mode;
76 const fxlc95000_CommandList_t writeConfigRegisterPreamble;
77 const fxlc95000_CommandList_t readConfigCommands;
78 const fxlc95000_CommandList_t validateSettingsCommands;
79 const fxlc95000_CommandList_t initializeCommands;
80 const fxlc95000_CommandList_t configureCommands;
81 const fxlc95000_CommandList_t startDataCommands;
82 const fxlc95000_CommandList_t endDataCommands;
83 const fxlc95000_CommandList_t calibrateCommands;
84 const fxlc95000_CommandList_t shutdownCommands;
85 const fxlc95000_CommandList_t getDataCommands;
86 const fxlc95000_CommandList_t flashPreprocessCommands;
87 const fxlc95000_CommandList_t flashPostprocessCommands;
88 } fxlc95000_Sensor_Specific_Settings_t;
89
90
91
92 #endif /* FXLC95000_H_ */
fxlc95000_appConfigRegister_t::control
uint8 control
Definition: fxlc95000.h:32
uint8
unsigned char uint8
Definition: isf_types.h:76
fxlc95000_SensorSetting_t::nMode
uint8 nMode
sensor specific mode
Definition: fxlc95000.h:27
fxlc95000_Sensor_Specific_Settings_t::startDataCommands
const fxlc95000_CommandList_t startDataCommands
Definition: fxlc95000.h:81
fxlc95000_readConfigResponseBuffer_t::configData
fxlc95000_appConfigRegister_t configData
Definition: fxlc95000.h:39
fxlc95000_Sensor_Specific_Settings_t::sampleDataOffset
const int32 sampleDataOffset
Definition: fxlc95000.h:65
fxlc95000_SensorSetting_t
Definition: fxlc95000.h:20
fxlc95000_Sensor_Specific_Settings_t::resolution
const uint8 resolution
Definition: fxlc95000.h:73
fxlc95000_Sensor_Specific_Settings_t::configRegisterReadOffset
const int32 configRegisterReadOffset
Definition: fxlc95000.h:67
fxlc95000_SensorSetting_t::nCurrentResolution
uint8 nCurrentResolution
Expected sensor resolution.
Definition: fxlc95000.h:25
fxlc95000_Sensor_Specific_Settings_t::flashPostprocessCommands
const fxlc95000_CommandList_t flashPostprocessCommands
Definition: fxlc95000.h:87
fxlc95000_Sensor_Specific_Settings_t::configureCommands
const fxlc95000_CommandList_t configureCommands
Definition: fxlc95000.h:80
fxlc95000_Sensor_Specific_Settings_t
Definition: fxlc95000.h:63
fxlc95000_Sensor_Specific_Settings_t::configRegisterReadSize
const int32 configRegisterReadSize
Definition: fxlc95000.h:68
fxlc95000_appConfigRegister_t::settings
fxlc95000_SensorSetting_t settings
Definition: fxlc95000.h:33
fxlc95000_SensorSetting_t::nSettingsToUse
uint8 nSettingsToUse
1 = current; 2=given; 3=best possible
Definition: fxlc95000.h:22
fxlc95000_Sensor_Specific_Settings_t::endDataCommands
const fxlc95000_CommandList_t endDataCommands
Definition: fxlc95000.h:82
fxlc95000_Sensor_Specific_Settings_t::calibrateCommands
const fxlc95000_CommandList_t calibrateCommands
Definition: fxlc95000.h:83
fxlc95000_Sensor_Specific_Settings_t::flashPreprocessCommands
const fxlc95000_CommandList_t flashPreprocessCommands
Definition: fxlc95000.h:86
fxlc95000_Sensor_Specific_Settings_t::range
const uint8 range
Definition: fxlc95000.h:74
fxlc95000_SensorSetting_t::nFifoDepth
uint8 nFifoDepth
1 = no FIFO, or another value < SM_MAX_FIFO_DEPTH
Definition: fxlc95000.h:23
isf_types.h
The isf_types.h file contains the ISF data type definitions and some of the globally used macros...
fxlc95000_Command_t
Definition: fxlc95000.h:50
fxlc95000_Sensor_Specific_Settings_t::initializeCommands
const fxlc95000_CommandList_t initializeCommands
Definition: fxlc95000.h:79
fxlc95000_CommandList_t::commands
const fxlc95000_Command_t * commands
Definition: fxlc95000.h:60
fxlc95000_Sensor_Specific_Settings_t::engFixedIntegerWidth
const uint8 engFixedIntegerWidth
Definition: fxlc95000.h:71
fxlc95000_status_t
int32 fxlc95000_status_t
Definition: fxlc95000.h:16
fxlc95000_CommandList_t
Definition: fxlc95000.h:57
fxlc95000_SensorSetting_t::nCurrentReportRate
uint32 nCurrentReportRate
Sample period in microseconds.
Definition: fxlc95000.h:24
fxlc95000_Sensor_Specific_Settings_t::mode
const uint8 mode
Definition: fxlc95000.h:75
fxlc95000_readConfigResponseBuffer_t
Definition: fxlc95000.h:36
int32
signed long int int32
Definition: isf_types.h:74
fxlc95000_appConfigRegister_t
Definition: fxlc95000.h:30
fxlc95000_Sensor_Specific_Settings_t::validateSettingsCommands
const fxlc95000_CommandList_t validateSettingsCommands
Definition: fxlc95000.h:78
fxlc95000_CommandList_t::numCommands
uint32 numCommands
Definition: fxlc95000.h:59
fxlc95000_Sensor_Specific_Settings_t::getDataCommands
const fxlc95000_CommandList_t getDataCommands
Definition: fxlc95000.h:85
fxlc95000_Sensor_Specific_Settings_t::engFixedTotalWidth
const uint8 engFixedTotalWidth
Definition: fxlc95000.h:70
fxlc95000_Sensor_Specific_Settings_t::shutdownCommands
const fxlc95000_CommandList_t shutdownCommands
Definition: fxlc95000.h:84
fxlc95000_Sensor_Specific_Settings_t::engFloatConversionFactor
const float engFloatConversionFactor
Definition: fxlc95000.h:69
fxlc95000_Sensor_Specific_Settings_t::writeConfigRegisterPreamble
const fxlc95000_CommandList_t writeConfigRegisterPreamble
Definition: fxlc95000.h:76
uint32
unsigned long int uint32
Definition: isf_types.h:78
fxlc95000_Sensor_Specific_Settings_t::sampleDataSize
const int32 sampleDataSize
Definition: fxlc95000.h:66
fxlc95000_SensorSetting_t::nRange
uint8 nRange
Expected sensor dynamic range.
Definition: fxlc95000.h:26
fxlc95000_Command_t::offset
int32 offset
Definition: fxlc95000.h:52
fxlc95000_Sensor_Specific_Settings_t::engFixedSignBit
const uint8 engFixedSignBit
Definition: fxlc95000.h:72
fxlc95000_Sensor_Specific_Settings_t::readConfigCommands
const fxlc95000_CommandList_t readConfigCommands
Definition: fxlc95000.h:77
fxlc95000_Command_t::pWriteBuffer
uint8 *const pWriteBuffer
Definition: fxlc95000.h:54
fxlc95000_Command_t::nByteWrite
uint32 nByteWrite
Definition: fxlc95000.h:53
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.