@@ -87,7 +87,7 @@ static uint8_t sock_pack_info[_WIZCHIP_SOCK_NUM_] = {0,};
8787
8888
8989
90- int8_t socket (uint8_t sn , uint8_t protocol , uint16_t port , uint8_t flag )
90+ int8_t WIZCHIP_EXPORT ( socket ) (uint8_t sn , uint8_t protocol , uint16_t port , uint8_t flag )
9191{
9292CHECK_SOCKNUM ();
9393switch (protocol )
@@ -132,7 +132,7 @@ int8_t socket(uint8_t sn, uint8_t protocol, uint16_t port, uint8_t flag)
132132 break ;
133133 }
134134 }
135- close (sn );
135+ WIZCHIP_EXPORT ( close ) (sn );
136136setSn_MR (sn , (protocol | (flag & 0xF0 )));
137137if (!port )
138138{
@@ -150,7 +150,7 @@ int8_t socket(uint8_t sn, uint8_t protocol, uint16_t port, uint8_t flag)
150150 return (int8_t )sn ;
151151}
152152
153- int8_t close (uint8_t sn )
153+ int8_t WIZCHIP_EXPORT ( close ) (uint8_t sn )
154154{
155155CHECK_SOCKNUM ();
156156
@@ -166,7 +166,7 @@ int8_t close(uint8_t sn)
166166return SOCK_OK ;
167167}
168168
169- int8_t listen (uint8_t sn )
169+ int8_t WIZCHIP_EXPORT ( listen ) (uint8_t sn )
170170{
171171CHECK_SOCKNUM ();
172172 CHECK_SOCKMODE (Sn_MR_TCP );
@@ -177,15 +177,15 @@ int8_t listen(uint8_t sn)
177177 {
178178 if (getSn_CR (sn ) == SOCK_CLOSED )
179179 {
180- close (sn );
180+ WIZCHIP_EXPORT ( close ) (sn );
181181 return SOCKERR_SOCKCLOSED ;
182182 }
183183 }
184184 return SOCK_OK ;
185185}
186186
187187
188- int8_t connect (uint8_t sn , uint8_t * addr , uint16_t port )
188+ int8_t WIZCHIP_EXPORT ( connect ) (uint8_t sn , uint8_t * addr , uint16_t port )
189189{
190190 CHECK_SOCKNUM ();
191191 CHECK_SOCKMODE (Sn_MR_TCP );
@@ -236,7 +236,7 @@ int8_t connect(uint8_t sn, uint8_t * addr, uint16_t port)
236236 return SOCK_OK ;
237237}
238238
239- int8_t disconnect (uint8_t sn )
239+ int8_t WIZCHIP_EXPORT ( disconnect ) (uint8_t sn )
240240{
241241 CHECK_SOCKNUM ();
242242 CHECK_SOCKMODE (Sn_MR_TCP );
@@ -249,14 +249,14 @@ int8_t disconnect(uint8_t sn)
249249{
250250 if (getSn_IR (sn ) & Sn_IR_TIMEOUT )
251251 {
252- close (sn );
252+ WIZCHIP_EXPORT ( close ) (sn );
253253 return SOCKERR_TIMEOUT ;
254254 }
255255}
256256return SOCK_OK ;
257257}
258258
259- int32_t send (uint8_t sn , uint8_t * buf , uint16_t len )
259+ int32_t WIZCHIP_EXPORT ( send ) (uint8_t sn , uint8_t * buf , uint16_t len )
260260{
261261 uint8_t tmp = 0 ;
262262 uint16_t freesize = 0 ;
@@ -284,7 +284,7 @@ int32_t send(uint8_t sn, uint8_t * buf, uint16_t len)
284284 }
285285 else if (tmp & Sn_IR_TIMEOUT )
286286 {
287- close (sn );
287+ WIZCHIP_EXPORT ( close ) (sn );
288288 return SOCKERR_TIMEOUT ;
289289 }
290290 else return SOCK_BUSY ;
@@ -297,7 +297,7 @@ int32_t send(uint8_t sn, uint8_t * buf, uint16_t len)
297297 tmp = getSn_SR (sn );
298298 if ((tmp != SOCK_ESTABLISHED ) && (tmp != SOCK_CLOSE_WAIT ))
299299 {
300- close (sn );
300+ WIZCHIP_EXPORT ( close ) (sn );
301301 return SOCKERR_SOCKSTATUS ;
302302 }
303303 if ( (sock_io_mode & (1 <<sn )) && (len > freesize ) ) return SOCK_BUSY ;
@@ -315,7 +315,7 @@ int32_t send(uint8_t sn, uint8_t * buf, uint16_t len)
315315}
316316
317317
318- int32_t recv (uint8_t sn , uint8_t * buf , uint16_t len )
318+ int32_t WIZCHIP_EXPORT ( recv ) (uint8_t sn , uint8_t * buf , uint16_t len )
319319{
320320 uint8_t tmp = 0 ;
321321 uint16_t recvsize = 0 ;
@@ -336,13 +336,13 @@ int32_t recv(uint8_t sn, uint8_t * buf, uint16_t len)
336336 if (recvsize != 0 ) break ;
337337 else if (getSn_TX_FSR (sn ) == getSn_TxMAX (sn ))
338338 {
339- close (sn );
339+ WIZCHIP_EXPORT ( close ) (sn );
340340 return SOCKERR_SOCKSTATUS ;
341341 }
342342 }
343343 else
344344 {
345- close (sn );
345+ WIZCHIP_EXPORT ( close ) (sn );
346346 return SOCKERR_SOCKSTATUS ;
347347 }
348348 }
@@ -357,7 +357,7 @@ int32_t recv(uint8_t sn, uint8_t * buf, uint16_t len)
357357 return len ;
358358}
359359
360- int32_t sendto (uint8_t sn , uint8_t * buf , uint16_t len , uint8_t * addr , uint16_t port )
360+ int32_t WIZCHIP_EXPORT ( sendto ) (uint8_t sn , uint8_t * buf , uint16_t len , uint8_t * addr , uint16_t port )
361361{
362362 uint8_t tmp = 0 ;
363363 uint16_t freesize = 0 ;
@@ -436,7 +436,7 @@ int32_t sendto(uint8_t sn, uint8_t * buf, uint16_t len, uint8_t * addr, uint16_t
436436
437437
438438
439- int32_t recvfrom (uint8_t sn , uint8_t * buf , uint16_t len , uint8_t * addr , uint16_t * port )
439+ int32_t WIZCHIP_EXPORT ( recvfrom ) (uint8_t sn , uint8_t * buf , uint16_t len , uint8_t * addr , uint16_t * port )
440440{
441441 uint8_t mr ;
442442 uint8_t head [8 ];
@@ -506,7 +506,7 @@ int32_t recvfrom(uint8_t sn, uint8_t * buf, uint16_t len, uint8_t * addr, uint16
506506 sock_remained_size [sn ] = (sock_remained_size [sn ] <<8 ) + head [1 ];
507507 if (sock_remained_size [sn ] > 1514 )
508508 {
509- close (sn );
509+ WIZCHIP_EXPORT ( close ) (sn );
510510 return SOCKFATAL_PACKLEN ;
511511 }
512512 sock_pack_info [sn ] = PACK_FIRST ;
@@ -555,7 +555,7 @@ int32_t recvfrom(uint8_t sn, uint8_t * buf, uint16_t len, uint8_t * addr, uint16
555555}
556556
557557
558- int8_t ctlsocket (uint8_t sn , ctlsock_type cstype , void * arg )
558+ int8_t WIZCHIP_EXPORT ( ctlsocket ) (uint8_t sn , ctlsock_type cstype , void * arg )
559559{
560560 uint8_t tmp = 0 ;
561561 CHECK_SOCKNUM ();
@@ -598,7 +598,7 @@ int8_t ctlsocket(uint8_t sn, ctlsock_type cstype, void* arg)
598598 return SOCK_OK ;
599599}
600600
601- int8_t setsockopt (uint8_t sn , sockopt_type sotype , void * arg )
601+ int8_t WIZCHIP_EXPORT ( setsockopt ) (uint8_t sn , sockopt_type sotype , void * arg )
602602{
603603 // M20131220 : Remove warning
604604 //uint8_t tmp;
@@ -651,7 +651,7 @@ int8_t setsockopt(uint8_t sn, sockopt_type sotype, void* arg)
651651 return SOCK_OK ;
652652}
653653
654- int8_t getsockopt (uint8_t sn , sockopt_type sotype , void * arg )
654+ int8_t WIZCHIP_EXPORT ( getsockopt ) (uint8_t sn , sockopt_type sotype , void * arg )
655655{
656656 CHECK_SOCKNUM ();
657657 switch (sotype )
0 commit comments