User manual
414
mikoBasic PRO for PIC32
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