User manual
mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
517
SPI_Ethernet_24j600_renewDHCP
Prototype
sub function SPI_Ethernet_24j600_renewDHCP(dim tmax as byte) as byte
Description This is DHCP module routine. It sends IP address lease time renewal request to DHCP server.
Parameters - tmax: time in seconds to wait for an reply.
Returns - 1 - upon success (lease time was renewed).
- 0 - otherwise (renewal request timed out).
Requires Ethernet module has to be initialized. See SPI_Ethernet_24j600_Init.
Example
while true
...
if(SPI_Ethernet_24j600_doDHCPLeaseTime() <> 0) then
SPI_Ethernet_24j600_renewDHCP(5) ‘ it’s time to renew the IP address
lease, with 5 secs for a reply
end if
...
wend
Notes None.