This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

LIS2DH12 driver error

Hi!

I'm trying to use the LIS2DH12 driver on SDK 16.0.0 in SES. I've managed to read the correct value of who am i register. 
I'm trying to configure the sensor using LIS2DH12_DATA_CFG() but get the error "lvalue required as left operand of assignment" when compiling. 
The error takes me to nrf_twi_sensor.h with the following code:

/**
 * @brief Macro for setting parameters in sensor register.
 *
 * @param[in,out] _register Register to be altered.
 * @param[in]     _msk      Parameter mask.
 * @param[in]     _pos      Parameter position.
 * @param[in]     _val      Parameter value to be set.
 */
#define NRF_TWI_SENSOR_REG_SET(_register, _msk, _pos, _val)   \
    _register &= ~(_msk);                                  \
    _register |= ((_msk) & ((_val) << (_pos)))

Any ideas?

BR,
Felix

Parents Reply Children
No Data
Related