7 #ifndef ANALOG_MODULE_H_
8 #define ANALOG_MODULE_H_
10 #include "ChipObject.h"
26 static const long kDefaultOversampleBits = 0;
27 static const long kDefaultAverageBits = 7;
28 static constexpr
float kDefaultSampleRate = 50000.0;
51 static SEM_ID m_registerWindowSemaphore;
53 uint32_t GetNumActiveChannels();
54 uint32_t GetNumChannelsToActivate();
55 void SetNumChannelsToActivate(uint32_t channels);
59 uint32_t m_numChannelsToActivate;
int32_t VoltsToValue(int32_t channel, float voltage)
Definition: AnalogModule.cpp:332
Definition: AnalogModule.h:20
float GetAverageVoltage(uint32_t channel)
Definition: AnalogModule.cpp:377
int32_t GetOffset(uint32_t channel)
Definition: AnalogModule.cpp:415
AnalogModule(uint8_t moduleNumber)
Definition: AnalogModule.cpp:54
virtual ~AnalogModule()
Definition: AnalogModule.cpp:85
float GetSampleRate()
Definition: AnalogModule.cpp:134
static const long kTimebase
40 MHz clock
Definition: AnalogModule.h:25
float GetVoltage(uint32_t channel)
Definition: AnalogModule.cpp:358
int32_t GetAverageValue(uint32_t channel)
Definition: AnalogModule.cpp:298
void SetOversampleBits(uint32_t channel, uint32_t bits)
Definition: AnalogModule.cpp:232
void SetAverageBits(uint32_t channel, uint32_t bits)
Definition: AnalogModule.cpp:198
void SetSampleRate(float samplesPerSecond)
Definition: AnalogModule.cpp:97
uint32_t GetAverageBits(uint32_t channel)
Definition: AnalogModule.cpp:214
static AnalogModule * GetInstance(uint8_t moduleNumber)
Definition: AnalogModule.cpp:28
int16_t GetValue(uint32_t channel)
Definition: AnalogModule.cpp:264
uint32_t GetOversampleBits(uint32_t channel)
Definition: AnalogModule.cpp:248
uint32_t GetLSBWeight(uint32_t channel)
Definition: AnalogModule.cpp:397