nausbhost_app: USB Host Example Application

This directory contains a set of tests designed to exercise the
USB host stack.

This application requires that the following USB device class drivers
be loaded by the BSP:

    1. USB Mouse: Enumerates the mouse and prints the mouse coordinates.
    2. USB Hub: Enumerates the hub and handles device connect and 
       disconnect
    3. USB Keyboard: Enumerates the keyboard and prints out keyboard 
       input.

In bsp_drivers.h, set the following defines:

#define BSP_ENABLE_USB_HUB        TRUE
#define BSP_ENABLE_USB_HOST       TRUE
#define BSP_ENABLE_USB_KEYBOARD   TRUE
#define BSP_ENABLE_USB_MOUSE      TRUE

Once this application is running, you can either connect devices 
directly to the NS9xxx USB host port, or connect a hub to the NS9xxx
and then connect devices to the hub.

The program registers callback functions with the keyboard and 
mouse drivers.  The callbacks will be invoked whenever movement
is detected on the mouse, or when keys are pressed on the keyboard.

Note that the application attempts to translate the keyboard 
scan codes into ASCII characters.  It uses the keyboard map
built into the USB keyboard driver to do this.  This keyboard
map supports the Apple keyboard and the U.S. character set.  You
may need to modify the keyboard map to support keyboards from
other vendors and other character sets.  The translation table is
in the file netos/src/usb_host_drivers/keyboard/usbKeyboard.c.

One GNU make file is provided.  Build the target 'image' to
generate an image that can be debugged with gdb, and the file 
image.bin which can be written to flash if the bootloader is used.
Build the target 'rom.bin' to create the file rom.bin which 
can be written to ROM if the bootloader is not used.

The following files are provided in this template.

appconf.h         sets application configuration settings
makefile          Make file for the GNU toolset.
readme            this file
root.c            contains the applicationStart() function that starts
                  the example application

In addition, the following files in the BSP directory are built
as part of this application.

reset.s         contains the reset code
appconf_api.c   contains code used to read settings in appconf.h


The application build file links in the following libraries. 

libbsp.a               contains the BSP library
libtcpip.a             contains the TCP/IP stack library
libtx.a                contains the ThreadX kernel
libfilesys.a           contains the Native File System library
libposix.a             contains the POSIX layer library
libflash.a             contains the Flash driver API library
libtelnsvr.a           contains the Telnet Server library
libdnsclnt.a           contains the DNS Client library
libusbmassstorage.a    contains the USB Mass Storage library
libusbhost.a           contains the USB Host library
libfat32.a             contains the FAT32 library
libpppintf.a		   contains the PPP Interface Library
libssh.a			   contains the SSH Library
libfatdrvmgr.a         contains the FAT Drive Manager library
libssl.a	           contains SSL/TLS protocol code 
libcrypto.a 		   contains the Crypto Library
libusbhub.a			   contains the USB Hub Library

The application uses the following files located in the
netos\src\linkerScripts directory.  These files are generated
when the BSP is built.

bootldr.dat     bootloader configuration file used to generate the
                file image.bin.  It controls the information placed
                in the bootloader header of the image.

image.ldr       GNU linker script used to build an image that can
                be debugged and used with the bootloader.
                
customize.ldr   Customizable GNU linker script


