Ethernet-based I/O Control

This example application demonstrates web-based I/O control using the
Tiva Ethernet controller and the lwIP TCP/IP Stack.  DHCP is used to
obtain an Ethernet address.  If DHCP times out without obtaining an
address, a static IP address will be chosen using AutoIP.  The address that
is selected will be shown on the QVGA display allowing you to access the
internal web pages served by the application via your normal web browser.

Two different methods of controlling board peripherals via web pages are
illustrated via pages labeled ``IO Control Demo 1'' and ``IO Control
Demo 2'' in the navigation menu on the left of the application's home page.
In both cases, the example allows you to toggle the state of the user LED
on the board and set the speed of a graphical animation on the display.

``IO Control Demo 1'' uses JavaScript running in the web browser to send
HTTP requests for particular special URLs.  These special URLs are
intercepted in the file system support layer (io_fs.c) and used to
control the LED and animation.  Responses generated by the board are
returned to the browser and inserted into the page HTML dynamically by
more JavaScript code.

``IO Control Demo 2'' uses standard HTML forms to pass parameters to CGI
(Common Gateway Interface) handlers running on the board.  These handlers
process the form data and control the animation and LED as requested before
sending a response page (in this case, the original form) back to the
browser.  The application registers the names and handlers for each of its
CGIs with the HTTPD server during initialization and the server calls
these handlers after parsing URL parameters each time one of the CGI URLs
is requested.

Information on the state of the various controls in the second demo is
inserted into the served HTML using SSI (Server Side Include) tags which
are parsed by the HTTPD server in the application.  As with the CGI
handlers, the application registers its list of SSI tags and a handler
function with the web server during initialization and this handler is
called whenever any registered tag is found in a .shtml, .ssi, .shtm or
.xml file being served to the browser.

In addition to LED and animation speed control, the second example also
allows a line of text to be sent to the board for display on the LCD
panel.  This is included to illustrate the decoding of HTTP text strings.

Note that the web server used by this example has been modified from the
example shipped with the basic lwIP package.  Additions include SSI and
CGI support along with the ability to have the server automatically insert
the HTTP headers rather than having these built in to the files in the
file system image.

Source files for the internal file system image can be found in the ``fs''
directory.  If any of these files are changed, the file system image
(io_fsdata.h) should be rebuilt by running the following command from the
enet_io directory:

../../../../tools/bin/makefsfile -i fs -o io_fsdata.h -r -h -q

For additional details on lwIP, refer to the lwIP web page at:
http://savannah.nongnu.org/projects/lwip/

-------------------------------------------------------------------------------

Copyright (c) 2007-2017 Texas Instruments Incorporated.  All rights reserved.
Software License Agreement

Texas Instruments (TI) is supplying this software for use solely and
exclusively on TI's microcontroller products. The software is owned by
TI and/or its suppliers, and is protected under applicable copyright
laws. You may not combine this software with "viral" open-source
software in order to form a larger program.

THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, FOR ANY REASON WHATSOEVER.

This is part of revision 2.1.4.178 of the DK-TM4C129X Firmware Package.
