diff options
Diffstat (limited to 'drivers/sensors/adns9800.c')
-rw-r--r-- | drivers/sensors/adns9800.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/sensors/adns9800.c b/drivers/sensors/adns9800.c index c52f991804..425cf9912f 100644 --- a/drivers/sensors/adns9800.c +++ b/drivers/sensors/adns9800.c @@ -154,8 +154,8 @@ void adns9800_init() { } config_adns9800_t adns9800_get_config(void) { - uint8_t config_1 = adns9800_read(REG_Configuration_I); - return (config_adns9800_t){(config_1 & 0xFF) * CPI_STEP}; + uint8_t cpival = adns9800_read(REG_Configuration_I); + return (config_adns9800_t){(cpival & 0xFF) * CPI_STEP}; } void adns9800_set_config(config_adns9800_t config) { @@ -164,8 +164,8 @@ void adns9800_set_config(config_adns9800_t config) { } uint16_t adns9800_get_cpi(void) { - uint8_t config_1 = adns9800_read(REG_Configuration_I); - return (uint16_t){(config_1 & 0xFF) * CPI_STEP}; + uint8_t cpival = adns9800_read(REG_Configuration_I); + return (uint16_t)(cpival & 0xFF) * CPI_STEP; } void adns9800_set_cpi(uint16_t cpi) { @@ -184,7 +184,7 @@ static int16_t convertDeltaToInt(uint8_t high, uint8_t low) { } report_adns9800_t adns9800_get_report(void) { - report_adns9800_t report = {0, 0}; + report_adns9800_t report = {0}; adns9800_spi_start(); |