kaleidoscope::device::Base: Add a few dummy functions to NoOpSerial

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/1086/head
Gergely Nagy 3 years ago committed by Jesse Vincent
parent 53cfa962bf
commit 8730e242e4
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -1,6 +1,6 @@
/* -*- mode: c++ -*- /* -*- mode: c++ -*-
* kaleidoscope::device::Base -- Kaleidoscope device Base class * kaleidoscope::device::Base -- Kaleidoscope device Base class
* Copyright (C) 2017, 2018, 2019 Keyboard.io, Inc * Copyright (C) 2017-2021 Keyboard.io, Inc
* *
* This program is free software: you can redistribute it and/or modify it under * This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software * the terms of the GNU General Public License as published by the Free Software
@ -73,6 +73,13 @@ class Base {
class NoOpSerial { class NoOpSerial {
public: public:
NoOpSerial() {} NoOpSerial() {}
void begin(uint32_t baud) {}
size_t print(...) {}
size_t println(...) {}
int peek() { return 0; }
long parseInt() { return 0; }
int available() { return 0; }
int read() { return 0; }
}; };
static NoOpSerial noop_serial_; static NoOpSerial noop_serial_;

Loading…
Cancel
Save