Datasheet

Spi_Ethernet_putByte
Spi_Ethernet_putBytes
375
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub procedure Spi_Ethernet_putByte(dim v as byte)
Returns Nothing.
Description
This is MAC module routine. It stores one byte to address pointed by the cur-
rent ENC28J60 write pointer (EWRPT).
Parameters:
-
v: value to store
Requires Ethernet module has to be initialized. See Spi_Ethernet_Init.
Example
dim data as byte
...
Spi_Ethernet_putByte(data) ' put an byte into ENC28J60 buffer
Prototype
sub procedure Spi_Ethernet_putBytes(dim ptr as ^byte, dim n as byte)
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
dim
buffer as byte[17]
...
buffer = "mikroElektronika"
...
Spi_Ethernet_putBytes(buffer, 16) ' put an RAM array into
ENC28J60 buffer