Lines Matching refs:fxos_handle

14 status_t FXOS_Init(fxos_handle_t *fxos_handle, fxos_config_t *config)  in FXOS_Init()  argument
16 assert(fxos_handle); in FXOS_Init()
24 fxos_handle->I2C_SendFunc = config->I2C_SendFunc; in FXOS_Init()
25 fxos_handle->I2C_ReceiveFunc = config->I2C_ReceiveFunc; in FXOS_Init()
27 fxos_handle->slaveAddress = config->slaveAddress; in FXOS_Init()
29 if (FXOS_ReadReg(fxos_handle, WHO_AM_I_REG, tmp, 1) != kStatus_Success) in FXOS_Init()
41 if (FXOS_ReadReg(fxos_handle, CTRL_REG1, tmp, 1) != kStatus_Success) in FXOS_Init()
46 if (FXOS_WriteReg(fxos_handle, CTRL_REG1, tmp[0] & (uint8_t)~ACTIVE_MASK) != kStatus_Success) in FXOS_Init()
52 if (FXOS_ReadReg(fxos_handle, CTRL_REG1, tmp, 1) != kStatus_Success) in FXOS_Init()
62 if (FXOS_WriteReg(fxos_handle, F_SETUP_REG, F_MODE_DISABLED) != kStatus_Success) in FXOS_Init()
69 …if (FXOS_WriteReg(fxos_handle, CTRL_REG2, SLPE_MASK | SMOD_LOW_POWER | MOD_HIGH_RES) != kStatus_Su… in FXOS_Init()
75 if (FXOS_WriteReg(fxos_handle, CTRL_REG2, MOD_HIGH_RES) != kStatus_Success) in FXOS_Init()
83 …if (FXOS_WriteReg(fxos_handle, M_CTRL_REG1, (M_RST_MASK | M_OSR_MASK | M_HMS_MASK)) != kStatus_Suc… in FXOS_Init()
89 if (FXOS_WriteReg(fxos_handle, M_CTRL_REG2, (M_HYB_AUTOINC_MASK)) != kStatus_Success) in FXOS_Init()
96 …if (FXOS_WriteReg(fxos_handle, FF_MT_CFG_REG, XEFE_MASK | YEFE_MASK | ELE_MASK | OAE_MASK) != kSta… in FXOS_Init()
104 if (FXOS_WriteReg(fxos_handle, FT_MT_THS_REG, 0x04) != kStatus_Success) in FXOS_Init()
112 if (FXOS_WriteReg(fxos_handle, FF_MT_COUNT_REG, 0x00) != kStatus_Success) in FXOS_Init()
120 if (FXOS_WriteReg(fxos_handle, ASLP_COUNT_REG, 8) != kStatus_Success) in FXOS_Init()
126 if (FXOS_WriteReg(fxos_handle, XYZ_DATA_CFG_REG, FULL_SCALE_4G) != kStatus_Success) in FXOS_Init()
133 if (FXOS_WriteReg(fxos_handle, CTRL_REG4, 0x0) != kStatus_Success) in FXOS_Init()
138 if (FXOS_WriteReg(fxos_handle, CTRL_REG5, INT_CFG_DRDY_MASK) != kStatus_Success) in FXOS_Init()
143 if (FXOS_WriteReg(fxos_handle, CTRL_REG3, WAKE_FF_MT_MASK) != kStatus_Success) in FXOS_Init()
148 …if (FXOS_WriteReg(fxos_handle, CTRL_REG1, HYB_ASLP_RATE_0_8HZ | HYB_DATA_RATE_100HZ | ACTIVE_MASK)… in FXOS_Init()
155 … if (FXOS_WriteReg(fxos_handle, CTRL_REG1, (HYB_DATA_RATE_200HZ | ACTIVE_MASK)) != kStatus_Success) in FXOS_Init()
162 if (FXOS_ReadReg(fxos_handle, CTRL_REG1, tmp, 1) != kStatus_Success) in FXOS_Init()
175 status_t FXOS_ReadSensorData(fxos_handle_t *fxos_handle, fxos_data_t *sensorData) in FXOS_ReadSensorData() argument
181 if ((FXOS_ReadReg(fxos_handle, OUT_X_MSB_REG, tmp_buff, 6)) != kStatus_Success) in FXOS_ReadSensorData()
191 if ((FXOS_ReadReg(fxos_handle, M_OUT_X_MSB_REG, tmp_buff, 6)) != kStatus_Success) in FXOS_ReadSensorData()