84 reg |= (values & mask);
199 (mode << LIS3DH_FIFO_CTRL_REG_FM_SHIFT));
236 LIS3DH_CTRL_REG4_FS_2G);
240 LIS3DH_CTRL_REG4_FS_4G);
244 LIS3DH_CTRL_REG4_FS_8G);
248 LIS3DH_CTRL_REG4_FS_16G);
275 (LIS3DH_CTRL_REG4_BDU_ENABLE |
276 LIS3DH_CTRL_REG4_BLE_LITTLE_ENDIAN));
#define LIS3DH_WHO_AM_I_RESPONSE
The WHO_AM_I register should contain this value in order to correctly identify the chip...
#define LIS3DH_CTRL_REG1_ODR_SHIFT
Data rate selection.
int16_t lis3dh_read_aux_adc3()
Get one reading from the third channel of the auxiliary ADC.
void lis3dh_set_fifo(const uint8_t enable)
Enable/disable the FIFO.
#define LIS3DH_CTRL_REG5_FIFO_EN_MASK
FIFO enable.
lis3dh_reg_addr_t
All LIS3DH hardware registers are enumerated here.
int16_t lis3dh_read_int16(const lis3dh_reg_addr_t lsb_addr)
Read a 16-bit integer from the LIS3DH.
lis3dh_fifo_mode_t
Allowed FIFO modes.
void lis3dh_set_fifo_mode(const lis3dh_fifo_mode_t mode)
Set the FIFO mode.
void lis3dh_memcpy_from_device(const lis3dh_reg_addr_t start_address, uint8_t *buffer, uint8_t count)
Read multiple bytes from the LIS3DH.
lis3dh_scale_t
Scale parameters, use these names when calling lis3dh_set_scale(scale).
int16_t lis3dh_read_yaxis()
Get one Y-axis reading from the accelerometer.
#define LIS3DH_ACC_DATA_SIZE
Length of X, Y, Z data in bytes.
void lis3dh_arch_init()
Perform the platform specific part of the initialization process of the LIS3DH.
void lis3dh_set_scale(const lis3dh_scale_t scale)
Set the full scale range of the sensor.
int16_t lis3dh_read_aux_adc2()
Get one reading from the second channel of the auxiliary ADC.
void lis3dh_read_xyz(int16_t *buffer)
Read all three axes in a single transaction.
int16_t lis3dh_read_zaxis()
Get one Z-axis reading from the accelerometer.
#define LIS3DH_TEMP_CFG_REG_ADC_PD_MASK
ADC enable.
lis3dh_odr_t
Allowed values for the Output Data Rate of the sensor.
void lis3dh_write_bits(const lis3dh_reg_addr_t addr, const uint8_t mask, const uint8_t values)
Write (both set and clear) bits of an 8-bit register on the LIS3DH.
void lis3dh_set_axes(const uint8_t axes)
Enable/disable accelerometer axes.
Interface of LIS3DH SPI driver used in the Mulle platform.
void lis3dh_init()
Initialize a LIS3DH accelerometer.
void lis3dh_set_odr(const lis3dh_odr_t odr)
Set the output data rate of the sensor.
#define LIS3DH_TEMP_CFG_REG_TEMP_EN_MASK
Temperature sensor (T) enable.
void lis3dh_set_bits(const lis3dh_reg_addr_t addr, const uint8_t mask)
Set bits of an 8-bit register on the LIS3DH.
void lis3dh_write_byte(const lis3dh_reg_addr_t addr, const uint8_t value)
Write a single byte to the LIS3DH.
void lis3dh_clear_bits(const lis3dh_reg_addr_t addr, const uint8_t mask)
Clear bits of an 8-bit register on the LIS3DH.
void lis3dh_set_aux_adc(const uint8_t enable, const uint8_t temperature)
Turn on/off power to the auxiliary ADC in LIS3DH.
int16_t lis3dh_read_xaxis()
Get one X-axis reading from the accelerometer.
uint8_t lis3dh_read_byte(const lis3dh_reg_addr_t addr)
Read a single byte from the LIS3DH.
int16_t lis3dh_read_aux_adc1()
Get one reading from the first channel of the auxiliary ADC.