μHAL
afc_timing.h
1#ifndef AFC_TIMING_H
2#define AFC_TIMING_H
3
4#include <memory>
5#include <string>
6#include <vector>
7
8#include "controllers.h"
9#include "decoders.h"
10
11namespace afc_timing {
12
13/* forward declaration */
14struct afc_timing;
15
16class Core: public RegisterDecoder {
17 std::unique_ptr<struct afc_timing> regs_storage;
18 struct afc_timing &regs;
19
20 void decode() override;
21
22 public:
23 Core(struct pcie_bars &);
24 ~Core() override;
25};
26
28 std::unique_ptr<struct afc_timing> regs_storage;
29 struct afc_timing &regs;
30
31 Core dec;
32
33 void encode_params() override;
34 void unset_commands() override;
35
37 struct clock {
38 uint64_t rfreq;
39 uint8_t n1, hs_div;
40 } rtm_clock = {}, afc_clock = {};
41
42 bool set_freq(double, struct Controller::clock &);
43
44 public:
45 Controller(struct pcie_bars &);
46 ~Controller();
47
48 static const std::vector<std::string> sources_list;
49
50 bool set_rtm_freq(double);
51 bool set_afc_freq(double);
52};
53
54} /* namespace afc_timing */
55
56#endif
Definition: controllers.h:35
Definition: decoders.h:97
Definition: afc_timing.h:27
void unset_commands() override
Definition: afc_timing.cc:243
void encode_params() override
Definition: afc_timing.cc:230
Definition: afc_timing.h:16
void decode() override
Definition: afc_timing.cc:115
Definition: afc_timing.h:37
Definition: afc_timing.cc:49
Definition: pcie-defs.h:19