User manual
450
mikoBasic PRO for PIC32
MikroElektronika
SPI_Ethernet_24j600_setUserHandlers
Prototype
sub procedure SPI_Ethernet_24j600_setUserHandlers(dim TCPHandler as ^TSPI_
Ethernet_24j600_UserTCP, dim UDPHandler as ^TSPI_Ethernet_24j600_UserUDP)
Description Sets pointers to User TCP and UDP handler function implementations, which are automatically called
by SPI Ethernet ENC24J600 library.
Parameters - TCPHandler: TCP request handler
- UDPHandler: UDP request handler.
Returns Nothing.
Requires SPI_Ethernet_24j600_UserTCP and SPI_Ethernet_24j600_UserUDP have to be previously dened.
Example
SPI_Ethernet_24j600_setUserHandlers(@SPI_Ethernet_24j600_UserTCP, @SPI_
Ethernet_24j600_UserUDP)
Notes Since all libraries are built for SSA, SSA restrictions regarding function pointers dictate that modules
that use SPI_Ethernet_24j600_setUserHandlers must also be built for SSA.
SPI_Ethernet_24j600_getIpAddress
Prototype
sub function SPI_Ethernet_24j600_getIpAddress() as 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
dim
ipAddr as byte[4] ‘ 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!