mirror of
https://github.com/TomHarte/CLK.git
synced 2026-04-26 19:17:52 +00:00
Factored out the dull and repetitious stuff of writing n bytes of the same value.
This commit is contained in:
@@ -181,3 +181,7 @@ void MFMController::write_crc() {
|
||||
write_byte(crc >> 8);
|
||||
write_byte(crc & 0xff);
|
||||
}
|
||||
|
||||
void MFMController::write_n_bytes(int quantity, uint8_t value) {
|
||||
while(quantity--) write_byte(value);
|
||||
}
|
||||
|
||||
@@ -113,6 +113,11 @@ class MFMController: public Controller {
|
||||
*/
|
||||
void write_crc();
|
||||
|
||||
/*!
|
||||
Calls @c write_byte with @c value, @c quantity times.
|
||||
*/
|
||||
void write_n_bytes(int quantity, uint8_t value);
|
||||
|
||||
private:
|
||||
// Storage::Disk::Controller
|
||||
virtual void process_input_bit(int value, unsigned int cycles_since_index_hole);
|
||||
|
||||
Reference in New Issue
Block a user