Mikroelektronika MIKROE-742 데이터 시트

다운로드
페이지 532
External dependencies of SPI Ethernet Library
381
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
The following variables
must be defined in all
projects using SPI Eth-
ernet Library:
Description: 
Example : 
var SPI_Ethernet_CS :
sbit; sfr; external;
ENC28J60 chip select pin.
var SPI_Ethernet_CS :
sbit at PORTB.B4;
var SPI_Ethernet_RST :
sbit; sfr; external;
ENC28J60 reset pin.
var SPI_Ethernet_RST
sbit at PORTB.B5;
var
SPI_Ethernet_CS_Direc
tion : 
sbit; sfr;
external;
Direction of the ENC28J60
chip select pin.
var
SPI_Ethernet_CS_Direc
tion : 
sbit at
DDRB.B4;
var
SPI_Ethernet_RST_Dire
ction : 
sbit; sfr;
external;
Direction of the ENC28J60
reset pin.
var
SPI_Ethernet_RST_Dire
ction : 
sbit at
DDRB.B5;
The following routines must
be defined in all project
using SPI Ethernet Library:
Description: 
Examples : 
function
Spi_Ethernet_UserTCP(remo
teHost : ^byte,
remotePort : word,
localPort : word,
reqLength : word): word;
TCP request handler.
Refer to the library exam-
ple at the bottom of this
page for code implemen-
tation.
function
Spi_Ethernet_UserUDP(remo
teHost : ^byte,
remotePort : word,
destPort : word,
reqLength : word): word;
UDP request handler.
Refer to the library exam-
ple at the bottom of this
page for code implemen-
tation.