$REVOLUTION_SDK_ROOT/build/demos/kbddemo
Go to the directory $REVOLUTION_SDK_ROOT/build/demos/kbddemo and type "make". Executable (.elf) files will be generated under the path $REVOLUTION_SDK_ROOT/RVL/bin/demos/kbddemo/.
To function, all demos require a USB keyboard. A Nintendo GameCube Controller is also required for some demos.
The demos kbdUTF8 and kbdUTF8Sync require a UTF-8 compliant terminal program in order to properly view the output for non-English keyboards. This is one method we have found for properly showing the output of these demos:
devel install the Cygwin package "ruby: Interpreted object-oriented scripting language".terminator.msi from http://software.jessies.org/terminator/.Uterm is in $REVOLUTION_SDK_ROOT/X86/bin/.kbdUTF8 demo.Uterm, enter CTRL+C on the PC.))To run either of the demos, change to the $REVOLUTION_SDK_ROOT/RVL/bin/demos/kbddemo/ directory and do the following:
To simply run an application, run the ndrun script with the .elf file as an argument.
To debug using CodeWarrior, do one of the following:
?Execute $CWFOLDER/bin/IDE.exe, using the .elf file as an argument.
?Launch $CWFOLDER/bin/IDE.exe, then drag the .elf file.
If the .elf file is associated with $CWFOLDER/bin/IDE.exe, double-click the .elf file.
Note: These sample demos demonstrate the use of the USB keyboard (KBD) library. To verify the operation of these demos, you must insert a USB Keyboard into a USB Port.All demos except kbdLowLevel also use a GameCube Controller plugged into Controller Port 1.
Demo Name | Description |
| kbdLowLevel |
Shows how to use the low-level KBD callback interface. Prints the USB HID code which is output every time a key is pressed and released on the USB keyboard. |
|---|---|
| kbdUTF8 |
Shows how to use the high-level KBD callback interface. Translates each key press into its UTF-8 equivalent; for keys that do not have an equivalent, translates each key press into a descriptive string. To set the next country for the keyboard, use the A Button on Nintendo GameCube Controller. To set the previous country for the keyboard, use the B Button on Nintendo GameCube Controller. To change the keyboard channel affected by the A or B Button, use the X Button on Nintendo GameCube Controller. To print a sample UTF-8 string, use the Y Button on Nintendo GameCube Controller. This makes sure that your terminal program gives you proper UTF-8 output. |
| kbdLowLevelSync |
Shows how to use the low-level interface for KBD synchronous functions. Use Nintendo GameCube Controller R Button to make the application sleep for 5 seconds. This makes it possible to verify overflow operation. |
| kbdUTF8Sync |
Shows how to use the high-level interface for KBD synchronous functions. To set the next country for the keyboard, use the A Button on Nintendo GameCube Controller. To set the previous country for the keyboard, use the B Button on Nintendo GameCube Controller. To change the keyboard channel affected by the A or B Button, use the X Button on Nintendo GameCube Controller. To print a sample UTF-8 string, use the Y Button on Nintendo GameCube Controller. This makes sure that your terminal program gives you proper UTF-8 output. To make the application sleep for 5 seconds, use the R Button on Nintendo GameCube Controller. This makes it possible to verify overflow operation. |
In the high-level demos, we have implemented switching between the Japanese and Greek languages. For Japanese, use the Katana-Hiragana key; for Greek, use ALT+SPACE.
2007/03/20 Initial version.
CONFIDENTIAL