Datasheet
SPI_Ethernet_putByte
SPI_Ethernet_putBytes
439
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
void SPI_Ethernet_putByte(unsigned char v);
Returns Nothing.
Description
This is MAC module routine. It stores one byte to address pointed by the current
ENC28J60 write pointer (EWRPT).
Parameters:
-
v: value to store
Requires Ethernet module has to be initialized. See SPI_Ethernet_Init.
Example
char data;
...
SPI_Ethernet_putByte(data); // put an byte into ENC28J60 buffer
Prototype
void SPI_Ethernet_putBytes(unsigned char *ptr, unsigned char n);
Returns Nothing.
Description
This is MAC module routine. It stores requested number of bytes into ENC28J60
RAM starting from current ENC28J60 write pointer (EWRPT) location.
Parameters:
- ptr: RAM buffer containing bytes to be written into ENC28J60 RAM.
- n: number of bytes to be written.
Requires Ethernet module has to be initialized. See SPI_Ethernet_Init.
Example
char *buffer = "mikroElektronika";
...
SPI_Ethernet_putBytes(buffer, 16); // put an RAM array into
ENC28J60 buffer