| 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
mag3110.h File Reference

The mag3110.h contains the MAG3110 Magnetometer register definitions, access macros, and device access functions. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | mag_config_t
| The structure defines the MAG3110 configuration. More...
struct | mag3110_Sensor_Specific_Reg_t
struct | mag3110_Sensor_Specific_Settings_t

## Macros
#define | MAG3110_IIC_ADDRESS 0x0E
#define | MAG3110_NUMBER_AXIS 0x3
| The MAG3110 registers, masks, and constants. More...
#define | MAG3110_NUMBER_BYTES_AXIS 0x2
#define | MAG3110_SET_FIELD(name, val) (((val)<<MAG3110_##name##_SHIFT)&(MAG3110_##name##_MASK))
#define | MAG3110_GET_FIELD(name, val) ((val&MAG3110_##name##_MASK)>>MAG3110_##name##_SHIFT)
#define | MAG3110_ZYXOW_MASK (0x80)
#define | MAG3110_ZYXOW_SHIFT 7
#define | MAG3110_ZOW_MASK (0x40)
#define | MAG3110_ZOW_SHIFT 6
#define | MAG3110_YOW_MASK (0x20)
#define | MAG3110_YOW_SHIFT 5
#define | MAG3110_XOW_MASK (0x10)
#define | MAG3110_XOW_SHIFT 4
#define | MAG3110_ZYXDR_MASK (0x08)
#define | MAG3110_ZYXDR_SHIFT 3
#define | MAG3110_ZDR_MASK (0x04)
#define | MAG3110_ZDR_SHIFT 2
#define | MAG3110_YDR_MASK (0x02)
#define | MAG3110_YDR_SHIFT 1
#define | MAG3110_XDR_MASK (0x01)
#define | MAG3110_XDR_SHIFT 0
#define | MAG3110_SYSMOD1_MASK (0x02)
#define | MAG3110_SYSMOD1_SHIFT 1
#define | MAG3110_SYSMOD0_MASK (0x01)
#define | MAG3110_SYSMOD0_SHIFT 0
#define | MAG3110_DR_MASK (0xE0)
#define | MAG3110_DR_SHIFT 5
#define | MAG3110_OS_MASK (0x18)
#define | MAG3110_OS_SHIFT 3
#define | MAG3110_FR_MASK (0x04)
#define | MAG3110_FR_SHIFT 2
#define | MAG3110_TM_MASK (0x02)
#define | MAG3110_TM_SHIFT 1
#define | MAG3110_AC_MASK (0x01)
#define | MAG3110_AC_SHIFT 0
#define | MAG3110_AUTO_MRST_EN_MASK (0x80)
#define | MAG3110_AUTO_MRST_EN_SHIFT 7
#define | MAG3110_RAW_MASK (0x20)
#define | MAG3110_RAW_SHIFT 5
#define | MAG3110_MAG_RST_MASK (0x10)
#define | MAG3110_MAG_RST_SHIFT 4
#define | MAG3100_READ_BUF_SIZE (6)
#define | NUMBER_OF_BYTES_TIMESTAMP (4)
#define | MAG3110_WHOAMI_VALUE (0xC4)
#define | MAG3110_STANDBY_TO_ACTIVE_SAMPLE_WAIT (2)

## Typedefs
typedef int32 | mag3110_status_t

## Enumerations
enum | { MAG3110_DR_STATUS = 0x00, MAG3110_OUT_X_MSB = 0x01, MAG3110_OUT_X_LSB = 0x02, MAG3110_OUT_Y_MSB = 0x03, MAG3110_OUT_Y_LSB = 0x04, MAG3110_OUT_Z_MSB = 0x05, MAG3110_OUT_Z_LSB = 0x06, MAG3110_WHO_AM_I = 0x07, MAG3110_SYS_MOD = 0x08, MAG3110_OFF_X_MSB = 0x09, MAG3110_OFF_X_LSB = 0x0A, MAG3110_OFF_Y_MSB = 0x0B, MAG3110_OFF_Y_LSB = 0x0C, MAG3110_OFF_Z_MSB = 0x0D, MAG3110_OFF_Z_LSB = 0x0E, MAG3110_DIE_TEMP = 0x0F, MAG3110_CTRL_REG1 = 0x10, MAG3110_CTRL_REG2 = 0x11, MAG3110_DEVICE_ID = 0xC4 }
| The MAG3110 Sensor Internal Register Map. More...

## Detailed Description

The mag3110.h contains the MAG3110 Magnetometer register definitions, access macros, and device access functions.

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

Definition in file mag3110.h.

## Macro Definition Documentation

#define MAG3100_READ_BUF_SIZE (6)

Definition at line 107 of file mag3110.h.

#define MAG3110_AC_MASK (0x01)

Definition at line 94 of file mag3110.h.

#define MAG3110_AC_SHIFT 0

Definition at line 95 of file mag3110.h.

#define MAG3110_AUTO_MRST_EN_MASK (0x80)

Definition at line 100 of file mag3110.h.

#define MAG3110_AUTO_MRST_EN_SHIFT 7

Definition at line 101 of file mag3110.h.

#define MAG3110_DR_MASK (0xE0)

Definition at line 86 of file mag3110.h.

#define MAG3110_DR_SHIFT 5

Definition at line 87 of file mag3110.h.

#define MAG3110_FR_MASK (0x04)

Definition at line 90 of file mag3110.h.

#define MAG3110_FR_SHIFT 2

Definition at line 91 of file mag3110.h.

#define MAG3110_GET_FIELD | ( |  | name,
|  |  | val
| ) |  | ((val&MAG3110_##name##_MASK)>>MAG3110_##name##_SHIFT)

Definition at line 53 of file mag3110.h.

#define MAG3110_IIC_ADDRESS 0x0E

Definition at line 12 of file mag3110.h.

#define MAG3110_MAG_RST_MASK (0x10)

Definition at line 104 of file mag3110.h.

#define MAG3110_MAG_RST_SHIFT 4

Definition at line 105 of file mag3110.h.

#define MAG3110_NUMBER_AXIS 0x3

The MAG3110 registers, masks, and constants.

Definition at line 17 of file mag3110.h.

Referenced by mag3110_SetConfig().

#define MAG3110_NUMBER_BYTES_AXIS 0x2

Definition at line 18 of file mag3110.h.

Referenced by mag3110_SetConfig().

#define MAG3110_OS_MASK (0x18)

Definition at line 88 of file mag3110.h.

#define MAG3110_OS_SHIFT 3

Definition at line 89 of file mag3110.h.

#define MAG3110_RAW_MASK (0x20)

Definition at line 102 of file mag3110.h.

#define MAG3110_RAW_SHIFT 5

Definition at line 103 of file mag3110.h.

#define MAG3110_SET_FIELD | ( |  | name,
|  |  | val
| ) |  | (((val)<<MAG3110_##name##_SHIFT)&(MAG3110_##name##_MASK))

Definition at line 52 of file mag3110.h.

Referenced by mag3110_SetConfig().

#define MAG3110_STANDBY_TO_ACTIVE_SAMPLE_WAIT (2)

Definition at line 114 of file mag3110.h.

#define MAG3110_SYSMOD0_MASK (0x01)

Definition at line 80 of file mag3110.h.

#define MAG3110_SYSMOD0_SHIFT 0

Definition at line 81 of file mag3110.h.

#define MAG3110_SYSMOD1_MASK (0x02)

Definition at line 78 of file mag3110.h.

#define MAG3110_SYSMOD1_SHIFT 1

Definition at line 79 of file mag3110.h.

#define MAG3110_TM_MASK (0x02)

Definition at line 92 of file mag3110.h.

#define MAG3110_TM_SHIFT 1

Definition at line 93 of file mag3110.h.

#define MAG3110_WHOAMI_VALUE (0xC4)

Definition at line 109 of file mag3110.h.

Referenced by mag3110_CheckId().

#define MAG3110_XDR_MASK (0x01)

Definition at line 72 of file mag3110.h.

#define MAG3110_XDR_SHIFT 0

Definition at line 73 of file mag3110.h.

#define MAG3110_XOW_MASK (0x10)

Definition at line 64 of file mag3110.h.

#define MAG3110_XOW_SHIFT 4

Definition at line 65 of file mag3110.h.

#define MAG3110_YDR_MASK (0x02)

Definition at line 70 of file mag3110.h.

#define MAG3110_YDR_SHIFT 1

Definition at line 71 of file mag3110.h.

#define MAG3110_YOW_MASK (0x20)

Definition at line 62 of file mag3110.h.

#define MAG3110_YOW_SHIFT 5

Definition at line 63 of file mag3110.h.

#define MAG3110_ZDR_MASK (0x04)

Definition at line 68 of file mag3110.h.

#define MAG3110_ZDR_SHIFT 2

Definition at line 69 of file mag3110.h.

#define MAG3110_ZOW_MASK (0x40)

Definition at line 60 of file mag3110.h.

#define MAG3110_ZOW_SHIFT 6

Definition at line 61 of file mag3110.h.

#define MAG3110_ZYXDR_MASK (0x08)

Definition at line 66 of file mag3110.h.

#define MAG3110_ZYXDR_SHIFT 3

Definition at line 67 of file mag3110.h.

#define MAG3110_ZYXOW_MASK (0x80)

Definition at line 58 of file mag3110.h.

#define MAG3110_ZYXOW_SHIFT 7

Definition at line 59 of file mag3110.h.

#define NUMBER_OF_BYTES_TIMESTAMP (4)

Definition at line 108 of file mag3110.h.

## Typedef Documentation

typedef int32 mag3110_status_t

Definition at line 116 of file mag3110.h.

## Enumeration Type Documentation

anonymous enum

The MAG3110 Sensor Internal Register Map.

Enumerator
MAG3110_DR_STATUS |
MAG3110_OUT_X_MSB |
MAG3110_OUT_X_LSB |
MAG3110_OUT_Y_MSB |
MAG3110_OUT_Y_LSB |
MAG3110_OUT_Z_MSB |
MAG3110_OUT_Z_LSB |
MAG3110_WHO_AM_I |
MAG3110_SYS_MOD |
MAG3110_OFF_X_MSB |
MAG3110_OFF_X_LSB |
MAG3110_OFF_Y_MSB |
MAG3110_OFF_Y_LSB |
MAG3110_OFF_Z_MSB |
MAG3110_OFF_Z_LSB |
MAG3110_DIE_TEMP |
MAG3110_CTRL_REG1 |
MAG3110_CTRL_REG2 |
MAG3110_DEVICE_ID |

Definition at line 24 of file mag3110.h.

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