Skip to content

Commit

Permalink
Added in order to remove some unused functions
Browse files Browse the repository at this point in the history
Modified the flag of socket when socket function use(Non Block)
  • Loading branch information
irina committed Dec 13, 2019
1 parent 9afec00 commit 8ceae25
Show file tree
Hide file tree
Showing 17 changed files with 8,632 additions and 8,453 deletions.
5 changes: 3 additions & 2 deletions Projects/S2E_App/W7500x_S2E.uvproj
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<MiscControls>--feedback=unused.txt</MiscControls>
<Define>CORTEX_M0 USE_STDPERIPH_DRIVER</Define>
<Undefine></Undefine>
<IncludePath>..\..\Libraries\CMSIS\Device\WIZnet\W7500\Include;..\..\Libraries\W7500x_stdPeriph_Driver\inc;..\..\Libraries\CMSIS\Include;..\..\Libraries\CMSIS\Device\WIZnet\W7500\Source\ARM;.\src;..\..\ioLibrary\Ethernet;..\..\ioLibrary\Internet\DHCP;..\..\ioLibrary\Internet\DNS;..\..\ioLibrary\MDIO;..\..\ioLibrary\Application\loopback;.\src\Configuration;.\src\PlatformHandler;.\src\Serial_to_Ethernet;.\src\Callback</IncludePath>
Expand Down Expand Up @@ -410,7 +410,8 @@
<ScatterFile>.\obj\W7500x_S2E_App.sct</ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc></Misc>
<Misc>--feedback=unused.txt
--feedback_type=unused,iw</Misc>
<LinkerInputFile></LinkerInputFile>
<DisabledWarnings></DisabledWarnings>
</LDads>
Expand Down
Binary file modified Projects/S2E_App/bin/W7500x_S2E_App.bin
Binary file not shown.
5,055 changes: 2,432 additions & 2,623 deletions Projects/S2E_App/bin/W7500x_S2E_App.hex

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Projects/S2E_App/src/Configuration/segcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ uint16_t proc_SEGCP_udp(uint8_t* segcp_req, uint8_t* segcp_rep)
}
break;
case SOCK_CLOSED:
if(socket(SEGCP_UDP_SOCK, Sn_MR_UDP, DEVICE_SEGCP_PORT, 0x00) == SEGCP_UDP_SOCK)
if(socket(SEGCP_UDP_SOCK, Sn_MR_UDP, DEVICE_SEGCP_PORT, SOCK_IO_NONBLOCK) == SEGCP_UDP_SOCK) //191213 irina add SOCK_IO_NONBLOCK
{
if(dev_config->serial_info[0].serial_debug_en) printf(" > SEGCP:UDP:STARTED\r\n");
}
Expand Down Expand Up @@ -1347,7 +1347,7 @@ uint16_t proc_SEGCP_tcp(uint8_t* segcp_req, uint8_t* segcp_rep)
case SOCK_FIN_WAIT:
close(SEGCP_TCP_SOCK);

if(socket(SEGCP_TCP_SOCK, Sn_MR_TCP, DEVICE_SEGCP_PORT, SF_TCP_NODELAY) == SEGCP_TCP_SOCK)
if(socket(SEGCP_TCP_SOCK, Sn_MR_TCP, DEVICE_SEGCP_PORT, SF_TCP_NODELAY|SOCK_IO_NONBLOCK) == SEGCP_TCP_SOCK)
{
//if(dev_config->serial_info[0].serial_debug_en) printf(" > SEGCP:TCP:STARTED\r\n");

Expand Down
4 changes: 2 additions & 2 deletions Projects/S2E_App/src/PlatformHandler/deviceHandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ uint16_t get_firmware_from_network(uint8_t sock, uint8_t * buf)

case SOCK_FIN_WAIT:
case SOCK_CLOSED:
if(socket(sock, Sn_MR_TCP, DEVICE_FWUP_PORT, SF_TCP_NODELAY) == sock)
if(socket(sock, Sn_MR_TCP, DEVICE_FWUP_PORT, SF_TCP_NODELAY|SOCK_IO_NONBLOCK) == sock)
{
recv_fwsize = 0;
listen(sock);
Expand Down Expand Up @@ -622,7 +622,7 @@ uint16_t get_firmware_from_server(uint8_t sock, uint8_t * server_ip, uint8_t * b
case SOCK_FIN_WAIT:
case SOCK_CLOSED:
src_port = get_any_port();
if(socket(sock, Sn_MR_TCP, src_port, SF_TCP_NODELAY) == sock)
if(socket(sock, Sn_MR_TCP, src_port, SF_TCP_NODELAY|SOCK_IO_NONBLOCK) == sock)
{
recv_fwsize = 0;
#ifdef _FWUP_DEBUG_
Expand Down
6 changes: 3 additions & 3 deletions Projects/S2E_App/src/Serial_to_Ethernet/seg.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ void proc_SEG_udp(uint8_t sock)
setSn_DHAR(sock, multicast_mac);
flag|=SF_MULTI_ENABLE;
}

flag|=SOCK_IO_NONBLOCK;
if(socket(sock, Sn_MR_UDP, net->local_port, flag) == sock)
{
set_device_status(ST_UDP);
Expand Down Expand Up @@ -573,7 +573,7 @@ void proc_SEG_tcp_server(uint8_t sock)
u2e_size = 0;
e2u_size = 0;

if(socket(sock, Sn_MR_TCP, net->local_port, SF_TCP_NODELAY) == sock)
if(socket(sock, Sn_MR_TCP, net->local_port, SF_TCP_NODELAY|SOCK_IO_NONBLOCK) == sock)
{
// Replace the command mode switch code GAP time (default: 500ms)
if(net->packing_time) modeswitch_gap_time = net->packing_time;
Expand Down Expand Up @@ -819,7 +819,7 @@ void proc_SEG_tcp_mixed(uint8_t sock)
#ifdef _SEG_DEBUG_
printf(" > TCP CLIENT: any_port = %d\r\n", source_port);
#endif
if(socket(sock, Sn_MR_TCP, source_port, SF_TCP_NODELAY) == sock)
if(socket(sock, Sn_MR_TCP, source_port, SF_TCP_NODELAY|SOCK_IO_NONBLOCK) == sock)
{
// Replace the command mode switch code GAP time (default: 500ms)
if(net->packing_time) modeswitch_gap_time = net->packing_time;
Expand Down
4 changes: 2 additions & 2 deletions Projects/S2E_App/src/W7500x_board.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ void W7500x_Board_Init(void)
// STATUS #3 : Blink
LED_Init(LED1);
LED_Init(LED2);
#if (DEVICE_BOARD_NAME == WIZ750SR_1xx)
//#if (DEVICE_BOARD_NAME == WIZ750SR_1xx)
LED_Init(LED3);
#endif
//#endif
}

void Supervisory_IC_Init(void)
Expand Down
11 changes: 3 additions & 8 deletions Projects/S2E_App/src/W7500x_board.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
/* Target Board Selector */
//#define DEVICE_BOARD_NAME WIZwiki_W7500ECO
//#define DEVICE_BOARD_NAME W7500P_S2E
#define DEVICE_BOARD_NAME WIZ750SR
//#define DEVICE_BOARD_NAME WIZ750SR_1xx
//#define DEVICE_BOARD_NAME_SUB WIZ750SR_110 //IF you use the WIWIZ750SR_110, this option activate.
//#define DEVICE_BOARD_NAME WIZ750SR
#define DEVICE_BOARD_NAME WIZ750SR_1xx
//#define DEVICE_BOARD_NAME W7500_S2E

#ifdef DEVICE_BOARD_NAME
Expand Down Expand Up @@ -151,11 +150,7 @@

// HW_TRIG - Command mode switch enable pin
// Direction: Input (Shared pin with TCP connection status pin)
#if (DEVICE_BOARD_NAME_SUB == WIZ750SR_110)
#define HW_TRIG_PIN GPIO_Pin_9
#else
#define HW_TRIG_PIN GPIO_Pin_7
#endif
#define HW_TRIG_PIN GPIO_Pin_9
#define HW_TRIG_PORT GPIOA
#define HW_TRIG_PAD_AF PAD_AF1

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 2
#define MAINTENANCE_VER 8
#define MAINTENANCE_VER 9

//#define STR_VERSION_STATUS //"Final"//"Develop" // or "Stable"
#define STR_VERSION_STATUS "Stable"
Expand Down
Loading

0 comments on commit 8ceae25

Please sign in to comment.