Datasheet
SPI_Ethernet_Disable
437
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Requires Ethernet module has to be initialized. See SPI_Ethernet_Init.
Example
SPI_Ethernet_Enable(SPI_Ethernet_CRC | SPI_Ethernet_UNICAST); //
enable CRC checking and Unicast traffic
Prototype
void SPI_Ethernet_Disable(unsigned char disFlt) ;
Returns Nothing.
Description
This is MAC module routine. This routine disables appropriate network traffic on
the ENC28J60 module by the means of it's receive filters (unicast, multicast, broad-
cast, crc). Specific type of network traffic will be disabled if a corresponding bit of
this routine's input parameter is set. Therefore, more than one type of network
traffic can be disabled at the same time. For this purpose, predefined library con-
stants (see the table below) can be ORed to form appropriate input value.
Parameters:
-
disFlt: network traffic/receive filter flags. Each bit corresponds to the
appropriate network traffic/receive filter:
Note: Advance filtering available in the
ENC28J60 module such as Pattern
Match
, Magic Packet and Hash Table can not be disabled by this routine.
Bit Mask Description
Predefined library
const
0 0x01
MAC Broadcast traffic/receive filter flag. When
set, MAC broadcast traffic will be disabled.
SPI_Ethernet_BRO
ADCAST
1 0x02
MAC Multicast traffic/receive filter flag. When
set, MAC multicast traffic will be disabled.
SPI_Ethernet_MUL
TICAST
2 0x04
not used
none
3 0x08
not used
none
4 0x10
not used
none
5 0x20
CRC check flag. When set, CRC check will be
disabled and packets with invalid CRC field
will be accepted.
SPI_Ethernet_CRC
6 0x40
not used
none
7 0x80
MAC Unicast traffic/receive filter flag. When
set, MAC unicast traffic will be disabled.
SPI_Ethernet_UNI
CAST