Add double-IP config for [07_m1284p_WIZNET_telnets_basic]
This commit is contained in:
@@ -21,6 +21,8 @@
|
|||||||
#define PRINTF(...)
|
#define PRINTF(...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//#define IP_WORK
|
||||||
|
|
||||||
extern unsigned long millis(void);
|
extern unsigned long millis(void);
|
||||||
extern int freeRam (void);
|
extern int freeRam (void);
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,23 @@
|
|||||||
#include "Application/loopback/loopback.h"
|
#include "Application/loopback/loopback.h"
|
||||||
#include "Application/telnet/telnet.h"
|
#include "Application/telnet/telnet.h"
|
||||||
|
|
||||||
|
#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
|
||||||
|
//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
|
||||||
//#include <stdlib.h> // itoa etc..
|
//#include <stdlib.h> // itoa etc..
|
||||||
/*
|
/*
|
||||||
* (7)Add Telnet simple server (23) - unblocking type via telnet_srv(..) (v2.0)
|
* (7)Add Telnet simple server (23) - unblocking type via telnet_srv(..) (v2.0)
|
||||||
@@ -206,13 +223,6 @@ unsigned char ethBuf1[ETH_MAX_BUF_SIZE];
|
|||||||
unsigned char ethBut3_TELNET[TELNET_BUF_SIZE];
|
unsigned char ethBut3_TELNET[TELNET_BUF_SIZE];
|
||||||
unsigned char ethBut4_TELNET[TELNET_BUF_SIZE];
|
unsigned char ethBut4_TELNET[TELNET_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() {
|
void cs_sel() {
|
||||||
SPI_WIZNET_ENABLE();
|
SPI_WIZNET_ENABLE();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user