Mikroelektronika MIKROE-442 데이터 시트
![Mikroelektronika](https://files.manualsbrain.com/attachments/e0529b3b58069a916ad7bb89f7e9f5f0eda73421/common/fit/150/50/1b07b99aa3112e022a916b06db07f1f4f211e91d41878452d87c7638b1bf/brand_logo.gif)
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 -
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.