summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2023-04-27 17:50:13 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2023-04-27 17:50:13 +0200
commit50b5e63862211ecc16867111b92b575fd8de5be4 (patch)
tree1911e4bb3d698ea9b0dde102d1545fa8826b8f54
parentc3ba92df6dce55321206ea6191456f280a91608b (diff)
ads111x class: declare constants as static
-rw-r--r--include/driver/ads111x.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/driver/ads111x.h b/include/driver/ads111x.h
index 2514e8d..da670be 100644
--- a/include/driver/ads111x.h
+++ b/include/driver/ads111x.h
@@ -27,7 +27,7 @@ class ADS111x {
public:
ADS111x(unsigned char const addr) : address(addr), fsr_scale(8) {}
- unsigned short const START_CONVERSION = 1 << 15;
+ static unsigned short const START_CONVERSION = 1 << 15;
enum conf_mux : unsigned short {
DIFFERENTIAL_01 = 0 << 12,
DIFFERENTIAL_03 = 1 << 12,
@@ -38,8 +38,8 @@ class ADS111x {
SINGLE_2 = 6 << 12,
SINGLE_3 = 7 << 12
};
- unsigned short const CONF_PGA_MASK = 0b0000111000000000;
- unsigned short const CONF_PGA_OFFSET = 9;
+ static unsigned short const CONF_PGA_MASK = 0b0000111000000000;
+ static unsigned short const CONF_PGA_OFFSET = 9;
enum conf_pga : unsigned short {
FSR_6V = 0 << 9,
FSR_4V = 1 << 9,