μHAL
pos_calc.h
1#ifndef POS_CALC_H
2#define POS_CALC_H
3
4#include <chrono>
5#include <memory>
6#include <vector>
7
8#include "controllers.h"
9#include "decoders.h"
10
11namespace pos_calc {
12
13using namespace std::chrono_literals;
14
15/* forward declaration */
16struct pos_calc;
17
18class Core: public RegisterDecoder {
19 std::unique_ptr<struct pos_calc> regs_storage;
20 struct pos_calc &regs;
21
22 void decode() override;
23 void read() override;
24
25 void read_fifo_csr();
26 void decode_fifo_csr();
27 void read_fifo_amps();
28 void decode_fifo_amps();
29
30 public:
31 Core(struct pcie_bars &);
32 ~Core() override;
33
34 bool fifo_empty();
35 void get_fifo_amps();
36};
37
39 std::unique_ptr<struct pos_calc> regs_storage;
40 struct pos_calc &regs;
41
42 Core dec;
43
44 public:
45 Controller(struct pcie_bars &);
47
48 void write_params() override;
49};
50
51} /* namespace pos_calc */
52
53#endif
Definition: controllers.h:35
Definition: decoders.h:97
Definition: pos_calc.h:38
void write_params() override
Definition: pos_calc.cc:243
Definition: pos_calc.h:18
void decode() override
Definition: pos_calc.cc:133
void read() override
Definition: pos_calc.cc:123
Definition: pcie-defs.h:19