minor docs

This commit is contained in:
hathach 2014-04-17 10:13:05 +07:00
parent 32d4b6518c
commit 5c6f8750da
3 changed files with 51 additions and 4 deletions

View File

@ -84,7 +84,7 @@ static char const * const cli_error_message[] =
ENTRY(cp , cli_cmd_copy , "Copies one or more files to another location.\n cp a_file.txt dir1/another_file.txt\n cp a_file.txt dir1\n" ) \
ENTRY(mkdir , cli_cmd_mkdir , "Create a DIRECTORY, if it does not already exist.\n mkdir <new folder>\n" ) \
ENTRY(mv , cli_cmd_move , "Rename or move a DIRECTORY or a FILE.\n mv old_name.txt new_name.txt\n mv old_name.txt dir1/new_name.txt\n" ) \
ENTRY(rm , cli_cmd_remove , "Remove (delete) a empty DIRECTORY or a FILE.\n rm deleted_name.txt\n rm empty_dir\n" ) \
ENTRY(rm , cli_cmd_remove , "Remove (delete) an empty DIRECTORY or FILE.\n rm deleted_name.txt\n rm empty_dir\n" ) \
//--------------------------------------------------------------------+
// Expands the function to have the standard function signature

View File

@ -4,6 +4,7 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**
- [Prerequisites](#prerequisites)
- [Human Interface Device (HID)](#human-interface-device-hid)
- [Keyboard](#keyboard)
- [Mouse](#mouse)
@ -37,7 +38,7 @@ In order to run application demo, you would need
### Keyboard
After the board get enumerated successfully, you can try to press some buttons while opening notepad. It should get some characters out accordingly. Hint:
After the board get enumerated successfully, you can try to press some buttons while opening notepad. It should get some characters out accordingly. In addition, when you press Capslock or Numlock key on your own pc's keyboard, the LED will blink faster twice. This demonstrates that keyboard application can receive Set Report via control pipe.
Notes: The very same buttons may also used by Mouse application. You can get the mouse moving and character, should you enable both.

View File

@ -4,6 +4,8 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**
- [Prerequisites](#prerequisites)
- [Hub](#hub)
- [Human Interface Device (HID)](#human-interface-device-hid)
- [Keyboard](#keyboard)
- [Mouse](#mouse)
@ -22,26 +24,70 @@ tusb_config.h | tinyusb stack configuration.
app_os_prio.h | RTOS task priority definitions
Class-specific | Application files for supported classes.
The demo will start with the greeting of enabled classes and chosen RTOS then start to blink an LED at 1 Hz.
Firstly connect your ansi-escaped supported terminal (see below) to the UART of the evaluation board since all the user interaction happens there. The default UART configure is
- Baudrate = 115200
- Data = 8 bits
- Parity = none
- Stop = 1 bit
- Flow control = none
The demo will start with the greeting of enabled classes and chosen RTOS then start to blink an LED at 1 Hz. When any of supported devices is plugged or un-plugged either directly or via a hub, demo application will print out a short message. Notes: if usb device is composed of supported and unsupported classes such as a keyboard and a camera, the keyboard interface is still mounted as usual without any issues.
**NOTE** Host demo is quite power hunger, especially when you plug a hub with several devices on it. Make sure you have enough power before filing any bugs.
## Prerequisites ##
In order to run application demo, you would need
- A [supported development board](../../boards/readme.md) with at least a button for mouse, keyboard demo.
- A [supported development board](../../boards/readme.md).
- A supported toolchain: LPCXpresso, Keil, IAR.
- A [ANSI escape](http://en.wikipedia.org/wiki/ANSI_escape_code) supported terminal such as [Tera Term](http://en.sourceforge.jp/projects/ttssh2/) to demonstrate properly.
## Hub
Hub is internally handled by tinyusb stack, application code does not have to worry on how to get hub operated. However, application must be written to handle multiple devices simultaneously.
## Human Interface Device (HID)
### Keyboard
When a keyboard device is enumerated, any keys pressed on the device will be echoed to the UART terminal.
![Host Keyboard Demo](http://docs.tinyusb.org/images/demo_host_keyboard.png)
### Mouse
When a mouse device is enumerated, any movements or clicks on the device will be reflected on the terminal. Only make sure the terminal's windows is active on your host OS and it supports ANSI escape code.
![Host Mouse Demo](http://docs.tinyusb.org/images/demo_host_mouse.png)
## Mass Storage Class Device (MSC)
Mass storage demo application only supports device with FAT file system by the help of fatfs (source in *vendor/fatfs*). In addition, it also includes a minimal command line interface *msc_cli.c* to allow user to navigate and execute several basic file operations. When mass storage device is plugged, CLI will be activated, type "help" for the usage. Some are
Command | Description
----- | -------------
cls | clear screen
ls | List information of the FILEs, only supported current directory.
cd | change the current directory.
cat | display contents of a file.
cp | copy files to another location.
mkdir | create a directory, if it does not already exist.
mv | rename or move a directory or a file.
rm | remove (delete) an empty directory or file
Furthermore, the demo's CLI also supports multiple mass storage devices. You could *cd* between disk drives, and copy a file from one to another.
![Host MSC Demo](http://docs.tinyusb.org/images/demo_host_msc.png)
## Communication Class Device (CDC)
CDC has several subclass, currently tinyusb only supports the popular *Abstract Control Model (ACM)*
### Serial
A virtual serial of CDC-ACM is supported, the host demo will echo back any thing it received from the device. So if you use the tinyusb device stack with CDC enabled to test with, you should modify it a bit to constantly send somethings (otherwise 2 demos will wait for each other).
Notes: FTDI is a vendor-specific class, which is not currently supported.
![Host Serial Demo](http://docs.tinyusb.org/images/demo_host_serial.png)