Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 1:25121f821584
- Parent:
- 0:e0f222acdecd
--- a/main.cpp Thu May 24 19:22:32 2012 +0000
+++ b/main.cpp Thu May 24 19:23:47 2012 +0000
@@ -44,15 +44,18 @@
char c = com_->getc();
if (c == 'p') {
// Set pixel.
+ // Format: px[int]y[int]r[int]g[int]b[int]w[int]
int x, y, r, g, b, w;
com_.scanf("x%dy%dr%dg%db%dw%d", &x, &y, &r, &g, &b, &w);
display_->set(x, y, r, g, b, w);
} else if (c == '+') {
// Draw display.
+ // Format: +
display_->draw();
com_.printf("Drawing!");
} else if (c == '-') {
// Clear display.
+ // Format: -
display_->reset();
com_.printf("Resetting!");
}