|
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
35 shift_out(device->sdi_pin, device->sck_pin,
MSBFIRST, 8, LIS3DH_OUT_X_L | LIS3DH_MASK_READREPEAT);
37 signed short s =
shift_in(device->sdo_pin, device->sck_pin,
MSBPRE, 8);
38 s |= (
unsigned short)(
shift_in(device->sdo_pin, device->sck_pin,
MSBPRE, 8) << 8);
42 s |= (
unsigned short)(
shift_in(device->sdo_pin, device->sck_pin,
MSBPRE, 8) << 8);
46 s |= (
unsigned short)(
shift_in(device->sdo_pin, device->sck_pin,
MSBPRE, 8) << 8);
int lis3dh_accel(lis3dh_t *device, int *x, int *y, int *z)
Gets raw accelerometer measurements from all three axis (x, y, z).
Simplifies reading Parallax LIS3DH 3-Axis Accelerometer Module with ADC.
unsigned char lis3dh_readByte(lis3dh_t *device, unsigned char address)
Read a value from an LIS3DH register.
int lis3dh_getResolution(lis3dh_t *device)
Reads the bit resolution setting from the sensor. 8-bit, 10-bit or 12-bit.
int lis3dh_getAccel(lis3dh_t *device, int axis)
Gets raw accelerometer measurements for a single axis (x, y, or z).