1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 14:03:55 +01:00

Merge pull request #14194 from ThxAndBye/master

drivers/lis3dh: fix mask in lis3dh_set_aux_adc()
This commit is contained in:
benpicco 2020-06-04 13:12:22 +02:00 committed by GitHub
commit f08a00312b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,7 +130,7 @@ int lis3dh_set_aux_adc(const lis3dh_t *dev, const uint8_t enable,
const uint8_t temperature)
{
return lis3dh_write_bits(dev, LIS3DH_REG_TEMP_CFG_REG,
LIS3DH_TEMP_CFG_REG_ADC_PD_MASK,
LIS3DH_TEMP_CFG_REG_ADC_PD_MASK | LIS3DH_TEMP_CFG_REG_TEMP_EN_MASK,
(enable ? LIS3DH_TEMP_CFG_REG_ADC_PD_MASK : 0) |
(temperature ? LIS3DH_TEMP_CFG_REG_TEMP_EN_MASK : 0));
}