Fixups for wiznet 5500 driver
This commit is contained in:
parent
38d99b11c1
commit
8670215ecc
@ -286,7 +286,7 @@ int32_t WIZCHIP_EXPORT(send)(uint8_t sn, uint8_t * buf, uint16_t len)
|
|||||||
if(tmp & Sn_IR_SENDOK)
|
if(tmp & Sn_IR_SENDOK)
|
||||||
{
|
{
|
||||||
setSn_IR(sn, Sn_IR_SENDOK);
|
setSn_IR(sn, Sn_IR_SENDOK);
|
||||||
#if _WZICHIP_ == 5200
|
#if _WIZCHIP_ == 5200
|
||||||
if(getSn_TX_RD(sn) != sock_next_rd[sn])
|
if(getSn_TX_RD(sn) != sock_next_rd[sn])
|
||||||
{
|
{
|
||||||
setSn_CR(sn,Sn_CR_SEND);
|
setSn_CR(sn,Sn_CR_SEND);
|
||||||
@ -525,6 +525,7 @@ int32_t WIZCHIP_EXPORT(recvfrom)(uint8_t sn, uint8_t * buf, uint16_t len, uint8_
|
|||||||
// read peer's IP address, port number & packet length
|
// read peer's IP address, port number & packet length
|
||||||
sock_remained_size[sn] = head[0];
|
sock_remained_size[sn] = head[0];
|
||||||
sock_remained_size[sn] = (sock_remained_size[sn] <<8) + head[1];
|
sock_remained_size[sn] = (sock_remained_size[sn] <<8) + head[1];
|
||||||
|
sock_remained_size[sn] -= 2; // len includes 2 len bytes
|
||||||
if(sock_remained_size[sn] > 1514)
|
if(sock_remained_size[sn] > 1514)
|
||||||
{
|
{
|
||||||
WIZCHIP_EXPORT(close)(sn);
|
WIZCHIP_EXPORT(close)(sn);
|
||||||
|
@ -130,7 +130,7 @@
|
|||||||
*/
|
*/
|
||||||
#define _WIZCHIP_IO_BASE_ 0x00000000 //
|
#define _WIZCHIP_IO_BASE_ 0x00000000 //
|
||||||
|
|
||||||
#if _WIZCHIP_IO_MODE_ & _WIZCHIP_IO_MODE_BUS
|
#if _WIZCHIP_IO_MODE_ & _WIZCHIP_IO_MODE_BUS_
|
||||||
#ifndef _WIZCHIP_IO_BASE_
|
#ifndef _WIZCHIP_IO_BASE_
|
||||||
#error "You should be define _WIZCHIP_IO_BASE to fit your system memory map."
|
#error "You should be define _WIZCHIP_IO_BASE to fit your system memory map."
|
||||||
#endif
|
#endif
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
//! 3. Remove the unused define
|
//! 3. Remove the unused define
|
||||||
//! 4. Integrated dns.h dns.c & dns_parse.h dns_parse.c into dns.h & dns.c
|
//! 4. Integrated dns.h dns.c & dns_parse.h dns_parse.c into dns.h & dns.c
|
||||||
//! <2013/12/20> V1.1.0
|
//! <2013/12/20> V1.1.0
|
||||||
|
//! <2018/10/04> Modified HAL_GetTick for use with CircuitPython by Nick Moore
|
||||||
//!
|
//!
|
||||||
//! \author Eric Jung & MidnightCow
|
//! \author Eric Jung & MidnightCow
|
||||||
//! \copyright
|
//! \copyright
|
||||||
@ -51,6 +52,7 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include "tick.h"
|
||||||
|
|
||||||
//#include "Ethernet/socket.h"
|
//#include "Ethernet/socket.h"
|
||||||
//#include "Internet/DNS/dns.h"
|
//#include "Internet/DNS/dns.h"
|
||||||
@ -121,7 +123,11 @@ uint8_t* pDNSMSG; // DNS message buffer
|
|||||||
uint8_t DNS_SOCKET; // SOCKET number for DNS
|
uint8_t DNS_SOCKET; // SOCKET number for DNS
|
||||||
uint16_t DNS_MSGID; // DNS message ID
|
uint16_t DNS_MSGID; // DNS message ID
|
||||||
|
|
||||||
extern uint32_t HAL_GetTick(void);
|
|
||||||
|
uint32_t HAL_GetTick(void) {
|
||||||
|
return ticks_ms;
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t hal_sys_tick;
|
uint32_t hal_sys_tick;
|
||||||
|
|
||||||
/* converts uint16_t from network buffer to a host byte order integer. */
|
/* converts uint16_t from network buffer to a host byte order integer. */
|
||||||
|
Loading…
Reference in New Issue
Block a user