mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-11 15:49:38 +00:00
3e9fa63799
My new belief is that I'm either reading the buffer from the wrong place, or the 68000 isn't filling it for some reason.
35 lines
581 B
C++
35 lines
581 B
C++
//
|
|
// DriveSpeedAccumulator.hpp
|
|
// Clock Signal
|
|
//
|
|
// Created by Thomas Harte on 01/06/2019.
|
|
// Copyright © 2019 Thomas Harte. All rights reserved.
|
|
//
|
|
|
|
#ifndef DriveSpeedAccumulator_hpp
|
|
#define DriveSpeedAccumulator_hpp
|
|
|
|
#include <array>
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
|
|
namespace Apple {
|
|
namespace Macintosh {
|
|
|
|
class DriveSpeedAccumulator {
|
|
public:
|
|
/*!
|
|
Accepts fetched motor control values.
|
|
*/
|
|
void post_sample(uint8_t sample);
|
|
|
|
private:
|
|
std::array<uint8_t, 512> samples_;
|
|
std::size_t sample_pointer_ = 0;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* DriveSpeedAccumulator_hpp */
|