User manual
511
mikoPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
SPI_Ethernet_24j600_getGwIpAddress
SPI_Ethernet_24j600_getDnsIpAddress
Prototype
function SPI_Ethernet_24j600_getGwIpAddress() : word;
Description This routine should be used when DHCP server is present on the network to fetch assigned gateway 
IP address.
Parameters None.
Returns Pointer to the global variable holding gateway IP address.
Requires Ethernet module has to be initialized. See SPI_Ethernet_24j600_Init.
Example
var 
 gwIpAddr : array[4] of byte; // user gateway IP address buffer
 ... 
    memcpy(gwIpAddr,  SPI_Ethernet_24j600_getGwIpAddress(),  4);  //  fetch 
gateway IP address 
Notes User should always copy the IP address from the RAM location returned by this routine into it’s own 
gateway IP address buffer. These locations should not be altered by the user in any case!
Prototype
function SPI_Ethernet_24j600_getDnsIpAddress() : word;
Description This routine should be used when DHCP server is present on the network to fetch assigned DNS IP 
address.
Parameters None.
Returns Pointer to the global variable holding DNS IP address.
Requires Ethernet module has to be initialized. See SPI_Ethernet_24j600_Init.
Example
var 
 dnsIpAddr : array[4] of byte; // user DNS IP address buffer
 ... 
  memcpy(dnsIpAddr, SPI_Ethernet_24j600_getDnsIpAddress(), 4); // fetch DNS 
server address 
Notes User should always copy the IP address from the RAM location returned by this routine into it’s own 
DNS IP address buffer. These locations should not be altered by the user in any case!
SPI_Ethernet_24j600_getIpAddress
Prototype
function SPI_Ethernet_24j600_getIpAddress() : word;
Description This  routine  should  be  used  when  DHCP  server  is  present  on  the  network  to  fetch  assigned  IP 
address.
Parameters None.
Returns Pointer to the global variable holding IP address.
Requires Ethernet module has to be initialized. See SPI_Ethernet_24j600_Init.
Example
var 
 ipAddr : array[4] of byte; // user IP address buffer
 ... 
 memcpy(ipAddr, SPI_Ethernet_24j600_getIpAddress(), 4); // fetch IP address
Notes User should always copy the IP address from the RAM location returned by this routine into it’s own IP 
address buffer. These locations should not be altered by the user in any case!










