I'm trying to port to sdcc a program (originally written for Keil) that should send back messages received via udp.
It's built for an atmel devboard with an at89c51rd2 and a Wiznet W3100 comm chip.
I can't understand how to properly command it with the APIs. Can somebody please tell me what does it exactly means (from the socket.h header of the API):
#define I2CHIP_BASE 0x8000 // Address of W3100A
/* Internal register set of W3100A */
#define COMMAND(i) (*((volatile u_char xdata *)(I2CHIP_BASE + i)))
/* Command variables */
#define CSYS_INIT 0x01 // To set up network information(mac address, gateway address, subnet mask, source ip)
Then, in the initialization function, I find:
COMMAND(0) = CSYS_INIT;
How does it work?