Mikroelektronika MIKROE-350 Fiche De Données
External dependencies of SPI Ethernet Library
368
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
The following variables
must be defined in all
projects using SPI Eth-
ernet Library:
Description:
Example :
dim SPI_Ethernet_CS
as sbit sfr external
as sbit sfr external
ENC28J60 chip select pin.
dim SPI_Ethernet_CS
as sbit at PORTB.B4
as sbit at PORTB.B4
dim SPI_Ethernet_RST
as sbit sfr external
as sbit sfr external
ENC28J60 reset pin.
dim SPI_Ethernet_RST
as sbit at PORTB.B5
as sbit at PORTB.B5
dim
SPI_Ethernet_CS_Direc
SPI_Ethernet_CS_Direc
tion
as sbit sfr
external
Direction of the ENC28J60
chip select pin.
chip select pin.
dim
SPI_Ethernet_CS_Direc
SPI_Ethernet_CS_Direc
tion
as sbit at
DDRB.B4
dim
SPI_Ethernet_RST_Dire
SPI_Ethernet_RST_Dire
ction
as sbit sfr
external
Direction of the ENC28J60
reset pin.
reset pin.
dim
SPI_Ethernet_RST_Dire
SPI_Ethernet_RST_Dire
ction
as sbit at
DDRB.B5
The following routines must be defined in all project
using SPI Ethernet Library:
Description:
Example :
sub function Spi_Ethernet_UserTCP(dim remoteHost
as ^byte,
as ^byte,
dim
remotePort
as word,
dim
localPort
as word,
dim
reqLength
as word) as word
TCP request
handler.
handler.
Refer to the
library example
at the bottom
of this page
at the bottom
of this page
for code
implementation.
sub function Spi_Ethernet_UserUDP(dim remoteHost
as ^byte,
as ^byte,
dim remotePort
as word,
dim destPort as
word,
dim reqLength as
word) as word
UDP request
handler.
handler.
Refer to the
library example
at the bottom
at the bottom
of this page
for code
implementation.
implementation.