naexternalirq: External Interrupt Example Application

This application demonstrates how to use the ARM9 external interrupts on the
NS9750 and NS9360 development boards.  This application requires using a GPIO
line with external interrupt capability and a GPIO line configured as an 
output line.  The output GPIO line is connected to the external interrupt
GPIO line and used as an interrupt trigger.  The test application generates a
square wave signal out the output GPIO signal to trigger interrupts on the 
GPIO line with external interrupt capability.

When running this application on an NS9360 development board (aka Cooper ODIC
board), GPIO0 is the output signal and GPIO1 is the external interrupt (IRQ0).
The following hardware and software setup is required:

1) Add a jumper to connect pins 3 and 4 of P15 (SPI pins).
2) In netos\src\bsp\platforms\ns9360_a\bsp_serial.h set BSP_SERIAL_PORT_2 to 
   BSP_SERIAL_NO_DRIVER to disable using serial port 2.
3) In netos\src\bsp\platforms\ns9360_a\gpio.h set BSP_GPIO_INITIAL_STATE_PIN7
   to BSP_GPIO_INITIAL_STATE_OUTPUT_DRIVER_LOGIC1 so that no SPI devices are
   selected.
4) In netos\src\bsp\platforms\ns9360_a\gpio.h set BSP_GPIO_MUX_SERIAL_B to
   BSP_GPIO_MUX_INTERNAL_USE_ONLY to disable using serial port 2 signals.
5) In netos\src\bsp\platforms\ns9360_a\gpio.h set BSP_GPIO_MUX_IRQ_0 to
   BSP_GPIO_MUX_USE_PRIMARY_PATH to enable using IRQ0.
6) In netos\src\bsp\platforms\ns9360_a\gpio.h set BSP_GPIO_MUX_IRQ_0_CONFIG to
   the desired interrupt trigger mode.  The four interrupt trigger modes are
   - BSP_GPIO_MUX_IRQ_ACTIVE_HIGH
   - BSP_GPIO_MUX_IRQ_ACTIVE_LOW
   - BSP_GPIO_MUX_IRQ_RISING_EDGE
   - BSP_GPIO_MUX_IRQ_FALLING_EDGE

When running this application on an NS9750 development board, GPIO0 is the 
output signal and GPIO1 is the external interrupt (IRQ0).  The following 
hardware and software setup is required:

1) Add a jumper to connect pins 1 and 2 of P41 (SPI pins).
2) In netos\src\bsp\platforms\ns9750_a\bsp_serial.h set BSP_SERIAL_PORT_2 to 
   BSP_SERIAL_NO_DRIVER to disable using serial port 2.
3) In netos\src\bsp\platforms\ns9750_a\gpio.h set BSP_GPIO_INITIAL_STATE_PIN7
   to BSP_GPIO_INITIAL_STATE_OUTPUT_DRIVER_LOGIC1 so that no SPI devices are
   selected.
4) In netos\src\bsp\platforms\ns9750_a\gpio.h set BSP_GPIO_MUX_SERIAL_B to
   BSP_GPIO_MUX_INTERNAL_USE_ONLY to disable using serial port 2 signals.
5) In netos\src\bsp\platforms\ns9750_a\gpio.h set BSP_GPIO_MUX_IRQ_0 to
   BSP_GPIO_MUX_USE_PRIMARY_PATH to enable using IRQ0.
6) In netos\src\bsp\platforms\ns9750_a\gpio.h set BSP_GPIO_MUX_IRQ_0_CONFIG to
   the desired interrupt trigger mode.  The four interrupt trigger modes are
   - BSP_GPIO_MUX_IRQ_ACTIVE_HIGH
   - BSP_GPIO_MUX_IRQ_ACTIVE_LOW
   - BSP_GPIO_MUX_IRQ_RISING_EDGE
   - BSP_GPIO_MUX_IRQ_FALLING_EDGE


After making the above software changes, the BSP must be rebuilt.  Afterwards,
the application must be rebuilt with the new BSP.  The example application
supports all four modes of interrupt triggering.


The following files are provided in this example.

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


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


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 application build file links in the following libraries.

libbsp.a           		contains the BSP code
libtcpip.a         		contains the Net+Works TCP/IP stack
libtx.a            		contains the ThreadX kernel
libfilesys.a       		contains the file system libraries
libposix.a         		contains the POSIX layer libraries
libflash.a         		contains the Flash driver API library
libftpclnt.a       		contains the FTP client library
libftpsvr.a        		contains the FTP server library
libemailc.a        		contains the Email client library
libtelnsvr.a       		contains the Telnet server library
libds.a       	   		contains the Directory Services library
libaddp.a		   		contains the ADDP Library
libssh.a		   		contains the SSH Library
librphttpd.a       		contains the NET+Works AWS API library.
libmanapi.a        		contains the NET+Works Management API library.
libusbmassstorage.a    	contains the USB Mass Storage library
libusbhost.a           	contains the USB Host library
libfat32.a             	contains the FAT32 library
libldap3.a       		contains the LDAPv3 client API library
libsntp.a				contains the SNTP API Library
libgui.a 				contains the GUI Library
libcrypto.a 			contains the Crypto Library
libssl.a 				contains the SSL Library
libsflash.a         	contains the Serial Flash driver API library
libnarmapi.a


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
