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.
main.cpp@0:231dc8341ad9, 2009-11-12 (annotated)
- Committer:
- simon
- Date:
- Thu Nov 12 00:51:56 2009 +0000
- Revision:
- 0:231dc8341ad9
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| simon | 0:231dc8341ad9 | 1 | #include "mbed.h" |
| simon | 0:231dc8341ad9 | 2 | #include "PS2ASCII.h" |
| simon | 0:231dc8341ad9 | 3 | |
| simon | 0:231dc8341ad9 | 4 | PS2ASCII myKeyboard(p28, p26); |
| simon | 0:231dc8341ad9 | 5 | DigitalOut LED(LED1); |
| simon | 0:231dc8341ad9 | 6 | |
| simon | 0:231dc8341ad9 | 7 | int main() { |
| simon | 0:231dc8341ad9 | 8 | while (1) { |
| simon | 0:231dc8341ad9 | 9 | unsigned char symbol = myKeyboard.getChar(); |
| simon | 0:231dc8341ad9 | 10 | if(myKeyboard.E0flag() == true) { //is the make code one or two bytes long? |
| simon | 0:231dc8341ad9 | 11 | printf(" E0 "); |
| simon | 0:231dc8341ad9 | 12 | } |
| simon | 0:231dc8341ad9 | 13 | printf("%c", symbol); |
| simon | 0:231dc8341ad9 | 14 | } |
| simon | 0:231dc8341ad9 | 15 | } |