drivers: sensor: correct scale in WSEN_ITDS driver
correct scale in WSEN_ITDS driver to overcome sign extension issues Signed-off-by: Matthias Hauser <Matthias.Hauser@we-online.de>
This commit is contained in:
parent
c5bb002f77
commit
6975262047
2 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ static const struct itds_odr itds_odr_map[ITDS_ODR_MAX] = {
|
||||||
{400}, {800}, {1600}
|
{400}, {800}, {1600}
|
||||||
};
|
};
|
||||||
|
|
||||||
static const unsigned int itds_sensitivity_scale[][ITDS_ACCL_RANGE_END] = {
|
static const int16_t itds_sensitivity_scale[][ITDS_ACCL_RANGE_END] = {
|
||||||
{976, 1952, 3904, 7808},
|
{976, 1952, 3904, 7808},
|
||||||
|
|
||||||
/* high performance mode */
|
/* high performance mode */
|
||||||
|
|
|
@ -107,7 +107,7 @@ struct itds_device_data {
|
||||||
#endif
|
#endif
|
||||||
int16_t samples[ITDS_SAMPLE_SIZE];
|
int16_t samples[ITDS_SAMPLE_SIZE];
|
||||||
int16_t temperature;
|
int16_t temperature;
|
||||||
uint16_t scale;
|
int16_t scale;
|
||||||
enum operation_mode op_mode;
|
enum operation_mode op_mode;
|
||||||
const struct device *dev;
|
const struct device *dev;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue