From ccbd964111caadea9690e6d3b39549e485034249 Mon Sep 17 00:00:00 2001 From: Leon Krieg Date: Sun, 15 Sep 2024 19:07:38 +0200 Subject: [PATCH] Set ADC gain to 6.144V and fix multiplexer channel documentation --- src/bus/i2c.c | 2 +- src/bus/i2c.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bus/i2c.c b/src/bus/i2c.c index d777187..a2119fb 100644 --- a/src/bus/i2c.c +++ b/src/bus/i2c.c @@ -502,7 +502,7 @@ word I2C_ADS1115_Read(int channel) // 110 | ±0.256 V // 111 | ±0.256 V - gain = 0x0400; // 2.048 V | 00000100 00000000 + gain = 0x0000; // 6.144 V | 00000100 00000000 // Input multiplexer configuration: These bits // configure the input multiplexer. diff --git a/src/bus/i2c.h b/src/bus/i2c.h index 10f0dff..f29c203 100644 --- a/src/bus/i2c.h +++ b/src/bus/i2c.h @@ -4,9 +4,9 @@ #include "common/types.h" // I2C multiplexer channels -#define AHT01 0x0 // Upper +#define AHT01 0x0 // Lower #define AHT02 0x1 // Middle -#define AHT03 0x2 // Lower +#define AHT03 0x2 // Upper // ADC channels #define ADS01 0x0 // AIN0 GND