final cleanup
This commit is contained in:
@ -6,7 +6,7 @@ void PCSPKdemo::run() {
|
||||
kout << "Playing..." << endl;
|
||||
kout.unlock();
|
||||
|
||||
(pcspk.*melody)(); // This syntax is confusing as hell
|
||||
(*melody)(); // This syntax is confusing as hell
|
||||
|
||||
kout.lock();
|
||||
kout << "Finished" << endl;
|
||||
|
||||
@ -6,12 +6,12 @@
|
||||
|
||||
class PCSPKdemo : public Thread {
|
||||
private:
|
||||
void (PCSPK::*melody)(); // Allow to pass a melody to play when initializing the demo
|
||||
void (*melody)(); // Allow to pass a melody to play when initializing the demo
|
||||
|
||||
public:
|
||||
PCSPKdemo(const PCSPKdemo& copy) = delete;
|
||||
|
||||
explicit PCSPKdemo(void (PCSPK::*melody)()) : Thread("PCSPKdemo"), melody(melody) {}
|
||||
PCSPKdemo(void (*melody)()) : Thread("PCSPKdemo"), melody(melody) {}
|
||||
|
||||
~PCSPKdemo() override {
|
||||
PCSPK::off();
|
||||
|
||||
@ -14,8 +14,10 @@ private:
|
||||
static int is_transmit_empty();
|
||||
|
||||
public:
|
||||
SerialOut(const SerialOut& copy) = delete;
|
||||
SerialOut();
|
||||
SerialOut(const SerialOut& copy) = delete;
|
||||
|
||||
// Can't make singleton because atexit
|
||||
|
||||
static char read();
|
||||
static void write(char a);
|
||||
|
||||
Reference in New Issue
Block a user