User manual

Table Of Contents
mikroC PRO for PIC32
MikroElektronika
475
SPI_Ethernet_24j600_putString
SPI_Ethernet_24j600_putConstString
SPI_Ethernet_24j600_getByte
Prototype
unsigned int SPI_Ethernet_24j600_putString(unsigned char *ptr);
Description This is MAC module routine. It stores whole string (excluding null termination) into ENC24J600 RAM
starting from current ENC24J600 write pointer (EWRPT) location.
Parameters - ptr: string to be written into ENC24J600 RAM.
Returns Number of bytes written into ENC24J600 RAM.
Requires Ethernet module has to be initialized. See SPI_Ethernet_24j600_Init.
Example
char *buffer = “mikroElektronika”;
...
SPI_Ethernet_24j600_putString(buffer); // put a RAM string into ENC24J600
buffer
Notes None.
Prototype
unsigned int SPI_Ethernet_24j600_putConstString(const unsigned char *ptr);
Description This is MAC module routine. It stores whole const string (excluding null termination) into ENC24J600
RAM starting from current ENC24J600 write pointer (EWRPT) location.
Parameters - ptr: const string to be written into ENC24J600 RAM.
Returns Number of bytes written into ENC24J600 RAM.
Requires Ethernet module has to be initialized. See SPI_Ethernet_24j600_Init.
Example
const char *buffer = “mikroElektronika”;
...
SPI_Ethernet_24j600_putConstString(buffer); // put a const string into
ENC24J600 buffer
Notes None.
Prototype
unsigned char SPI_Ethernet_24j600_getByte();
Description This is MAC module routine. It fetches a byte from address pointed to by current ENC24J600 read
pointer (ERDPT).
Parameters None.
Returns Byte read from ENC24J600 RAM.
Requires Ethernet module has to be initialized. See SPI_Ethernet_24j600_Init.
Example
char buffer;
...
buffer = SPI_Ethernet_24j600_getByte(); // read a byte from ENC24J600
buffer
Notes None.