Jump to content

Component: TCP/IP Dummy (ENC28J60) (Comms: Networking): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(3 intermediate revisions by the same user not shown)
Line 96: Line 96:


===CheckArpPacketIsMyreplyArp===
===CheckArpPacketIsMyreplyArp===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckArpPacketIsMyreplyArp'''
| width="90%" class="mtx-class-macrohead" | '''CheckArpPacketIsMyreplyArp'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 110: Line 110:


===CheckForARP===
===CheckForARP===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckForARP'''
| width="90%" class="mtx-class-macrohead" | '''CheckForARP'''
|-
|-
| colspan="2" | Checks to see if the received data is an ARP request with my IP address. 
| colspan="2" | Checks to see if the received data is an ARP request with my IP address. 
Line 129: Line 129:


===CheckForIp===
===CheckForIp===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckForIp'''
| width="90%" class="mtx-class-macrohead" | '''CheckForIp'''
|-
|-
| colspan="2" | Checks to see if the received data is an IP request with my IP address. 
| colspan="2" | Checks to see if the received data is an IP request with my IP address. 
Line 148: Line 148:


===CheckForPing===
===CheckForPing===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckForPing'''
| width="90%" class="mtx-class-macrohead" | '''CheckForPing'''
|-
|-
| colspan="2" | Checks to see if the received data is a Ping request 
| colspan="2" | Checks to see if the received data is a Ping request 
Line 162: Line 162:


===CheckForTCPPort===
===CheckForTCPPort===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckForTCPPort'''
| width="90%" class="mtx-class-macrohead" | '''CheckForTCPPort'''
|-
|-
| colspan="2" | Checks to see if the received data is requesting the server port 
| colspan="2" | Checks to see if the received data is requesting the server port 
Line 181: Line 181:


===CheckForTCPType===
===CheckForTCPType===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckForTCPType'''
| width="90%" class="mtx-class-macrohead" | '''CheckForTCPType'''
|-
|-
| colspan="2" | Checks to what kind of TCP type the received data is requesting. Returns a bit field specifying the type of request. 0x01 = Ack Requires, 0x02 = Synchronise 0x10 = Ack  
| colspan="2" | Checks to what kind of TCP type the received data is requesting. Returns a bit field specifying the type of request. 0x01 = Ack Requires, 0x02 = Synchronise 0x10 = Ack  
Line 195: Line 195:


===ClientSendPacket===
===ClientSendPacket===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ClientSendPacket'''
| width="90%" class="mtx-class-macrohead" | '''ClientSendPacket'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 254: Line 254:


===ControlLEDs===
===ControlLEDs===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ControlLEDs'''
| width="90%" class="mtx-class-macrohead" | '''ControlLEDs'''
|-
|-
| colspan="2" | Allows both the LEDs on the Ethernet socket to be controlled. Useful for checking if the SPI communications are functioning correctly. 
| colspan="2" | Allows both the LEDs on the Ethernet socket to be controlled. Useful for checking if the SPI communications are functioning correctly. 
Line 273: Line 273:


===FillTcpArray===
===FillTcpArray===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FillTcpArray'''
| width="90%" class="mtx-class-macrohead" | '''FillTcpArray'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 302: Line 302:


===FillTcpData===
===FillTcpData===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FillTcpData'''
| width="90%" class="mtx-class-macrohead" | '''FillTcpData'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 326: Line 326:


===GetDataLength===
===GetDataLength===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDataLength'''
| width="90%" class="mtx-class-macrohead" | '''GetDataLength'''
|-
|-
| colspan="2" | Returns the number of received data bytes after the headers 
| colspan="2" | Returns the number of received data bytes after the headers 
Line 340: Line 340:


===GetModuleRevision===
===GetModuleRevision===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetModuleRevision'''
| width="90%" class="mtx-class-macrohead" | '''GetModuleRevision'''
|-
|-
| colspan="2" | Requets the module revision number and returns the value supplied by the module's firmware. 
| colspan="2" | Requets the module revision number and returns the value supplied by the module's firmware. 
Line 354: Line 354:


===GetSendersMAC===
===GetSendersMAC===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetSendersMAC'''
| width="90%" class="mtx-class-macrohead" | '''GetSendersMAC'''
|-
|-
| colspan="2" | Gets the MAC address from locations 6-11 of the IP Header 
| colspan="2" | Gets the MAC address from locations 6-11 of the IP Header 
Line 373: Line 373:


===GetTcpDataPointer===
===GetTcpDataPointer===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTcpDataPointer'''
| width="90%" class="mtx-class-macrohead" | '''GetTcpDataPointer'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 387: Line 387:


===Initialise===
===Initialise===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
|-
| colspan="2" | Initialises the SPI connection to the TCPIP module and sets up some initial values. Flashes the LEDs on and off twice to confirm SPI comms are active. LEDs are then configured to auto functionality. 
| colspan="2" | Initialises the SPI connection to the TCPIP module and sets up some initial values. Flashes the LEDs on and off twice to confirm SPI comms are active. LEDs are then configured to auto functionality. 
Line 401: Line 401:


===InitialiseDataLengthInfo===
===InitialiseDataLengthInfo===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''InitialiseDataLengthInfo'''
| width="90%" class="mtx-class-macrohead" | '''InitialiseDataLengthInfo'''
|-
|-
| colspan="2" | Initialises the data pointers to allow us to craft a response containing data 
| colspan="2" | Initialises the data pointers to allow us to craft a response containing data 
Line 415: Line 415:


===MakeArpAnswerFromRequest===
===MakeArpAnswerFromRequest===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MakeArpAnswerFromRequest'''
| width="90%" class="mtx-class-macrohead" | '''MakeArpAnswerFromRequest'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 429: Line 429:


===MakeArpRequest===
===MakeArpRequest===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MakeArpRequest'''
| width="90%" class="mtx-class-macrohead" | '''MakeArpRequest'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 448: Line 448:


===MakeEchoReplyFromRequest===
===MakeEchoReplyFromRequest===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MakeEchoReplyFromRequest'''
| width="90%" class="mtx-class-macrohead" | '''MakeEchoReplyFromRequest'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 467: Line 467:


===MakeTcpAckFromAny===
===MakeTcpAckFromAny===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MakeTcpAckFromAny'''
| width="90%" class="mtx-class-macrohead" | '''MakeTcpAckFromAny'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 486: Line 486:


===MakeTcpAckWithData===
===MakeTcpAckWithData===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MakeTcpAckWithData'''
| width="90%" class="mtx-class-macrohead" | '''MakeTcpAckWithData'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 505: Line 505:


===MakeTcpSynackFromSyn===
===MakeTcpSynackFromSyn===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MakeTcpSynackFromSyn'''
| width="90%" class="mtx-class-macrohead" | '''MakeTcpSynackFromSyn'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 524: Line 524:


===PacketReceive===
===PacketReceive===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PacketReceive'''
| width="90%" class="mtx-class-macrohead" | '''PacketReceive'''
|-
|-
| colspan="2" | Attempts to receive a data packet from the ENC28J60 module. Returns the number of bytes received. 
| colspan="2" | Attempts to receive a data packet from the ENC28J60 module. Returns the number of bytes received. 
Line 538: Line 538:


===PacketSend===
===PacketSend===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PacketSend'''
| width="90%" class="mtx-class-macrohead" | '''PacketSend'''
|-
|-
| colspan="2" | Attempts to transmit a data packet to the ENC28J60 module. 
| colspan="2" | Attempts to transmit a data packet to the ENC28J60 module. 
Line 557: Line 557:


===ReadRegister===
===ReadRegister===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadRegister'''
| width="90%" class="mtx-class-macrohead" | '''ReadRegister'''
|-
|-
| colspan="2" | Reads the value from a single register onboard the ENC28J60 module. 
| colspan="2" | Reads the value from a single register onboard the ENC28J60 module. 
Line 576: Line 576:


===ReadStringFromBuffer===
===ReadStringFromBuffer===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadStringFromBuffer'''
| width="90%" class="mtx-class-macrohead" | '''ReadStringFromBuffer'''
|-
|-
| colspan="2" | Reads a string from the buffer at location specified for the number of bytes specified. If a space character is encountered then the macro will return straight away without the space character in the string. 
| colspan="2" | Reads a string from the buffer at location specified for the number of bytes specified. If a space character is encountered then the macro will return straight away without the space character in the string. 
Line 600: Line 600:


===WriteRegister===
===WriteRegister===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteRegister'''
| width="90%" class="mtx-class-macrohead" | '''WriteRegister'''
|-
|-
| colspan="2" | Writes a value to a single register onboard the ENC28J60 module. 
| colspan="2" | Writes a value to a single register onboard the ENC28J60 module. 
Line 625: Line 625:
==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|}
|}

Latest revision as of 14:23, 13 July 2026

Author Matrix TSL
Version 2.0
Category Comms: Networking


TCP/IP Dummy component

A set of routines used to control a ENC28J60 TCP/IP Module. Required connections VCC, Reset, GND, SCK, MISO, MOSI, CS. Leave these pins disconnected CLKOUT, ENC_WOL, ENC_INT

Component Source Code

Please click here to download the component source project: FC_Comp_Source_TCPIP_ENC28J60_Dummy.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_TCPIP_ENC28J60_Dummy.fcfx

Detailed description

No detailed description exists yet for this component

Examples

Here is a simple example to help get started with the ENC28J60 module.

The example program creates a web page server on the network and will also respond to ping requests.

The HTML to drive the web pages is included in the flowchart near the bottom of the main program loop. ENC28J60 Example






Macro reference

CheckArpPacketIsMyreplyArp

CheckArpPacketIsMyreplyArp
 
- BYTE Return


CheckForARP

CheckForARP
Checks to see if the received data is an ARP request with my IP address. 
- UINT Length
 
- BYTE Return


CheckForIp

CheckForIp
Checks to see if the received data is an IP request with my IP address. 
- UINT Length
 
- BYTE Return


CheckForPing

CheckForPing
Checks to see if the received data is a Ping request 
- BYTE Return


CheckForTCPPort

CheckForTCPPort
Checks to see if the received data is requesting the server port 
- UINT Port
 
- BYTE Return


CheckForTCPType

CheckForTCPType
Checks to what kind of TCP type the received data is requesting. Returns a bit field specifying the type of request. 0x01 = Ack Requires, 0x02 = Synchronise 0x10 = Ack  
- BYTE Return


ClientSendPacket

ClientSendPacket
 
- UINT DestPort
 
- UINT SourcePort
 
- BYTE Flags
 
- BYTE MaxSegmentSize
 
- BYTE ClearSeqAck
 
- UINT NextAckNum
 
- UINT DataLength
 
- BYTE DestMac
 
- BYTE DestIp
 
- VOID Return


ControlLEDs

ControlLEDs
Allows both the LEDs on the Ethernet socket to be controlled. Useful for checking if the SPI communications are functioning correctly. 
- BYTE Mode
0=Off, 1=On, 2=Auto 
- VOID Return


FillTcpArray

FillTcpArray
 
- UINT Position
 
- UINT Count
 
- BYTE Data
 
- VOID Return


FillTcpData

FillTcpData
 
- UINT Position
 
- STRING Data
 
- UINT Return


GetDataLength

GetDataLength
Returns the number of received data bytes after the headers 
- UINT Return


GetModuleRevision

GetModuleRevision
Requets the module revision number and returns the value supplied by the module's firmware. 
- BYTE Return


GetSendersMAC

GetSendersMAC
Gets the MAC address from locations 6-11 of the IP Header 
- BYTE MAC
6-byte Array to store the MAC address 
- VOID Return


GetTcpDataPointer

GetTcpDataPointer
 
- UINT Return


Initialise

Initialise
Initialises the SPI connection to the TCPIP module and sets up some initial values. Flashes the LEDs on and off twice to confirm SPI comms are active. LEDs are then configured to auto functionality. 
- VOID Return


InitialiseDataLengthInfo

InitialiseDataLengthInfo
Initialises the data pointers to allow us to craft a response containing data 
- VOID Return


MakeArpAnswerFromRequest

MakeArpAnswerFromRequest
 
- VOID Return


MakeArpRequest

MakeArpRequest
 
[[File:]] - ServerIP
 
- VOID Return


MakeEchoReplyFromRequest

MakeEchoReplyFromRequest
 
- UINT Length
 
- VOID Return


MakeTcpAckFromAny

MakeTcpAckFromAny
 
- UINT Port
 
- VOID Return


MakeTcpAckWithData

MakeTcpAckWithData
 
- UINT DataLength
 
- VOID Return


MakeTcpSynackFromSyn

MakeTcpSynackFromSyn
 
- UINT Port
 
- VOID Return


PacketReceive

PacketReceive
Attempts to receive a data packet from the ENC28J60 module. Returns the number of bytes received. 
- UINT Return


PacketSend

PacketSend
Attempts to transmit a data packet to the ENC28J60 module. 
- UINT Length
 
- VOID Return


ReadRegister

ReadRegister
Reads the value from a single register onboard the ENC28J60 module. 
- BYTE Address
 
- BYTE Return


ReadStringFromBuffer

ReadStringFromBuffer
Reads a string from the buffer at location specified for the number of bytes specified. If a space character is encountered then the macro will return straight away without the space character in the string. 
- UINT BufferLocation
 
- BYTE NumberOfBytes
Number of bytes to read from the buffer and store into string 
- STRING Return


WriteRegister

WriteRegister
Writes a value to a single register onboard the ENC28J60 module. 
- BYTE Address
 
- BYTE Data
 
- VOID Return


Property reference

Properties