Skip to content

Commit

Permalink
v1.1.1stable
Browse files Browse the repository at this point in the history
  • Loading branch information
hkjung committed Dec 14, 2017
1 parent c941231 commit ff9da21
Show file tree
Hide file tree
Showing 26 changed files with 6,020 additions and 10,224 deletions.
69 changes: 39 additions & 30 deletions Projects/S2E_App/W7500x_S2E.uvgui.Administrator

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions Projects/S2E_App/W7500x_S2E.uvopt
Original file line number Diff line number Diff line change
Expand Up @@ -624,10 +624,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<ColumnNumber>29</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>11</TopLine>
<CurrentLine>26</CurrentLine>
<TopLine>2</TopLine>
<CurrentLine>4</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>.\src\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
Expand All @@ -640,7 +640,7 @@
<FileType>1</FileType>
<tvExp>1</tvExp>
<Focus>0</Focus>
<ColumnNumber>22</ColumnNumber>
<ColumnNumber>31</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>86</TopLine>
<CurrentLine>87</CurrentLine>
Expand Down Expand Up @@ -776,10 +776,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<ColumnNumber>1</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<TopLine>93</TopLine>
<CurrentLine>107</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>.\src\PlatformHandler\timerHandler.c</PathWithFileName>
<FilenameWithoutPath>timerHandler.c</FilenameWithoutPath>
Expand Down
Binary file modified Projects/S2E_App/bin/W7500x_S2E_App.bin
Binary file not shown.
3,723 changes: 1,864 additions & 1,859 deletions Projects/S2E_App/bin/W7500x_S2E_App.hex

Large diffs are not rendered by default.

Binary file modified Projects/S2E_App/obj/W7500x_S2E_App.bin
Binary file not shown.
2,623 changes: 0 additions & 2,623 deletions Projects/S2E_App/obj/W7500x_S2E_App.hex

This file was deleted.

2 changes: 1 addition & 1 deletion Projects/S2E_App/src/Configuration/ConfigData.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void load_DevConfig_from_storage(void)
write_storage(STORAGE_CONFIG, 0, &dev_config, sizeof(DevConfig));
}

dev_config.network_info[0].state = ST_OPEN;
//dev_config.network_info[0].state = ST_OPEN;

dev_config.fw_ver[0] = MAJOR_VER;
dev_config.fw_ver[1] = MINOR_VER;
Expand Down
16 changes: 12 additions & 4 deletions Projects/S2E_App/src/Configuration/segcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ uint8_t * tbSEGCPCMD[] = {"MC", "VR", "MN", "IM", "OP", "DD", "CP", "PO", "DG",
"LG", "ER", "FW", "MA", "PW", "SV", "EX", "RT", "UN", "ST",
"FR", "EC", "K!", "UE", "GA", "GB", "GC", "GD", "CA", "CB",
"CC", "CD", "SC", "S0", "S1", "RX", "FS", "FC", "FP", "FD",
"FH", "UI", 0};

"FH", "UI", "AB", 0};
uint8_t * tbSEGCPERR[] = {"ERNULL", "ERNOTAVAIL", "ERNOPARAM", "ERIGNORED", "ERNOCOMMAND", "ERINVALIDPARAM", "ERNOPRIVILEGE"};

uint8_t gSEGCPPRIVILEGE = SEGCP_PRIVILEGE_CLR;
Expand Down Expand Up @@ -606,6 +606,13 @@ uint16_t proc_SEGCP(uint8_t* segcp_req, uint8_t* segcp_rep)
case SEGCP_UE: // User echo, not used.
sprintf(trep, "%d", 0);
break;
case SEGCP_AB: // Added command to enter AppBoot mode: AB
if(gSEGCPPRIVILEGE & (SEGCP_PRIVILEGE_SET|SEGCP_PRIVILEGE_WRITE)) {
dev_config->network_info[0].state = ST_BOOT;
ret |= SEGCP_RET_SAVE | SEGCP_RET_REBOOT;
}
else ret |= SEGCP_RET_ERR_NOPRIVILEGE;
break;
default:
ret |= SEGCP_RET_ERR_NOCOMMAND;
sprintf(trep,"%s", strDEVSTATUS[dev_config->network_info[0].state]);
Expand Down Expand Up @@ -951,7 +958,7 @@ uint16_t proc_SEGCP(uint8_t* segcp_req, uint8_t* segcp_rep)
#endif
dev_config->firmware_update.fwup_flag = SEGCP_ENABLE;
ret |= SEGCP_RET_FWUP;
sprintf(trep,"FW%d.%d.%d.%d:%d:%d\r\n", dev_config->network_info_common.local_ip[0], dev_config->network_info_common.local_ip[1]
sprintf(trep,"FW%d.%d.%d.%d:%d\r\n", dev_config->network_info_common.local_ip[0], dev_config->network_info_common.local_ip[1]
,dev_config->network_info_common.local_ip[2] , dev_config->network_info_common.local_ip[3], (uint16_t)DEVICE_FWUP_PORT);

process_socket_termination(SEG_SOCK);
Expand Down Expand Up @@ -1086,7 +1093,6 @@ uint16_t proc_SEGCP(uint8_t* segcp_req, uint8_t* segcp_rep)
break;

case SEGCP_UN:
case SEGCP_UI:
case SEGCP_ST:
case SEGCP_LG:
case SEGCP_ER:
Expand All @@ -1096,6 +1102,8 @@ uint16_t proc_SEGCP(uint8_t* segcp_req, uint8_t* segcp_rep)
case SEGCP_RT:
case SEGCP_FR:
case SEGCP_PW:
case SEGCP_UI:
case SEGCP_AB:
ret |= SEGCP_RET_ERR_NOTAVAIL;
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion Projects/S2E_App/src/Configuration/segcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ typedef enum {SEGCP_MC, SEGCP_VR, SEGCP_MN, SEGCP_IM, SEGCP_OP, SEGCP_DD, SEGCP_
SEGCP_LG, SEGCP_ER, SEGCP_FW, SEGCP_MA, SEGCP_PW, SEGCP_SV, SEGCP_EX, SEGCP_RT, SEGCP_UN, SEGCP_ST,
SEGCP_FR, SEGCP_EC, SEGCP_K1, SEGCP_UE, SEGCP_GA, SEGCP_GB, SEGCP_GC, SEGCP_GD, SEGCP_CA, SEGCP_CB,
SEGCP_CC, SEGCP_CD, SEGCP_SC, SEGCP_S0, SEGCP_S1, SEGCP_RX, SEGCP_FS, SEGCP_FC, SEGCP_FP, SEGCP_FD,
SEGCP_FH, SEGCP_UI, SEGCP_UNKNOWN=255
SEGCP_FH, SEGCP_UI, SEGCP_AB, SEGCP_UNKNOWN=255
} teSEGCPCMDNUM;

/*
Expand Down
26 changes: 26 additions & 0 deletions Projects/S2E_App/src/PlatformHandler/timerHandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ static volatile uint16_t msec_cnt = 0;
static volatile uint8_t sec_cnt = 0;
static volatile uint8_t min_cnt = 0;
static volatile uint32_t hour_cnt = 0;
static volatile uint32_t devtime_sec = 0;
static volatile uint32_t devtime_msec = 0;

static uint8_t enable_phylink_check = 1;
static volatile uint32_t phylink_down_time_msec;
Expand Down Expand Up @@ -52,6 +54,8 @@ void Timer_IRQ_Handler(void)

msec_cnt++; // millisecond counter

devtime_msec++;

seg_timer_msec(); // [msec] time counter for SEG (S2E)
segcp_timer_msec(); // [msec] time counter for SEGCP (Config)
device_timer_msec(); // [msec] time counter for DeviceHandler (fw update)
Expand All @@ -77,6 +81,8 @@ void Timer_IRQ_Handler(void)

DHCP_time_handler(); // Time counter for DHCP timeout
DNS_time_handler(); // Time counter for DNS timeout

devtime_sec++; // device time counter, Can be updated this counter value by time protocol like NTP.
}

/* Minute Process */
Expand All @@ -100,6 +106,26 @@ void Timer_IRQ_Handler(void)
}
}

uint32_t getDevtime(void)
{
return devtime_sec;
}

void setDevtime(uint32_t timeval_sec)
{
devtime_sec = timeval_sec;
}

uint32_t getNow(void)
{
return getDevtime();
}

uint32_t millis(void)
{
return devtime_msec;
}

uint32_t getDeviceUptime_hour(void)
{
return hour_cnt;
Expand Down
7 changes: 7 additions & 0 deletions Projects/S2E_App/src/PlatformHandler/timerHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
void Timer_Configuration(void);
void Timer_IRQ_Handler(void);

////////////////////////////////////////
uint32_t getNow(void);
uint32_t getDevtime(void);
void setDevtime(uint32_t timeval_sec);
uint32_t millis(void);
////////////////////////////////////////

uint32_t getDeviceUptime_hour(void);
uint8_t getDeviceUptime_min(void);
uint8_t getDeviceUptime_sec(void);
Expand Down
2 changes: 1 addition & 1 deletion Projects/S2E_App/src/W7500x_board.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static void PHY_Init(void)
//mdio_write(GPIOB, PHYREG_CONTROL, CNTL_RESET); // PHY Reset

#ifdef __W7500P__ // W7500P
set_link(FullDuplex10);
//set_link(FullDuplex10);
//set_link(HalfDuplex10);
//set_link(FullDuplex100);
//set_link(HalfDuplex100);
Expand Down
2 changes: 1 addition & 1 deletion Projects/S2E_App/src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/* Application Firmware Version */
#define MAJOR_VER 1
#define MINOR_VER 1
#define MAINTENANCE_VER 0
#define MAINTENANCE_VER 1

//#define STR_VERSION_STATUS "Develop" // or "Stable"
#define STR_VERSION_STATUS "Stable"
Expand Down
20 changes: 11 additions & 9 deletions Projects/S2E_App/src/main.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/**
******************************************************************************
* @file W7500x Serial to Ethernet Project - WIZ750SR App
* @author Eric Jung, Team Platform
* @version v1.1.0
* @date Nov-2016
* @author Eric Jung, Team Module
* @version v1.1.1
* @date Dec-2017
* @brief Main program body
******************************************************************************
* @attention
* @par Revision history
* <2017/12/13> v1.1.1 Develop by Eric Jung
* <2016/11/18> v1.1.0 Develop by Eric Jung
* <2016/03/29> v1.0.0 Develop by Eric Jung
* <2016/03/02> v0.8.0 Develop by Eric Jung
Expand Down Expand Up @@ -109,6 +110,7 @@ int main(void)

/* Load the Configuration data */
load_DevConfig_from_storage();
dev_config->network_info[0].state = ST_OPEN;

/* Set the MAC address to WIZCHIP */
Mac_Conf();
Expand Down Expand Up @@ -165,15 +167,15 @@ int main(void)
{
flag_process_dns_success = ON;
}

// Debug UART: DNS results print out
if(dev_config->serial_info[0].serial_debug_en)
{
display_Dev_Info_dns();
}
}
}

// Debug UART: DNS results print out
if(dev_config->serial_info[0].serial_debug_en)
{
display_Dev_Info_dns();
}

////////////////////////////////////////////////////////////////////////////////////////////////////
// W7500x Application: Main Routine
////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
64 changes: 32 additions & 32 deletions Projects/S2E_Boot/W7500x_S2E.uvgui.Administrator

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Projects/S2E_Boot/W7500x_S2E.uvopt
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>68</ColumnNumber>
<ColumnNumber>25</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>6</TopLine>
<CurrentLine>23</CurrentLine>
<TopLine>2</TopLine>
<CurrentLine>10</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>.\src\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
Expand Down
Binary file modified Projects/S2E_Boot/bin/W7500x_S2E_Boot.bin
Binary file not shown.
Loading

0 comments on commit ff9da21

Please sign in to comment.