1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 08:49:37 +00:00

After a quick check, added a couple of other _delegate initialisations. I should probably find a way to template this.

This commit is contained in:
Thomas Harte 2017-08-01 07:07:43 -04:00
parent 763e3b65d1
commit 9d953421d8
3 changed files with 5 additions and 3 deletions

View File

@ -57,7 +57,7 @@ class Machine {
virtual void machine_did_change_clock_rate(Machine *machine) = 0;
virtual void machine_did_change_clock_is_unlimited(Machine *machine) = 0;
};
void set_delegate(Delegate *delegate) { this->delegate_ = delegate; }
void set_delegate(Delegate *delegate) { delegate_ = delegate; }
protected:
void set_clock_rate(double clock_rate) {

View File

@ -18,7 +18,8 @@ DigitalPhaseLockedLoop::DigitalPhaseLockedLoop(int clocks_per_bit, size_t length
window_length_(clocks_per_bit),
offset_history_pointer_(0),
offset_history_(length_of_history, 0),
offset_(0) {}
offset_(0),
delegate_(nullptr) {}
void DigitalPhaseLockedLoop::run_for(const Cycles cycles) {
offset_ += cycles.as_int();

View File

@ -69,7 +69,8 @@ Shifter::Shifter() :
pll_(PLLClockRate / 4800, 15),
was_high_(false),
input_pattern_(0),
input_bit_counter_(0) {
input_bit_counter_(0),
delegate_(nullptr) {
pll_.set_delegate(this);
}