add semaphore to cga_stream + use it in demos
This commit is contained in:
@ -1,9 +1,16 @@
|
||||
#include "user/demo/PCSPKdemo.h"
|
||||
|
||||
void PCSPKdemo::run() {
|
||||
kout.lock();
|
||||
kout.clear();
|
||||
kout << "Playing..." << endl;
|
||||
kout.unlock();
|
||||
|
||||
(pcspk.*this->melody)(); // This syntax is confusing as hell
|
||||
|
||||
kout.lock();
|
||||
kout << "Finished" << endl;
|
||||
kout.unlock();
|
||||
|
||||
scheduler.exit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user