User manual
476
mikoBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
The following variables must be dened in all
projects using SPI Ethernet Library:
Description: Example:
dim SPI_Ethernet_CS as sbit sfr
external
ENC28J60 chip select pin.
dim SPI_Ethernet_CS as sbit at
RC1_bit
dim SPI_Ethernet_RST as sbit sfr
external
ENC28J60 reset pin.
dim SPI_Ethernet_RST as sbit at
RC0_bit
dim SPI_Ethernet_CS_Direction as
sbit sfr external
Direction of the ENC28J60 chip
select pin.
dim SPI_Ethernet_CS_Direction as
sbit at TRISC1_bit
dim SPI_Ethernet_RST_Direction as
sbit sfr external
Direction of the ENC28J60
reset pin.
dim SPI_Ethernet_RST_Direction as
sbit at TRISC0_bit
The following routines must be dened in all
project using SPI Ethernet Library:
Description: Examples:
sub function SPI_Ethernet_UserTCP
(dim byref remoteHost as byte[4],
dim remotePort as word,
dim localPort as word,
dim reqLength as word,
dim byref ags as TEthPktFlags) as
word
TCP request handler.
Refer to the library example
at the bottom of this page for
code implementation.
sub function SPI_Ethernet_UserUDP(dim
byref remoteHost as byte[4],
dim remotePort as word,
dim destPort as word,
dim reqLength as word,
dim byref ags as TEthPktFlags) as
word
UDP request handler.
Refer to the library example
at the bottom of this page
for code implementation.
External dependencies of SPI Ethernet Library
Library Routines
- SPI_Ethernet_Init
- SPI_Ethernet_Enable
- SPI_Ethernet_Disable
- SPI_Ethernet_doPacket
- SPI_Ethernet_putByte
- SPI_Ethernet_putBytes
- SPI_Ethernet_putString
- SPI_Ethernet_putConstString
- SPI_Ethernet_putConstBytes
- SPI_Ethernet_getByte
- SPI_Ethernet_getBytes
- SPI_Ethernet_UserTCP
- SPI_Ethernet_UserUDP
- SPI_Ethernet_setUserHandlers
- SPI_Ethernet_getIpAddress
- SPI_Ethernet_getGwIpAddress
- SPI_Ethernet_getDnsIpAddress
- SPI_Ethernet_getIpMask
- SPI_Ethernet_confNetwork
- SPI_Ethernet_arpResolve
- SPI_Ethernet_sendUDP