Component: TCP/IP (ENC28J60) (Comms: Networking)
From Flowcode Help
Jump to navigationJump to searchAuthor | Matrix TSL |
Version | 2.2 |
Category | Comms: Networking |
Contents
TCP/IP (ENC28J60) 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.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_TCPIP_ENC28J60.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
PacketSend | |
Attempts to transmit a data packet to the ENC28J60 module. | |
- UINT | Length |
- VOID | Return |
MakeTcpSynackFromSyn | |
- UINT | Port |
- VOID | Return |
MakeArpRequest | |
[[File:]] - | ServerIP |
- VOID | Return |
InitialiseDataLengthInfo | |
Initialises the data pointers to allow us to craft a response containing data | |
- VOID | Return |
MakeTcpAckFromAny | |
- UINT | Port |
- VOID | Return |
PacketReceive | |
Attempts to receive a data packet from the ENC28J60 module. Returns the number of bytes received. | |
- UINT | Return |
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 |
CheckArpPacketIsMyreplyArp | |
- BYTE | Return |
CheckForIp | |
Checks to see if the received data is an IP request with my IP address. | |
- UINT | Length |
- BYTE | Return |
CheckForTCPPort | |
Checks to see if the received data is requesting the server port | |
- UINT | Port |
- BYTE | Return |
CheckForPing | |
Checks to see if the received data is a Ping request | |
- BYTE | Return |
GetModuleRevision | |
Requets the module revision number and returns the value supplied by the module's firmware. | |
- BYTE | Return |
MakeTcpAckWithData | |
- UINT | DataLength |
- VOID | Return |
MakeArpAnswerFromRequest | |
- VOID | Return |
ReadRegister | |
Reads the value from a single register onboard the ENC28J60 module. | |
- BYTE | Address |
- BYTE | Return |
CheckForARP | |
Checks to see if the received data is an ARP request with my IP address. | |
- UINT | Length |
- BYTE | Return |
ClientSendPacket | |
- UINT | DestPort |
- UINT | SourcePort |
- BYTE | Flags |
- BYTE | MaxSegmentSize |
- BYTE | ClearSeqAck |
- UINT | NextAckNum |
- UINT | DataLength |
- BYTE | DestMac |
- BYTE | DestIp |
- VOID | Return |
MakeEchoReplyFromRequest | |
- UINT | Length |
- VOID | Return |
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 |
GetDataLength | |
Returns the number of received data bytes after the headers | |
- UINT | Return |
GetTcpDataPointer | |
- UINT | Return |
WriteRegister | |
Writes a value to a single register onboard the ENC28J60 module. | |
- BYTE | Address |
- BYTE | Data |
- VOID | Return |
FillTcpData | |
- UINT | Position |
- STRING | Data |
- UINT | Return |
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 |
FillTcpArray | |
- UINT | Position |
- UINT | Count |
- BYTE | Data |
- VOID | Return |