From 50b5e63862211ecc16867111b92b575fd8de5be4 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 27 Apr 2023 17:50:13 +0200 Subject: ads111x class: declare constants as static --- include/driver/ads111x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/driver/ads111x.h') 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, -- cgit v1.2.3