AppConfigHeaders: Move out the last of the demo/app configurations into new AppConfig.h header files.

This commit is contained in:
Dean Camera 2012-05-13 21:01:23 +00:00
parent ae6a514929
commit e9e6730d49
57 changed files with 664 additions and 162 deletions

View file

@ -29,21 +29,26 @@
*/
/** \file
* \brief Network Configuration Header File
* \brief Application Configuration Header File
*
* This header file is used to configure various portions of the
* network stack used by the application.
* This is a header file which is be used to configure some of
* the application's compile time options, as an alternative to
* specifying the compile time constants supplied through a
* makefile or build system.
*
* For information on what each token does, refer to the LUFA
* manual section "Summary of Compile Tokens".
* For information on what each token does, refer to the
* \ref Sec_Options section of the application documentation.
*/
#ifndef _NETWORK_CONFIG_H_
#define _NETWORK_CONFIG_H_
#ifndef _APP_CONFIG_H_
#define _APP_CONFIG_H_
#define CLIENT_IP_ADDRESS { 10, 0, 0, 1}
#define SERVER_IP_ADDRESS { 10, 0, 0, 2}
#define ADAPTER_MAC_ADDRESS {0x02, 0x00, 0x02, 0x00, 0x02, 0x00}
#define SERVER_MAC_ADDRESS {0x00, 0x01, 0x00, 0x01, 0x00, 0x01}
#define NO_DECODE_ETHERNET
#define NO_DECODE_ARP
#define NO_DECODE_IP

View file

@ -52,12 +52,6 @@
#include "IP.h"
/* Macros: */
/** Physical MAC address of the USB RNDIS network adapter. */
#define ADAPTER_MAC_ADDRESS {0x02, 0x00, 0x02, 0x00, 0x02, 0x00}
/** Physical MAC address of the virtual server on the network. */
#define SERVER_MAC_ADDRESS {0x00, 0x01, 0x00, 0x01, 0x00, 0x01}
/** Physical MAC address of the network broadcast address. */
#define BROADCAST_MAC_ADDRESS {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}

View file

@ -43,7 +43,7 @@
#include "EthernetProtocols.h"
#include "Ethernet.h"
#include "ProtocolDecoders.h"
#include "Config/NetworkConfig.h"
#include "Config/AppConfig.h"
/* Macros: */
/** Protocol IP address of the broadcast address. */

View file

@ -45,7 +45,7 @@
#include "EthernetProtocols.h"
#include "Ethernet.h"
#include "Config/NetworkConfig.h"
#include "Config/AppConfig.h"
/* Function Prototypes: */
void DecodeEthernetFrameHeader(void* InDataStart);

View file

@ -84,38 +84,58 @@
* <td><b>Description:</b></td>
* </tr>
* <tr>
* <td>CLIENT_IP_ADDRESS</td>
* <td>AppConfig.h</td>
* <td>Configures the IP address given to the client (PC) via the DHCP server.</td>
* </tr>
* <tr>
* <td>SERVER_IP_ADDRESS</td>
* <td>AppConfig.h</td>
* <td>Configures the IP address of the virtual server.</td>
* </tr>
* <tr>
* <td>ADAPTER_MAC_ADDRESS</td>
* <td>AppConfig.h</td>
* <td>Configures the MAC address of the RNDIS adapter on the host (PC) side.</td>
* </tr>
* <tr>
* <td>SERVER_MAC_ADDRESS</td>
* <td>AppConfig.h</td>
* <td>Configures the MAC address of the virtual server on the network.</td>
* </tr>
* <tr>
* <td>NO_DECODE_ETHERNET</td>
* <td>NetworkConfig.h</td>
* <td>AppConfig.h</td>
* <td>When defined, received Ethernet headers will not be decoded and printed to the device serial port.</td>
* </tr>
* <tr>
* <td>NO_DECODE_ARP</td>
* <td>NetworkConfig.h</td>
* <td>AppConfig.h</td>
* <td>When defined, received ARP headers will not be decoded and printed to the device serial port.</td>
* </tr>
* <tr>
* <td>NO_DECODE_IP</td>
* <td>NetworkConfig.h</td>
* <td>AppConfig.h</td>
* <td>When defined, received IP headers will not be decoded and printed to the device serial port.</td>
* </tr>
* <tr>
* <td>NO_DECODE_ICMP</td>
* <td>NetworkConfig.h</td>
* <td>AppConfig.h</td>
* <td>When defined, received ICMP headers will not be decoded and printed to the device serial port.</td>
* </tr>
* <tr>
* <td>NO_DECODE_TCP</td>
* <td>NetworkConfig.h</td>
* <td>AppConfig.h</td>
* <td>When defined, received TCP headers will not be decoded and printed to the device serial port.</td>
* </tr>
* <tr>
* <td>NO_DECODE_UDP</td>
* <td>NetworkConfig.h</td>
* <td>AppConfig.h</td>
* <td>When defined, received UDP headers will not be decoded and printed to the device serial port.</td>
* </tr>
* <tr>
* <td>NO_DECODE_DHCP</td>
* <td>NetworkConfig.h</td>
* <td>AppConfig.h</td>
* <td>When defined, received DHCP headers will not be decoded and printed to the device serial port.</td>
* </tr>
* </table>