mirror of
				https://github.com/mfulz/qmk_firmware.git
				synced 2025-11-04 07:12:33 +01:00 
			
		
		
		
	Exclude FATFs from the Webserver project documentation. Rename the functions in the HTTPServerApp.c/.h files so that they use the correct "HTTPServerApp_" prefix, and not "Webserver_".
This commit is contained in:
		
							parent
							
								
									a96d77eca7
								
							
						
					
					
						commit
						08e8d6393e
					
				@ -629,7 +629,7 @@ EXCLUDE_SYMLINKS       = NO
 | 
				
			|||||||
# against the file with absolute path, so to exclude all test directories
 | 
					# against the file with absolute path, so to exclude all test directories
 | 
				
			||||||
# for example use the pattern */test/*
 | 
					# for example use the pattern */test/*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
EXCLUDE_PATTERNS       = */uip/*
 | 
					EXCLUDE_PATTERNS       = */uip/* */FATFs/* 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
 | 
					# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
 | 
				
			||||||
# (namespaces, classes, functions, etc.) that should be excluded from the
 | 
					# (namespaces, classes, functions, etc.) that should be excluded from the
 | 
				
			||||||
 | 
				
			|||||||
@ -79,7 +79,7 @@ FATFS DiskFATState;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Initialization function for the simple HTTP webserver. */
 | 
					/** Initialization function for the simple HTTP webserver. */
 | 
				
			||||||
void WebserverApp_Init(void)
 | 
					void HTTPServerApp_Init(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	/* Listen on port 80 for HTTP connections from hosts */
 | 
						/* Listen on port 80 for HTTP connections from hosts */
 | 
				
			||||||
	uip_listen(HTONS(HTTP_SERVER_PORT));
 | 
						uip_listen(HTONS(HTTP_SERVER_PORT));
 | 
				
			||||||
@ -91,7 +91,7 @@ void WebserverApp_Init(void)
 | 
				
			|||||||
/** uIP stack application callback for the simple HTTP webserver. This function must be called each time the
 | 
					/** uIP stack application callback for the simple HTTP webserver. This function must be called each time the
 | 
				
			||||||
 *  TCP/IP stack needs a TCP packet to be processed.
 | 
					 *  TCP/IP stack needs a TCP packet to be processed.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
void WebserverApp_Callback(void)
 | 
					void HTTPServerApp_Callback(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	uip_tcp_appstate_t* const AppState = &uip_conn->appstate;
 | 
						uip_tcp_appstate_t* const AppState = &uip_conn->appstate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -130,16 +130,16 @@ void WebserverApp_Callback(void)
 | 
				
			|||||||
		switch (AppState->CurrentState)
 | 
							switch (AppState->CurrentState)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			case WEBSERVER_STATE_OpenRequestedFile:
 | 
								case WEBSERVER_STATE_OpenRequestedFile:
 | 
				
			||||||
				Webserver_OpenRequestedFile();
 | 
									HTTPServerApp_OpenRequestedFile();
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
			case WEBSERVER_STATE_SendResponseHeader:
 | 
								case WEBSERVER_STATE_SendResponseHeader:
 | 
				
			||||||
				Webserver_SendResponseHeader();
 | 
									HTTPServerApp_SendResponseHeader();
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
			case WEBSERVER_STATE_SendMIMETypeHeader:
 | 
								case WEBSERVER_STATE_SendMIMETypeHeader:
 | 
				
			||||||
				Webserver_SendMIMETypeHeader();	
 | 
									HTTPServerApp_SendMIMETypeHeader();	
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
			case WEBSERVER_STATE_SendData:
 | 
								case WEBSERVER_STATE_SendData:
 | 
				
			||||||
				Webserver_SendData();
 | 
									HTTPServerApp_SendData();
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
			case WEBSERVER_STATE_Closing:
 | 
								case WEBSERVER_STATE_Closing:
 | 
				
			||||||
				uip_close();
 | 
									uip_close();
 | 
				
			||||||
@ -153,7 +153,7 @@ void WebserverApp_Callback(void)
 | 
				
			|||||||
/** HTTP Server State handler for the Request Process state. This state manages the processing of incomming HTTP
 | 
					/** HTTP Server State handler for the Request Process state. This state manages the processing of incomming HTTP
 | 
				
			||||||
 *  GET requests to the server from the receiving HTTP client.
 | 
					 *  GET requests to the server from the receiving HTTP client.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static void Webserver_OpenRequestedFile(void)
 | 
					static void HTTPServerApp_OpenRequestedFile(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	uip_tcp_appstate_t* const AppState    = &uip_conn->appstate;
 | 
						uip_tcp_appstate_t* const AppState    = &uip_conn->appstate;
 | 
				
			||||||
	char*               const AppData     = (char*)uip_appdata;
 | 
						char*               const AppData     = (char*)uip_appdata;
 | 
				
			||||||
@ -193,7 +193,7 @@ static void Webserver_OpenRequestedFile(void)
 | 
				
			|||||||
/** HTTP Server State handler for the HTTP Response Header Send state. This state manages the transmission of
 | 
					/** HTTP Server State handler for the HTTP Response Header Send state. This state manages the transmission of
 | 
				
			||||||
 *  the HTTP response header to the receiving HTTP client.
 | 
					 *  the HTTP response header to the receiving HTTP client.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static void Webserver_SendResponseHeader(void)
 | 
					static void HTTPServerApp_SendResponseHeader(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	uip_tcp_appstate_t* const AppState    = &uip_conn->appstate;
 | 
						uip_tcp_appstate_t* const AppState    = &uip_conn->appstate;
 | 
				
			||||||
	char*               const AppData     = (char*)uip_appdata;
 | 
						char*               const AppData     = (char*)uip_appdata;
 | 
				
			||||||
@ -222,7 +222,7 @@ static void Webserver_SendResponseHeader(void)
 | 
				
			|||||||
/** HTTP Server State handler for the MIME Header Send state. This state manages the transmission of the file
 | 
					/** HTTP Server State handler for the MIME Header Send state. This state manages the transmission of the file
 | 
				
			||||||
 *  MIME type header for the requested file to the receiving HTTP client.
 | 
					 *  MIME type header for the requested file to the receiving HTTP client.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static void Webserver_SendMIMETypeHeader(void)
 | 
					static void HTTPServerApp_SendMIMETypeHeader(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	uip_tcp_appstate_t* const AppState    = &uip_conn->appstate;
 | 
						uip_tcp_appstate_t* const AppState    = &uip_conn->appstate;
 | 
				
			||||||
	char*               const AppData     = (char*)uip_appdata;
 | 
						char*               const AppData     = (char*)uip_appdata;
 | 
				
			||||||
@ -267,7 +267,7 @@ static void Webserver_SendMIMETypeHeader(void)
 | 
				
			|||||||
/** HTTP Server State handler for the Data Send state. This state manages the transmission of file chunks
 | 
					/** HTTP Server State handler for the Data Send state. This state manages the transmission of file chunks
 | 
				
			||||||
 *  to the receiving HTTP client.
 | 
					 *  to the receiving HTTP client.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static void Webserver_SendData(void)
 | 
					static void HTTPServerApp_SendData(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	uip_tcp_appstate_t* const AppState    = &uip_conn->appstate;
 | 
						uip_tcp_appstate_t* const AppState    = &uip_conn->appstate;
 | 
				
			||||||
	char*               const AppData     = (char*)uip_appdata;
 | 
						char*               const AppData     = (char*)uip_appdata;
 | 
				
			||||||
 | 
				
			|||||||
@ -68,14 +68,14 @@
 | 
				
			|||||||
		#define HTTP_SERVER_PORT  80
 | 
							#define HTTP_SERVER_PORT  80
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Function Prototypes: */
 | 
						/* Function Prototypes: */
 | 
				
			||||||
		void WebserverApp_Init(void);
 | 
							void HTTPServerApp_Init(void);
 | 
				
			||||||
		void WebserverApp_Callback(void);
 | 
							void HTTPServerApp_Callback(void);
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		#if defined(INCLUDE_FROM_HTTPSERVERAPP_C)
 | 
							#if defined(INCLUDE_FROM_HTTPSERVERAPP_C)
 | 
				
			||||||
			static void Webserver_OpenRequestedFile(void);
 | 
								static void HTTPServerApp_OpenRequestedFile(void);
 | 
				
			||||||
			static void Webserver_SendResponseHeader(void);
 | 
								static void HTTPServerApp_SendResponseHeader(void);
 | 
				
			||||||
			static void Webserver_SendMIMETypeHeader(void);
 | 
								static void HTTPServerApp_SendMIMETypeHeader(void);
 | 
				
			||||||
			static void Webserver_SendData(void);
 | 
								static void HTTPServerApp_SendData(void);
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
				
			|||||||
@ -75,7 +75,7 @@ void uIPManagement_Init(void)
 | 
				
			|||||||
	uip_setethaddr(MACAddress);
 | 
						uip_setethaddr(MACAddress);
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	/* HTTP Webserver Initialization */
 | 
						/* HTTP Webserver Initialization */
 | 
				
			||||||
	WebserverApp_Init();
 | 
						HTTPServerApp_Init();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** uIP Management function. This function manages the uIP stack when called while an RNDIS device has been
 | 
					/** uIP Management function. This function manages the uIP stack when called while an RNDIS device has been
 | 
				
			||||||
 | 
				
			|||||||
@ -149,7 +149,7 @@ uip_arp_init(void)
 | 
				
			|||||||
void
 | 
					void
 | 
				
			||||||
uip_arp_timer(void)
 | 
					uip_arp_timer(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  struct arp_entry *tabptr;
 | 
					  struct arp_entry *tabptr = NULL;
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  ++arptime;
 | 
					  ++arptime;
 | 
				
			||||||
  for(i = 0; i < UIP_ARPTAB_SIZE; ++i) {
 | 
					  for(i = 0; i < UIP_ARPTAB_SIZE; ++i) {
 | 
				
			||||||
@ -165,7 +165,7 @@ uip_arp_timer(void)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
uip_arp_update(uip_ipaddr_t *ipaddr, struct uip_eth_addr *ethaddr)
 | 
					uip_arp_update(uip_ipaddr_t *ipaddr, struct uip_eth_addr *ethaddr)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  register struct arp_entry *tabptr;
 | 
					  register struct arp_entry *tabptr = NULL;
 | 
				
			||||||
  /* Walk through the ARP mapping table and try to find an entry to
 | 
					  /* Walk through the ARP mapping table and try to find an entry to
 | 
				
			||||||
     update. If none is found, the IP -> MAC address mapping is
 | 
					     update. If none is found, the IP -> MAC address mapping is
 | 
				
			||||||
     inserted in the ARP table. */
 | 
					     inserted in the ARP table. */
 | 
				
			||||||
@ -282,7 +282,6 @@ uip_arp_ipin(void)
 | 
				
			|||||||
void
 | 
					void
 | 
				
			||||||
uip_arp_arpin(void)
 | 
					uip_arp_arpin(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  
 | 
					 | 
				
			||||||
  if(uip_len < sizeof(struct arp_hdr)) {
 | 
					  if(uip_len < sizeof(struct arp_hdr)) {
 | 
				
			||||||
    uip_len = 0;
 | 
					    uip_len = 0;
 | 
				
			||||||
    return;
 | 
					    return;
 | 
				
			||||||
@ -362,7 +361,7 @@ uip_arp_arpin(void)
 | 
				
			|||||||
void
 | 
					void
 | 
				
			||||||
uip_arp_out(void)
 | 
					uip_arp_out(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  struct arp_entry *tabptr;
 | 
					  struct arp_entry *tabptr = NULL;
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  /* Find the destination IP address in the ARP table and construct
 | 
					  /* Find the destination IP address in the ARP table and construct
 | 
				
			||||||
     the Ethernet header. If the destination IP addres isn't on the
 | 
					     the Ethernet header. If the destination IP addres isn't on the
 | 
				
			||||||
 | 
				
			|||||||
@ -12,9 +12,6 @@
 | 
				
			|||||||
 * should be tweaked to match each specific project. The uIP
 | 
					 * should be tweaked to match each specific project. The uIP
 | 
				
			||||||
 * distribution contains a documented example "uipopt.h" that can be
 | 
					 * distribution contains a documented example "uipopt.h" that can be
 | 
				
			||||||
 * copied and modified for each project.
 | 
					 * copied and modified for each project.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * \note Contiki does not use the uipopt.h file to configure uIP, but
 | 
					 | 
				
			||||||
 * uses a per-port uip-conf.h file that should be edited instead.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@ -667,7 +664,7 @@ typedef uint32_t uip_stats_t;
 | 
				
			|||||||
 * response to TCP/IP events.
 | 
					 * response to TCP/IP events.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
	#define UIP_APPCALL     WebserverApp_Callback
 | 
					#define UIP_APPCALL     HTTPServerApp_Callback
 | 
				
			||||||
void UIP_APPCALL(void);
 | 
					void UIP_APPCALL(void);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user