diff --git a/14_m1284p_WIZNET_FTPC_FATFS/globals.h b/14_m1284p_WIZNET_FTPC_FATFS/globals.h index 63a7498..99b82e9 100644 --- a/14_m1284p_WIZNET_FTPC_FATFS/globals.h +++ b/14_m1284p_WIZNET_FTPC_FATFS/globals.h @@ -42,6 +42,8 @@ extern uint8_t FTP_SRV_destip[4]; #define PRINTF(...) #endif +//#define IP_WORK + extern unsigned long millis(void); extern int freeRam (void); extern char uart0_receive(void); diff --git a/14_m1284p_WIZNET_FTPC_FATFS/main.c b/14_m1284p_WIZNET_FTPC_FATFS/main.c index 46e30cd..6a24540 100644 --- a/14_m1284p_WIZNET_FTPC_FATFS/main.c +++ b/14_m1284p_WIZNET_FTPC_FATFS/main.c @@ -24,17 +24,30 @@ #define _MAIN_DEBUG_ -//NIC metrics +#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 + .dhcp = NETINFO_STATIC}; //Static IP configuration //FTP Server IP uint8_t FTP_SRV_destip[4] = {192, 168, 0, 100}; // For FTP client examples; destination network info - WORK STATION IP -//uint8_t FTP_SRV_destip[4] = {192, 168, 1, 81}; // For FTP client examples; destination network info - HOME STATION IP + +#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}; //Static IP configuration + +uint8_t FTP_SRV_destip[4] = {192, 168, 1, 81}; // For FTP client examples; destination network info - HOME STATION IP +#endif + uint8_t gFTPBUF[_MAX_SS_FTP];