Some minor changes and add double-IP config for

[10_m1284p_WIZNET_HTTPServer_RAM_pages]
This commit is contained in:
maxxir
2019-01-20 23:11:57 +04:00
parent 10f0d1e7de
commit f543fe92ee
2 changed files with 17 additions and 11 deletions

View File

@@ -63,11 +63,22 @@
*
*/
#define PRINTF_EN 1
#if PRINTF_EN
#define PRINTF(FORMAT,args...) printf_P(PSTR(FORMAT),##args)
#ifdef IP_WORK
//NIC metrics for WORK PC
wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address
.ip = {192, 168, 0, 199}, // IP address
.sn = {255, 255, 255, 0}, // Subnet mask
.dns = {8,8,8,8}, // DNS address (google dns)
.gw = {192, 168, 0, 1}, // Gateway address
.dhcp = NETINFO_STATIC}; //Dynamic IP configuration from a DHCP sever
#else
#define PRINTF(...)
//NIC metrics for another PC (second IP configuration)
wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address
.ip = {192, 168, 1, 199}, // IP address
.sn = {255, 255, 255, 0}, // Subnet mask
.dns = {8,8,8,8}, // DNS address (google dns)
.gw = {192, 168, 1, 1}, // Gateway address
.dhcp = NETINFO_STATIC}; //Dynamic IP configuration from a DHCP sever
#endif
//*********Program metrics
@@ -248,13 +259,6 @@ unsigned char ethBuf1[ETH_MAX_BUF_SIZE];
unsigned char ethBuf2_WEBSRV[WEBSRV_DATA_BUF_SIZE];
*/
wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address
.ip = {192, 168, 0, 199}, // IP address
.sn = {255, 255, 255, 0}, // Subnet mask
.dns = {8,8,8,8}, // DNS address (google dns)
.gw = {192, 168, 0, 1}, // Gateway address
.dhcp = NETINFO_STATIC}; //Dynamic IP configruation from a DHCP sever
void cs_sel() {
SPI_WIZNET_ENABLE();
}