/* | |
* FreeRTOS Kernel V10.0.1 | |
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy of | |
* this software and associated documentation files (the "Software"), to deal in | |
* the Software without restriction, including without limitation the rights to | |
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
* the Software, and to permit persons to whom the Software is furnished to do so, | |
* subject to the following conditions: | |
* | |
* The above copyright notice and this permission notice shall be included in all | |
* copies or substantial portions of the Software. | |
* | |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | |
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | |
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | |
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | |
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
* | |
* http://www.FreeRTOS.org | |
* http://aws.amazon.com/freertos | |
* | |
* 1 tab == 4 spaces! | |
*/ | |
#ifndef BASIC_WEB_SERVER_H | |
#define BASIC_WEB_SERVER_H | |
#include <91x_type.h> | |
/*------------------------------------------------------------------------------*/ | |
/* MACROS */ | |
/*------------------------------------------------------------------------------*/ | |
#define basicwebWEBSERVER_PRIORITY ( tskIDLE_PRIORITY + 2 ) | |
/* The port on which we listen. */ | |
#define webHTTP_PORT ( 80 ) | |
/* Delay on close error. */ | |
#define webSHORT_DELAY ( 10 / portTICK_PERIOD_MS ) | |
/* The IP address being used. */ | |
#define emacIPADDR0 172 | |
#define emacIPADDR1 25 | |
#define emacIPADDR2 218 | |
#define emacIPADDR3 17 | |
/* The gateway address being used. */ | |
#define emacGATEWAY_ADDR0 10 | |
#define emacGATEWAY_ADDR1 52 | |
#define emacGATEWAY_ADDR2 156 | |
#define emacGATEWAY_ADDR3 254 | |
/* The network mask being used. */ | |
#define emacNET_MASK0 255 | |
#define emacNET_MASK1 255 | |
#define emacNET_MASK2 255 | |
#define emacNET_MASK3 0 | |
#define STATIC_IP 1 | |
#define DHCP_IP 2 | |
#define lwipBASIC_SERVER_STACK_SIZE 250 | |
/*------------------------------------------------------------------------------*/ | |
/* PROTOTYPES */ | |
/*------------------------------------------------------------------------------*/ | |
/* The function that implements the WEB server task. */ | |
void vBasicWEBServer( void *pvParameters ); | |
/* Initialisation required by lwIP. */ | |
void vlwIPInit( void ); | |
void PrintIPOnLCD(unsigned int ipAddr); | |
void ToDoAfterGettingIP(bool dhcpStaticFlag); | |
void InitializeStaticIP(void); | |
void DelayForDHCPToCome(void); | |
#endif | |