Mikroelektronika MIKROE-724 データシート
mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
487
SPI_Ethernet_getIpMask
Prototype
sub function SPI_Ethernet_getIpMask() as word
Description This routine should be used when DHCP server is present on the network to fetch assigned IP subnet
mask.
Parameters None.
Returns
Returns
Pointer to the global variable holding IP subnet mask.
Requires
Ethernet module has to be initialized. See SPI_Ethernet_Init.
Available for PIC18 family MCUs only.
Example
dim
IpMask as byte[4] ‘ user IP subnet mask buffer
...
memcpy(IpMask, SPI_Ethernet_getIpMask(), 4) ‘ fetch IP subnet mask
Notes
User should always copy the IP address from the RAM location returned by this routine into it’s own IP
subnet mask buffer. These locations should not be altered by the user in any case!
SPI_Ethernet_getDnsIpAddress
Prototype
sub function SPI_Ethernet_getDnsIpAddress() as word
Description This routine should be used when DHCP server is present on the network to fetch assigned DNS IP
address.
Parameters None.
Returns
Returns
Pointer to the global variable holding DNS IP address.
Requires
Ethernet module has to be initialized. See SPI_Ethernet_Init.
Example
dim
dnsIpAddr as byte[4] ‘ user DNS IP address buffer
...
memcpy(dnsIpAddr, SPI_Ethernet_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!