|  |  | @ -37,11 +37,22 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |  * https://www.hw-group.com/software/hercules-setup-utility
 |  |  |  |  * https://www.hw-group.com/software/hercules-setup-utility
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  */ |  |  |  |  */ | 
			
		
	
		
		
			
				
					
					|  |  |  | #define PRINTF_EN 1 |  |  |  | #ifdef IP_WORK | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | #if PRINTF_EN |  |  |  | //NIC metrics for WORK PC
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | #define PRINTF(FORMAT,args...) printf_P(PSTR(FORMAT),##args) |  |  |  | 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 |  |  |  | #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 |  |  |  | #endif | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | /*
 |  |  |  | /*
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -219,13 +230,6 @@ unsigned char ethBuf0[ETH_MAX_BUF_SIZE]; | 
			
		
	
		
		
			
				
					
					|  |  |  | unsigned char ethBuf1[ETH_MAX_BUF_SIZE]; |  |  |  | unsigned char ethBuf1[ETH_MAX_BUF_SIZE]; | 
			
		
	
		
		
			
				
					
					|  |  |  | unsigned char ethBuf2_WEBSRV[WEBSRV_DATA_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() { |  |  |  | void cs_sel() { | 
			
		
	
		
		
			
				
					
					|  |  |  | 	SPI_WIZNET_ENABLE(); |  |  |  | 	SPI_WIZNET_ENABLE(); | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
	
		
		
			
				
					|  |  | @ -386,8 +390,12 @@ static void avr_init(void) | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 *  or |  |  |  | 	 *  or | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 *  uart1_BAUD_SELECT_DOUBLE_SPEED() ( double speed mode) |  |  |  | 	 *  uart1_BAUD_SELECT_DOUBLE_SPEED() ( double speed mode) | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 */ |  |  |  | 	 */ | 
			
		
	
		
		
			
				
					
					|  |  |  | 	// Define Output/Input Stream
 |  |  |  | #if	(UART_BAUD_RATE == 115200) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	uart_init( UART_BAUD_SELECT_DOUBLE_SPEED(UART_BAUD_RATE,F_CPU) ); // To works without error on 115200 bps/F_CPU=16Mhz
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | #else | 
			
		
	
		
		
			
				
					
					|  |  |  | 	uart_init( UART_BAUD_SELECT(UART_BAUD_RATE,F_CPU) ); |  |  |  | 	uart_init( UART_BAUD_SELECT(UART_BAUD_RATE,F_CPU) ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | #endif | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	// Define Output/Input Stream
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	stdout = &uart0_stdout; |  |  |  | 	stdout = &uart0_stdout; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	//ADC init
 |  |  |  | 	//ADC init
 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |