Datasheet
External dependencies of SPI Ethernet Library
432
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
The following variables
must be defined in all
projects using SPI Eth-
ernet Library:
Description: Example :
extern sfr sbit
SPI_Ethernet_CS;
ENC28J60 chip select pin.
sbit SPI_Ethernet_CS
at PORTB.B4;
extern sfr sbit
SPI_Ethernet_RST;
ENC28J60 reset pin.
sbit SPI_Ethernet_RST
at PORTB.B5;
extern sfr sbit
SPI_Ethernet_CS_Direc
tion;
Direction of the ENC28J60
chip select pin.
sbit
SPI_Ethernet_CS_Direc
tion at DDRB.B4;
extern sfr sbit
SPI_Ethernet_RST_Dire
ction;
Direction of the ENC28J60
reset pin.
sbit
SPI_Ethernet_RST_Dire
ction at DDRB.B5;
The following routines
must be defined in all
project using SPI Ether-
net Library:
Description: Example :
unsigned int
SPI_Ethernet_UserTCP(
unsigned char
*remoteHost, unsigned
int remotePort,
unsigned int
localPort, unsigned
int reqLength) ;
TCP request handler.
Refer to the library exam-
ple at the bottom of this
page for code implemen-
tation.
unsigned int
SPI_Ethernet_UserUDP(
unsigned char
*remoteHost, unsigned
int remotePort,
unsigned int
destPort, unsigned
int reqLength) ;
UDP request handler.
Refer to the library exam-
ple at the bottom of this
page for code implemen-
tation.