Prusa-MMU-Private
PrusaMultiMaterialUpgradev3firmwareforMK3SMK4
voltage.h
Go to the documentation of this file.
1 #pragma once
3 
4 #include <stdint.h>
5 #include "../config/config.h"
6 
8 namespace modules {
9 namespace voltage {
10 
21 class VCC {
22 public:
23  inline constexpr VCC()
24  : vcc_val(0) {}
25 
27  void Step();
28 
31  uint16_t CurrentBandgapVoltage() const { return vcc_val; }
32 
33 private:
34  uint16_t vcc_val;
35 };
36 
38 extern VCC vcc;
39 
40 } // namespace voltage
41 } // namespace modules
42 
43 namespace mv = modules::voltage;
Definition: voltage.h:21
void Step()
Reads the ADC, checks the value.
Definition: voltage.cpp:12
uint16_t CurrentBandgapVoltage() const
Definition: voltage.h:31
The modules namespace contains models of MMU's components.
Definition: command_base.h:8