Datasheet
SPI_Ethernet_getBytes
442
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
void SPI_Ethernet_getBytes(unsigned char *ptr, unsigned int addr,
unsigned char n);
Returns Nothing.
Description
This is MAC module routine. It fetches equested number of bytes from
ENC28J60 RAM starting from given address. If value of 0xFFFF is passed as the
address parameter, the reading will start from current ENC28J60 read pointer
(ERDPT) location.
Parameters:
- ptr: buffer for storing bytes read from ENC28J60 RAM.
- addr: ENC28J60 RAM start address. Valid values: 0..8192.
- n: number of bytes to be read.
Requires Ethernet module has to be initialized. See SPI_Ethernet_Init.
Example
char buffer[16];
...
SPI_Ethernet_getBytes(buffer, 0x100, 16); // read 16 bytes,
starting from address 0x100