| ISF 2.1 Intelligent Sensing Framework for Kinetis with Processor Expert

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Structures | Macros | Typedefs | Enumerations
fxas21002.h File Reference

The fxas21002.h file contains the FXAS21002 Magnetometer register definitions, access macros, and device access functions. More...

`#include "Cpu.h"`
`#include "PE_Types.h"`
`#include "PE_Error.h"`
`#include "PE_Const.h"`
`#include "IO_Map.h"`
`#include <isf_types.h>`
`#include <isf_devmsg.h>`
`#include <isf_bm.h>`
`#include <isf_sm_api.h>`
`#include <isf_dsa_adapter.h>`
Include dependency graph for fxas21002.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | gyro_config_t
| The structure defines the FXAS21002 configuration. More...
struct | fxas21002_Sensor_Specific_Reg_t
struct | fxas21002_Sensor_Specific_Settings_t

## Macros
#define | FXAS21002_IIC_ADDRESS 0x20
#define | FXAS21002_NUMBER_AXIS 3
| The FXAS21002 registers, masks, and constants. More...
#define | FXAS21002_NUMBER_BYTES_AXIS 2
#define | FXAS21002_SET_FIELD(name, val) (((val)<<FXAS21002_##name##_SHIFT)&(FXAS21002_##name##_MASK))
#define | FXAS21002_GET_FIELD(name, val) ((val&FXAS21002_##name##_MASK)>>FXAS21002_##name##_SHIFT)
#define | FXAS21002_ZYXOW_MASK (0x80)
#define | FXAS21002_ZYXOW_SHIFT 7
#define | FXAS21002_ZOW_MASK (0x40)
#define | FXAS21002_ZOW_SHIFT 6
#define | FXAS21002_YOW_MASK (0x20)
#define | FXAS21002_YOW_SHIFT 5
#define | FXAS21002_XOW_MASK (0x10)
#define | FXAS21002_XOW_SHIFT 4
#define | FXAS21002_ZYXDR_MASK (0x08)
#define | FXAS21002_ZYXDR_SHIFT 3
#define | FXAS21002_ZDR_MASK (0x04)
#define | FXAS21002_ZDR_SHIFT 2
#define | FXAS21002_YDR_MASK (0x02)
#define | FXAS21002_YDR_SHIFT 1
#define | FXAS21002_XDR_MASK (0x01)
#define | FXAS21002_XDR_SHIFT 0
#define | FXAS21002_F_OVF_MASK (0x80)
#define | FXAS21002_F_OVF_SHIFT 7
#define | FXAS21002_F_WMKF_MASK (0x40)
#define | FXAS21002_F_WMKF_SHIFT 6
#define | FXAS21002_F_MODE_MASK (0xC0)
#define | FXAS21002_F_MODE_SHIFT 6
#define | FXAS21002_F_WMRK_MASK (0x3F)
#define | FXAS21002_F_WMRK_SHIFT 0
#define | FXAS21002_F_EVENT_MASK (0x20)
#define | FXAS21002_F_EVENT_SHIFT 5
#define | FXAS21002_FE_TIME_MASK (0x1F)
#define | FXAS21002_FE_TIME_SHIFT 0
#define | FXAS21002_BOOTEND_MASK (0x08)
#define | FXAS21002_BOOTEND_SHIFT 3
#define | FXAS21002_SRC_FIFO_MASK (0x04)
#define | FXAS21002_SRC_FIFO_SHIFT 2
#define | FXAS21002_SRC_RT_MASK (0x02)
#define | FXAS21002_SRC_RT_SHIFT 1
#define | FXAS21002_SRC_DRDY_MASK (0x01)
#define | FXAS21002_SRC_DRDY_SHIFT 0
#define | FXAS21002_BW_MASK (0xC0)
#define | FXAS21002_BW_SHIFT 6
#define | FXAS21002_SPIW_MASK (0x20)
#define | FXAS21002_SPIW_SHIFT 5
#define | FXAS21002_SEL_MASK (0x18)
#define | FXAS21002_SEL_SHIFT 3
#define | FXAS21002_HPF_EN_MASK (0x04)
#define | FXAS21002_HPF_EN_SHIFT 2
#define | FXAS21002_FS_MASK (0x02)
#define | FXAS21002_FS_SHIFT 0
#define | FXAS21002_RST_MASK (0x40)
#define | FXAS21002_RST_SHIFT 7
#define | FXAS21002_ST_MASK (0x20)
#define | FXAS21002_ST_SHIFT 5
#define | FXAS21002_DR_MASK (0x1C)
#define | FXAS21002_DR_SHIFT 2
#define | FXAS21002_ACTIVE_MASK (0x02)
#define | FXAS21002_ACTIVE_SHIFT 1
#define | FXAS21002_READY_MASK (0x01)
#define | FXAS21002_READY_SHIFT 0
#define | FXAS21002_INT_CFG_FIFO_MASK (0x80)
#define | FXAS21002_INT_CFG_FIFO_SHIFT 7
#define | FXAS21002_INT_EN_FIFO_MASK (0x40)
#define | FXAS21002_INT_EN_FIFO_SHIFT 6
#define | FXAS21002_INT_CFG_RT_MASK (0x20)
#define | FXAS21002_INT_CFG_RT_SHIFT 5
#define | FXAS21002_INT_EN_RT_MASK (0x10)
#define | FXAS21002_INT_EN_RT_SHIFT 4
#define | FXAS21002_INT_CFG_DRDY_MASK (0x08)
#define | FXAS21002_INT_CFG_DRDY_SHIFT 3
#define | FXAS21002_INT_EN_DRDY_MASK (0x04)
#define | FXAS21002_INT_EN_DRDY_SHIFT 2
#define | FXAS21002_IPOL_MASK (0x02)
#define | FXAS21002_IPOL_SHIFT 1
#define | FXAS21002_PP_OD_MASK (0x01)
#define | FXAS21002_PP_OD_SHIFT 0
#define | FXAS21002_WRAPTOONE_MASK (0x08)
#define | FXAS21002_WRAPTOONE_SHIFT 3
#define | FXAS21002_EXTCTRLEN_MASK (0x04)
#define | FXAS21002_EXTCTRLEN_SHIFT 2
#define | FXAS21002_FSDOUBLE_MASK (0x01)
#define | FXAS21002_FSDOUBLE_SHIFT 0
#define | MAG3100_READ_BUF_SIZE (6)
#define | NUMBER_OF_BYTES_TIMESTAMP (4)
#define | FXAS21000_WHOAMI_VALUE (0xD1)
#define | FXAS21002_WHOAMI_VALUE (0xD6)
#define | FXAS21002_STANDBY_TO_ACTIVE_SAMPLE_WAIT (49)

## Typedefs
typedef int32 | fxas21002_status_t

## Enumerations
enum | { FXAS21002_STATUS = 0x00, FXAS21002_OUT_X_MSB = 0x01, FXAS21002_OUT_X_LSB = 0x02, FXAS21002_OUT_Y_MSB = 0x03, FXAS21002_OUT_Y_LSB = 0x04, FXAS21002_OUT_Z_MSB = 0x05, FXAS21002_OUT_Z_LSB = 0x06, FXAS21002_DR_STATUS = 0x07, FXAS21002_F_STATUS = 0x08, FXAS21002_F_SETUP = 0x09, FXAS21002_F_EVENT = 0x0A, FXAS21002_INT_SRC_FLAG = 0x0B, FXAS21002_WHO_AM_I = 0x0C, FXAS21002_CTRL_REG0 = 0x0D, FXAS21002_RT_CFG = 0x0E, FXAS21002_RT_SRC = 0x0F, FXAS21002_RT_THS = 0x10, FXAS21002_RT_COUNT = 0x11, FXAS21002_TEMP = 0x12, FXAS21002_CTRL_REG1 = 0x13, FXAS21002_CTRL_REG2 = 0x14, FXAS21002_CTRL_REG3 = 0x15, FXAS21002_RESERVED = 0x16 }
| The FXAS21002 Sensor Internal Register Map. More...

## Detailed Description

The fxas21002.h file contains the FXAS21002 Magnetometer register definitions, access macros, and device access functions.

Copyright
  Copyright (c) 2014, Freescale Semiconductor, Inc.

Definition in file fxas21002.h.

## Macro Definition Documentation

#define FXAS21000_WHOAMI_VALUE (0xD1)

Definition at line 192 of file fxas21002.h.

Referenced by fsl_fxas21002_i2cspi_3D_gyro_Configure(), and fsl_fxas21002_i2cspi_3D_gyro_Initialize().

#define FXAS21002_ACTIVE_MASK (0x02)

Definition at line 154 of file fxas21002.h.

Referenced by fsl_fxas21002_i2cspi_3D_gyro_Configure().

#define FXAS21002_ACTIVE_SHIFT 1

Definition at line 155 of file fxas21002.h.

#define FXAS21002_BOOTEND_MASK (0x08)

Definition at line 120 of file fxas21002.h.

#define FXAS21002_BOOTEND_SHIFT 3

Definition at line 121 of file fxas21002.h.

#define FXAS21002_BW_MASK (0xC0)

Definition at line 134 of file fxas21002.h.

#define FXAS21002_BW_SHIFT 6

Definition at line 135 of file fxas21002.h.

#define FXAS21002_DR_MASK (0x1C)

Definition at line 152 of file fxas21002.h.

#define FXAS21002_DR_SHIFT 2

Definition at line 153 of file fxas21002.h.

#define FXAS21002_EXTCTRLEN_MASK (0x04)

Definition at line 184 of file fxas21002.h.

#define FXAS21002_EXTCTRLEN_SHIFT 2

Definition at line 185 of file fxas21002.h.

#define FXAS21002_F_EVENT_MASK (0x20)

Definition at line 112 of file fxas21002.h.

#define FXAS21002_F_EVENT_SHIFT 5

Definition at line 113 of file fxas21002.h.

#define FXAS21002_F_MODE_MASK (0xC0)

Definition at line 104 of file fxas21002.h.

#define FXAS21002_F_MODE_SHIFT 6

Definition at line 105 of file fxas21002.h.

#define FXAS21002_F_OVF_MASK (0x80)

Definition at line 96 of file fxas21002.h.

#define FXAS21002_F_OVF_SHIFT 7

Definition at line 97 of file fxas21002.h.

#define FXAS21002_F_WMKF_MASK (0x40)

Definition at line 98 of file fxas21002.h.

#define FXAS21002_F_WMKF_SHIFT 6

Definition at line 99 of file fxas21002.h.

#define FXAS21002_F_WMRK_MASK (0x3F)

Definition at line 106 of file fxas21002.h.

#define FXAS21002_F_WMRK_SHIFT 0

Definition at line 107 of file fxas21002.h.

#define FXAS21002_FE_TIME_MASK (0x1F)

Definition at line 114 of file fxas21002.h.

#define FXAS21002_FE_TIME_SHIFT 0

Definition at line 115 of file fxas21002.h.

#define FXAS21002_FS_MASK (0x02)

Definition at line 142 of file fxas21002.h.

#define FXAS21002_FS_SHIFT 0

Definition at line 143 of file fxas21002.h.

#define FXAS21002_FSDOUBLE_MASK (0x01)

Definition at line 186 of file fxas21002.h.

#define FXAS21002_FSDOUBLE_SHIFT 0

Definition at line 187 of file fxas21002.h.

#define FXAS21002_GET_FIELD | ( |  | name,
|  |  | val
| ) |  | ((val&FXAS21002_##name##_MASK)>>FXAS21002_##name##_SHIFT)

Definition at line 71 of file fxas21002.h.

#define FXAS21002_HPF_EN_MASK (0x04)

Definition at line 140 of file fxas21002.h.

#define FXAS21002_HPF_EN_SHIFT 2

Definition at line 141 of file fxas21002.h.

#define FXAS21002_IIC_ADDRESS 0x20

Definition at line 26 of file fxas21002.h.

#define FXAS21002_INT_CFG_DRDY_MASK (0x08)

Definition at line 170 of file fxas21002.h.

#define FXAS21002_INT_CFG_DRDY_SHIFT 3

Definition at line 171 of file fxas21002.h.

#define FXAS21002_INT_CFG_FIFO_MASK (0x80)

Definition at line 162 of file fxas21002.h.

#define FXAS21002_INT_CFG_FIFO_SHIFT 7

Definition at line 163 of file fxas21002.h.

#define FXAS21002_INT_CFG_RT_MASK (0x20)

Definition at line 166 of file fxas21002.h.

#define FXAS21002_INT_CFG_RT_SHIFT 5

Definition at line 167 of file fxas21002.h.

#define FXAS21002_INT_EN_DRDY_MASK (0x04)

Definition at line 172 of file fxas21002.h.

#define FXAS21002_INT_EN_DRDY_SHIFT 2

Definition at line 173 of file fxas21002.h.

#define FXAS21002_INT_EN_FIFO_MASK (0x40)

Definition at line 164 of file fxas21002.h.

#define FXAS21002_INT_EN_FIFO_SHIFT 6

Definition at line 165 of file fxas21002.h.

#define FXAS21002_INT_EN_RT_MASK (0x10)

Definition at line 168 of file fxas21002.h.

#define FXAS21002_INT_EN_RT_SHIFT 4

Definition at line 169 of file fxas21002.h.

#define FXAS21002_IPOL_MASK (0x02)

Definition at line 174 of file fxas21002.h.

#define FXAS21002_IPOL_SHIFT 1

Definition at line 175 of file fxas21002.h.

#define FXAS21002_NUMBER_AXIS 3

The FXAS21002 registers, masks, and constants.

Definition at line 31 of file fxas21002.h.

#define FXAS21002_NUMBER_BYTES_AXIS 2

Definition at line 32 of file fxas21002.h.

#define FXAS21002_PP_OD_MASK (0x01)

Definition at line 176 of file fxas21002.h.

#define FXAS21002_PP_OD_SHIFT 0

Definition at line 177 of file fxas21002.h.

#define FXAS21002_READY_MASK (0x01)

Definition at line 156 of file fxas21002.h.

Referenced by fsl_fxas21002_i2cspi_3D_gyro_Configure().

#define FXAS21002_READY_SHIFT 0

Definition at line 157 of file fxas21002.h.

#define FXAS21002_RST_MASK (0x40)

Definition at line 148 of file fxas21002.h.

#define FXAS21002_RST_SHIFT 7

Definition at line 149 of file fxas21002.h.

#define FXAS21002_SEL_MASK (0x18)

Definition at line 138 of file fxas21002.h.

#define FXAS21002_SEL_SHIFT 3

Definition at line 139 of file fxas21002.h.

#define FXAS21002_SET_FIELD | ( |  | name,
|  |  | val
| ) |  | (((val)<<FXAS21002_##name##_SHIFT)&(FXAS21002_##name##_MASK))

Definition at line 70 of file fxas21002.h.

Referenced by fsl_fxas21002_i2cspi_3D_gyro_Configure().

#define FXAS21002_SPIW_MASK (0x20)

Definition at line 136 of file fxas21002.h.

#define FXAS21002_SPIW_SHIFT 5

Definition at line 137 of file fxas21002.h.

#define FXAS21002_SRC_DRDY_MASK (0x01)

Definition at line 126 of file fxas21002.h.

#define FXAS21002_SRC_DRDY_SHIFT 0

Definition at line 127 of file fxas21002.h.

#define FXAS21002_SRC_FIFO_MASK (0x04)

Definition at line 122 of file fxas21002.h.

#define FXAS21002_SRC_FIFO_SHIFT 2

Definition at line 123 of file fxas21002.h.

#define FXAS21002_SRC_RT_MASK (0x02)

Definition at line 124 of file fxas21002.h.

#define FXAS21002_SRC_RT_SHIFT 1

Definition at line 125 of file fxas21002.h.

#define FXAS21002_ST_MASK (0x20)

Definition at line 150 of file fxas21002.h.

#define FXAS21002_ST_SHIFT 5

Definition at line 151 of file fxas21002.h.

#define FXAS21002_STANDBY_TO_ACTIVE_SAMPLE_WAIT (49)

Definition at line 197 of file fxas21002.h.

#define FXAS21002_WHOAMI_VALUE (0xD6)

Definition at line 193 of file fxas21002.h.

Referenced by fsl_fxas21002_i2cspi_3D_gyro_Initialize().

#define FXAS21002_WRAPTOONE_MASK (0x08)

Definition at line 182 of file fxas21002.h.

#define FXAS21002_WRAPTOONE_SHIFT 3

Definition at line 183 of file fxas21002.h.

#define FXAS21002_XDR_MASK (0x01)

Definition at line 90 of file fxas21002.h.

#define FXAS21002_XDR_SHIFT 0

Definition at line 91 of file fxas21002.h.

#define FXAS21002_XOW_MASK (0x10)

Definition at line 82 of file fxas21002.h.

#define FXAS21002_XOW_SHIFT 4

Definition at line 83 of file fxas21002.h.

#define FXAS21002_YDR_MASK (0x02)

Definition at line 88 of file fxas21002.h.

#define FXAS21002_YDR_SHIFT 1

Definition at line 89 of file fxas21002.h.

#define FXAS21002_YOW_MASK (0x20)

Definition at line 80 of file fxas21002.h.

#define FXAS21002_YOW_SHIFT 5

Definition at line 81 of file fxas21002.h.

#define FXAS21002_ZDR_MASK (0x04)

Definition at line 86 of file fxas21002.h.

#define FXAS21002_ZDR_SHIFT 2

Definition at line 87 of file fxas21002.h.

#define FXAS21002_ZOW_MASK (0x40)

Definition at line 78 of file fxas21002.h.

#define FXAS21002_ZOW_SHIFT 6

Definition at line 79 of file fxas21002.h.

#define FXAS21002_ZYXDR_MASK (0x08)

Definition at line 84 of file fxas21002.h.

#define FXAS21002_ZYXDR_SHIFT 3

Definition at line 85 of file fxas21002.h.

#define FXAS21002_ZYXOW_MASK (0x80)

Definition at line 76 of file fxas21002.h.

#define FXAS21002_ZYXOW_SHIFT 7

Definition at line 77 of file fxas21002.h.

#define MAG3100_READ_BUF_SIZE (6)

Definition at line 190 of file fxas21002.h.

Referenced by mag3110_GetData().

#define NUMBER_OF_BYTES_TIMESTAMP (4)

Definition at line 191 of file fxas21002.h.

## Typedef Documentation

typedef int32 fxas21002_status_t

Definition at line 199 of file fxas21002.h.

## Enumeration Type Documentation

anonymous enum

The FXAS21002 Sensor Internal Register Map.

Enumerator
FXAS21002_STATUS |
FXAS21002_OUT_X_MSB |
FXAS21002_OUT_X_LSB |
FXAS21002_OUT_Y_MSB |
FXAS21002_OUT_Y_LSB |
FXAS21002_OUT_Z_MSB |
FXAS21002_OUT_Z_LSB |
FXAS21002_DR_STATUS |
FXAS21002_F_STATUS |
FXAS21002_F_SETUP |
FXAS21002_F_EVENT |
FXAS21002_INT_SRC_FLAG |
FXAS21002_WHO_AM_I |
FXAS21002_CTRL_REG0 |
FXAS21002_RT_CFG |
FXAS21002_RT_SRC |
FXAS21002_RT_THS |
FXAS21002_RT_COUNT |
FXAS21002_TEMP |
FXAS21002_CTRL_REG1 |
FXAS21002_CTRL_REG2 |
FXAS21002_CTRL_REG3 |
FXAS21002_RESERVED |

Definition at line 38 of file fxas21002.h.

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