I have started working with Wiznet w5500 and read datasheet and posts. In ioLibrary -> wizchip_conf.c -> wizchip_init(), there is no matching condition for w5500. Is there no need or else conditions will be for w5500. I am attaching the file below. Please help me.
Thank you in advance.
int8_t wizchip_init(uint8_t* txsize, uint8_t* rxsize)
{
int8_t i;
#if WIZCHIP < W5200
int8_t j;
#endif
int8_t tmp = 0;
wizchip_sw_reset();
if(txsize)
{
tmp = 0;
//M20150601 : For integrating with W5300
#if WIZCHIP == W5300
for(i = 0 ; i < WIZCHIP_SOCK_NUM; i++)
{
if(txsize[i] >= 64) return -1; //No use 64KB even if W5300 support max 64KB memory allocation
tmp += txsize[i];
if(tmp > 128) return -1;
}
if(tmp % 8) return -1;
#else
for(i = 0 ; i < WIZCHIP_SOCK_NUM; i++)
{
tmp += txsize[i];
#if _WIZCHIP_ < W5200 //2016.10.28 peter add condition for w5100 and w5100s
if(tmp > 8) return -1;
#else
if(tmp > 16) return -1;
#endif
}
for(i = 0 ; i < _WIZCHIP_SOCK_NUM_; i++)
{
#if _WIZCHIP_ < W5200 //2016.10.28 peter add condition for w5100
j = 0;
while((txsize[i] >> j != 1)&&(txsize[i] !=0)){j++;}
setSn_TXBUF_SIZE(i, j);
#else
setSn_TXBUF_SIZE(i, txsize[i]);
#endif
}
#endif
}
if(rxsize)
{
tmp = 0;
#if WIZCHIP == W5300
for(i = 0 ; i < WIZCHIP_SOCK_NUM; i++)
{
if(rxsize[i] >= 64) return -1; //No use 64KB even if W5300 support max 64KB memory allocation
tmp += rxsize[i];
if(tmp > 128) return -1;
}
if(tmp % 8) return -1;
#else
for(i = 0 ; i < WIZCHIP_SOCK_NUM; i++)
{
tmp += rxsize[i];
#if WIZCHIP < W5200 //2016.10.28 peter add condition for w5100 and w5100s
if(tmp > 8) return -1;
#else
if(tmp > 16) return -1;
#endif
}
for(i = 0 ; i < _WIZCHIP_SOCK_NUM_; i++)
{
#if _WIZCHIP_ < W5200 // add condition for w5100
j = 0;
while((rxsize[i] >> j != 1)&&(txsize[i] !=0)){j++;}
setSn_RXBUF_SIZE(i, j);
#else
setSn_RXBUF_SIZE(i, rxsize[i]);
#endif
}
#endif
}
return 0;
}