User manual

481
mikoPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
SPI_Ethernet_putBytes
SPI_Ethernet_putConstBytes
Prototype
procedure SPI_Ethernet_putBytes(ptr : ^byte; n : word);
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.
Returns Nothing.
Requires Ethernet module has to be initialized. See SPI_Ethernet_Init.
Example
var
buffer : array[17] of byte;
...
buffer := ‘mikroElektronika’;
...
SPI_Ethernet_putBytes(buffer, 16); // put an RAM array into ENC28J60
buffer
Notes None.
Prototype
procedure SPI_Ethernet_putConstBytes(const ptr : ^byte; n : word);
Description This is MAC module routine. It stores requested number of const bytes into ENC28J60 RAM starting
from current ENC28J60 write pointer (EWRPT) location.
Parameters - ptr: const buffer containing bytes to be written into ENC28J60 RAM.
- n: number of bytes to be written.
Returns Nothing.
Requires Ethernet module has to be initialized. See SPI_Ethernet_Init.
Example
const
buffer : array[17] of byte;
...
buffer := ‘mikroElektronika’;
...
SPI_Ethernet_putConstBytes(buffer, 16); // put a const array into ENC28J60
buffer
Notes None.