nuttx/drivers/analog
Michał Łyszczek 459b4434b1 drivers/analog/hx711.c: fix averaging on negative values
ptype of ((int32_t)0 * (uint32_t)0) is (unsigned). "i" counter was
declared unsigned to not make comparision with "unsigned char" in for loop.
This resulted in calculation in average to be implicitly casted to unsigned,
and when negative number was added to it, it turned into huge value.

Change type of "i" to signed, and just cast (unsigned char) to (int)
to fix this.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2024-03-03 01:56:40 +08:00
..
ad5410.c
adc.c poll: pollsetup should notify only one fd passd by caller 2023-11-21 09:07:17 +01:00
ads1242.c mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
ads1255.c
ads7828.c
CMakeLists.txt drivers/analog/hx711.c: Add driver for hx711 adc 2024-02-26 19:16:51 -03:00
comp.c poll: pollsetup should notify only one fd passd by caller 2023-11-21 09:07:17 +01:00
dac7554.c mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
dac7571.c
dac.c fs: Add g_ prefix for all global file_operations instances 2023-04-24 16:13:29 +02:00
hx711.c drivers/analog/hx711.c: fix averaging on negative values 2024-03-03 01:56:40 +08:00
Kconfig drivers/analog/hx711.c: Add driver for hx711 adc 2024-02-26 19:16:51 -03:00
lmp92001.c drivers/ioexpander: Add const to the value array of multiwritepin 2023-09-28 10:09:51 +08:00
ltc1867l.c mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
Make.defs drivers/analog/hx711.c: Add driver for hx711 adc 2024-02-26 19:16:51 -03:00
max1161x.c
mcp48xx.c
opamp.c fs: Add g_ prefix for all global file_operations instances 2023-04-24 16:13:29 +02:00
pga11x.c