Mikroelektronika MIKROE-350 Fiche De Données
Spi_Ethernet_putConstString
Spi_Ethernet_getByte
377
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub function Spi_Ethernet_putConstString(const ptr as ^byte) as word
Returns
Number of bytes written into ENC28J60 RAM.
Description
This is MAC module routine. It stores whole const string (excluding null termina-
tion) into
tion) into
ENC28J60
RAM starting from current
ENC28J60
write pointer (
EWRPT
)
location.
Parameters:
-
ptr:
const string to be written into ENC28J60 RAM.
Requires
Ethernet module has to be initialized. See Spi_Ethernet_Init.
Example
const
buffer
as string[16]
...
buffer = "mikroElektronika"
...
Spi_Ethernet_putConstString(buffer) ' put a const string into
ENC28J60 buffer
Prototype
sub function Spi_Ethernet_getByte() as byte
Returns
Byte read from ENC28J60 RAM.
Description
This is MAC module routine. It fetches a byte from address pointed to by cur-
rent ENC28J60 read pointer (ERDPT).
rent ENC28J60 read pointer (ERDPT).
Requires
Ethernet module has to be initialized. See Spi_Ethernet_Init.
Example
dim buffer as byte<>
...
buffer = Spi_Ethernet_getByte() ' read a byte from ENC28J60
...
buffer = Spi_Ethernet_getByte() ' read a byte from ENC28J60
buffer