User manual
500
mikoC PRO for dsPIC
MikroElektronika
The following variables must be
dened in all projects using SPI
Ethernet Library:
Description : Example :
extern sfr sbit SPI_Ethernet_
CS;
ENC28J60 chip select pin.
sbit SPI_Ethernet_CS at LATF1_
bit;
extern sfr sbit SPI_Ethernet_
RST;
ENC28J60 reset pin.
sbit SPI_Ethernet_Rst at LATF0_
bit;
extern sfr sbit SPI_Ethernet_
CS_Direction;
Direction of the ENC28J60
chip select pin.
sbit SPI_Ethernet_CS_Direction
at TRISF1_bit;
extern sfr sbit SPI_Ethernet_
RST_Direction;
Direction of the ENC28J60
reset pin.
sbit SPI_Ethernet_Rst_Direction
at TRISF0_bit;
The following routines must be
dened in all project using SPI
Ethernet Library:
Description: Examples :
unsigned int SPI_Ethernet_
UserTCP(unsigned char
*remoteHost, unsigned int
remotePort, unsigned int
localPort, unsigned int
reqLength, TEthPktFlags
*ags);
TCP request handler.
Refer to the library example at the bottom of
this page for code implementation.
unsigned int SPI_Ethernet_
UserUDP(unsigned char
*remoteHost, unsigned int
remotePort, unsigned int
localPort, unsigned int
reqLength, TEthPktFlags
*ags);
UDP request handler.
Refer to the library example at the bottom of
this page for code implementation.
External dependencies of SPI Ethernet Library