29     if ((pSensorHandle == NULL) || (pBus == NULL))
    40     if ((ARM_DRIVER_OK != status) || (whoAmi != reg))
    66     if ((pSensorHandle == NULL) || (pRegWriteList == NULL))
    80     if (ARM_DRIVER_OK != status)
    88     if (ARM_DRIVER_OK != status)
    96     if (ARM_DRIVER_OK != status)
   111     if ((pSensorHandle == NULL) || (pReadList == NULL) || (pBuffer == NULL))
   125     if (ARM_DRIVER_OK != status)
   137     if (pSensorHandle == NULL)
   151     if (ARM_DRIVER_OK != status)
   166     static int16_t xOffsetMax = 0x8000, yOffsetMax = 0x8000, zOffsetMax = 0x8000,
   167                    xOffsetMin = 0x7FFF, yOffsetMin = 0x7FFF, zOffsetMin = 0x7FFF;
   169     xOffsetMax = (*xValue > xOffsetMax)?(*xValue):(xOffsetMax);
   170     xOffsetMin = (*xValue < xOffsetMin)?(*xValue):(xOffsetMin);
   172     yOffsetMax = (*yValue > yOffsetMax)?(*yValue):(yOffsetMax);
   173     yOffsetMin = (*yValue < yOffsetMin)?(*yValue):(yOffsetMin);
   175     zOffsetMax = (*zValue > zOffsetMax)?(*zValue):(zOffsetMax);
   176     zOffsetMin = (*zValue < zOffsetMin)?(*zValue):(zOffsetMin);
   178     *xValue -= (xOffsetMax+xOffsetMin)/2;
   179     *yValue -= (yOffsetMax+yOffsetMin)/2;
   180     *zValue -= (zOffsetMax+zOffsetMin)/2;
 
int32_t Sensor_I2C_Read(ARM_DRIVER_I2C *pCommDrv, registerDeviceInfo_t *devInfo, uint16_t slaveAddress, const registerreadlist_t *pReadList, uint8_t *pOutBuffer)
Read register data from a sensor. 
 
This structure defines the Write command List. 
 
int32_t MAG3110_I2C_Initialize(mag3110_i2c_sensorhandle_t *pSensorHandle, ARM_DRIVER_I2C *pBus, uint8_t index, uint16_t sAddress, uint8_t whoAmi)
The interface function to initialize the sensor. 
 
#define MAG3110_CTRL_REG1_AC_STANDBY
 
int32_t Register_I2C_Read(ARM_DRIVER_I2C *pCommDrv, registerDeviceInfo_t *devInfo, uint16_t slaveAddress, uint8_t offset, uint8_t length, uint8_t *pOutBuffer)
The interface function to read a sensor register. 
 
#define MAG3110_CTRL_REG2_MAG_RST_EN
 
int32_t Register_I2C_Write(ARM_DRIVER_I2C *pCommDrv, registerDeviceInfo_t *devInfo, uint16_t slaveAddress, uint8_t offset, uint8_t value, uint8_t mask, bool repeatedStart)
The interface function to write a sensor register. 
 
#define MAG3110_CTRL_REG1_AC_MASK
 
#define MAG3110_CTRL_REG2_MAG_RST_MASK
 
typedef int32_t(DATA_FORMAT_Append_t))(void *pData
The interface function to append the data on the formated stream. 
 
#define MAG3110_CTRL_REG1_AC_ACTIVE
 
int32_t MAG3110_I2C_Configure(mag3110_i2c_sensorhandle_t *pSensorHandle, const registerwritelist_t *pRegWriteList)
The interface function to configure he sensor. 
 
int32_t Sensor_I2C_Write(ARM_DRIVER_I2C *pCommDrv, registerDeviceInfo_t *devInfo, uint16_t slaveAddress, const registerwritelist_t *pRegWriteList)
Write register data to a sensor. 
 
ARM_DRIVER_I2C * pCommDrv
 
void(* registeridlefunction_t)(void *userParam)
This is the register idle function type. 
 
registerDeviceInfo_t deviceInfo
 
int32_t MAG3110_I2C_DeInit(mag3110_i2c_sensorhandle_t *pSensorHandle)
The interface function to De Initialize sensor.. 
 
int32_t MAG3110_I2C_ReadData(mag3110_i2c_sensorhandle_t *pSensorHandle, const registerreadlist_t *pReadList, uint8_t *pBuffer)
The interface function to read the sensor data. 
 
This defines the sensor specific information. 
 
This structure defines the Read command List. 
 
void MAG3110_CalibrateHardIronOffset(int16_t *xValue, int16_t *yValue, int16_t *zValue)
Calibrates the magnetometer reading by determining the current hard iron offset. 
 
void MAG3110_I2C_SetIdleTask(mag3110_i2c_sensorhandle_t *pSensorHandle, registeridlefunction_t idleTask, void *userParam)
: The interface function to set the I2C Idle Task. 
 
registeridlefunction_t idleFunction
 
The mag3110_drv.h file describes the MAG3110 driver interface and structures.