Mikroelektronika MIKROE-350 Fiche De Données

Page de 526
Spi_Ethernet_Enable
371
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub procedure Spi_Ethernet_Enable(dim enFlt as byte)
Returns
Nothing. 
Description
This is MAC module routine. This routine enables appropriate network traffic on
the ENC28J60 module by the means of it's receive filters (unicast, multicast,
broadcast, crc). Specific type of network traffic will be enabled if a correspon-
ding bit of this routine's input parameter is set. Therefore, more than one type of
network traffic can be enabled at the same time. For this purpose, predefined
library constants (see the table below) can be ORed to form appropriate input
value. 
Parameters:
enFlt:
network traffic/receive filter flags. Each bit corresponds to the 
appropriate network traffic/receive filter: 
Bit
Mask
Description
Predefined library const
0
0x01
MAC Broadcast traffic/receive filter
flag. When set, MAC broadcast
traffic will be enabled. 
Spi_Ethernet_BROADCAST
1
0x02
MAC Multicast traffic/receive filter
flag. When set, MAC multicast traf-
fic will be enabled. 
Spi_Ethernet_MULTICAST
2
0x04
not used
none
3
0x08
not used
none
4
0x10
not used
none
5
0x20
CRC check flag. When set, pack-
ets with invalid CRC field will be
discarded.
Spi_Ethernet_CRC
6
0x40
not used
none
7
0x80
MAC Unicast traffic/receive filter
flag. When set, MAC unicast traffic
will be enabled. 
Spi_Ethernet_UNICAST