Lines Matching refs:xyz
75 accelData xyz; in calibrate() local
76 xyz.value.x = xyz.value.y = xyz.value.z = 0; in calibrate()
79 error = readData (&xyz.value.x, &xyz.value.y, &xyz.value.z); in calibrate()
84 xyz.value.x += 2 * -xyz.value.x; in calibrate()
85 xyz.value.y += 2 * -xyz.value.y; in calibrate()
86 xyz.value.z += 2 * -(xyz.value.z - 64); in calibrate()
88 error = i2cWriteReg (MMA7455_XOFFL, (unsigned char *) &xyz, 0x6); in calibrate()
100 accelData xyz; in readData() local
113 nBytes = i2cReadReg (MMA7455_XOUTL, (unsigned char *) &xyz, 0x6); in readData()
119 if (xyz.reg.x_msb & 0x02) { in readData()
120 xyz.reg.x_msb |= 0xFC; in readData()
123 if (xyz.reg.y_msb & 0x02) { in readData()
124 xyz.reg.y_msb |= 0xFC; in readData()
127 if (xyz.reg.z_msb & 0x02) { in readData()
128 xyz.reg.z_msb |= 0xFC; in readData()
132 *ptrX = xyz.value.x; in readData()
133 *ptrY = xyz.value.y; in readData()
134 *ptrZ = xyz.value.z; in readData()