ioLibrary for Cortex M series
Macros | Functions | Variables
socket.c File Reference

Socket Driver Source File - For w5500. More...

#include "common/common.h"
Include dependency graph for socket.c:

Go to the source code of this file.

Macros

#define TIMEOUT_CLOSE_WAIT   200
 
#define TIMEOUT_CLOSE_WAIT   200
 

Functions

uint8_t incr_windowfull_retry_cnt (uint8_t s)
 
void init_windowfull_retry_cnt (uint8_t s)
 
int8_t TCPServerOpen (uint8_t s, uint16_t port)
 
int8_t TCPClientOpen (uint8_t s, uint16_t sport, uint8_t *dip, uint16_t dport)
 
int8_t TCPCltOpenNB (uint8_t s, uint16_t sport, uint8_t *dip, uint16_t dport)
 
int8_t TCPConnChk (uint8_t s)
 
int8_t TCPDisconnect (uint8_t s)
 
int8_t TCPClose (uint8_t s)
 
int8_t TCPCloseNB (uint8_t s)
 
int8_t TCPCloseCHK (uint8_t s)
 
int8_t TCPClsRcvCHK (uint8_t s)
 
int32_t TCPSend (uint8_t s, const int8_t *buf, uint16_t len)
 
int8_t TCPSendNB (uint8_t s, const int8_t *buf, uint16_t len)
 
int32_t TCPReSend (uint8_t s)
 
int8_t TCPReSendNB (uint8_t s)
 
int32_t TCPSendCHK (uint8_t s)
 
int32_t TCPRecv (uint8_t s, int8_t *buf, uint16_t len)
 
int8_t UDPOpen (uint8_t s, uint16_t port)
 
int8_t UDPClose (uint8_t s)
 
int32_t UDPSend (uint8_t s, const int8_t *buf, uint16_t len, uint8_t *addr, uint16_t port)
 
int32_t UDPSendNB (uint8_t s, const int8_t *buf, uint16_t len, uint8_t *addr, uint16_t port)
 
int8_t UDPSendCHK (uint8_t s)
 
int32_t UDPRecv (uint8_t s, int8_t *buf, uint16_t len, uint8_t *addr, uint16_t *port)
 

Variables

uint8_t windowfull_retry_cnt [8]
 

Detailed Description

Socket Driver Source File - For w5500.

Version
1.1
Date
2013/02/27
Revision
2013/02/27 - 1.0 Release 2013/07/09 - 1.1 Network control part was devided
Author
EunKyoung

Copyright (C) 2013 WIZnet. All rights reserved.

Definition in file socket.c.

Macro Definition Documentation

#define TIMEOUT_CLOSE_WAIT   200
#define TIMEOUT_CLOSE_WAIT   200

Function Documentation

uint8_t incr_windowfull_retry_cnt ( uint8_t  s)

Definition at line 598 of file socket.c.

References windowfull_retry_cnt.

Referenced by TCPReSendNB().

void init_windowfull_retry_cnt ( uint8_t  s)

Definition at line 603 of file socket.c.

References windowfull_retry_cnt.

Referenced by TCPSendNB().

int8_t TCPServerOpen ( uint8_t  s,
uint16_t  port 
)
int8_t TCPClientOpen ( uint8_t  s,
uint16_t  sport,
uint8_t *  dip,
uint16_t  dport 
)

Definition at line 54 of file socket.c.

References DBG, RET_OK, SOCKERR_BUSY, TCPCltOpenNB(), and TCPConnChk().

Referenced by loopback_tcpc().

int8_t TCPCltOpenNB ( uint8_t  s,
uint16_t  sport,
uint8_t *  dip,
uint16_t  dport 
)
int8_t TCPConnChk ( uint8_t  s)
int8_t TCPDisconnect ( uint8_t  s)

Definition at line 149 of file socket.c.

References _WIZCHIP_SOCK_NUM_, DBG, ERR, ERRA, getSn_CR(), RET_NOK, RET_OK, setSn_CR(), Sn_CR_DISCON, and SOCKERR_NOT_TCP.

int8_t TCPClose ( uint8_t  s)
int8_t TCPCloseNB ( uint8_t  s)
int8_t TCPCloseCHK ( uint8_t  s)
int8_t TCPClsRcvCHK ( uint8_t  s)
int32_t TCPSend ( uint8_t  s,
const int8_t *  buf,
uint16_t  len 
)

Definition at line 239 of file socket.c.

References RET_OK, SOCKERR_BUSY, TCPSendCHK(), and TCPSendNB().

Referenced by loopback_tcpc(), and loopback_tcps().

int8_t TCPSendNB ( uint8_t  s,
const int8_t *  buf,
uint16_t  len 
)
int32_t TCPReSend ( uint8_t  s)

Definition at line 289 of file socket.c.

References RET_OK, SOCKERR_BUSY, TCPReSendNB(), and TCPSendCHK().

Referenced by loopback_tcpc(), and loopback_tcps().

int8_t TCPReSendNB ( uint8_t  s)
int32_t TCPSendCHK ( uint8_t  s)
int32_t TCPRecv ( uint8_t  s,
int8_t *  buf,
uint16_t  len 
)
int8_t UDPOpen ( uint8_t  s,
uint16_t  port 
)
int8_t UDPClose ( uint8_t  s)
int32_t UDPSend ( uint8_t  s,
const int8_t *  buf,
uint16_t  len,
uint8_t *  addr,
uint16_t  port 
)

Definition at line 424 of file socket.c.

References RET_OK, SOCKERR_BUSY, UDPSendCHK(), and UDPSendNB().

Referenced by loopback_udp().

int32_t UDPSendNB ( uint8_t  s,
const int8_t *  buf,
uint16_t  len,
uint8_t *  addr,
uint16_t  port 
)
int8_t UDPSendCHK ( uint8_t  s)

Definition at line 491 of file socket.c.

References DBG, getSn_IR(), RET_OK, setSn_IR(), Sn_IR_SENDOK, Sn_IR_TIMEOUT, SOCKERR_BUSY, and SOCKERR_TIME_OUT.

Referenced by sockwatch_run(), and UDPSend().

int32_t UDPRecv ( uint8_t  s,
int8_t *  buf,
uint16_t  len,
uint8_t *  addr,
uint16_t *  port 
)

Variable Documentation

uint8_t windowfull_retry_cnt[8]

Definition at line 20 of file socket.c.

Referenced by incr_windowfull_retry_cnt(), and init_windowfull_retry_cnt().