BL4S200 User’s Manual
196
rn_echo
int rn_echo(int handle, char sendecho, char *recdata);
FUNCTION DESCRIPTION
The peripheral card sends back the character the master sent. This function will check
device information to determine that the peripheral card is connected to a master.
PARAMETERS
handle
address index to device information. Use
rn_device()
or
rn_find()
to establish the handle.
sendecho
character to echo back.
recdata
pointer to the return address of the character from the device.
RETURN VALUE
The status byte from the previous command. -1 means that device information indicates
the peripheral card is not connected to the master.
rn_write
int rn_write(int handle, int regno, char *data, int datalen);
FUNCTION DESCRIPTION
Writes a string to the specified device and register. Waits for results. This function will
check device information to determine that the peripheral card is connected to a master.
PARAMETERS
handle
address index to device information. Use
rn_device()
or
rn_find()
to establish the handle.
regno
command register number as designated by each device.
data
pointer to the address of the string to write to the device.
datalen
number of bytes to write (0–15).
NOTE:
A data length of 0 will transmit the one-byte command register number.
RETURN VALUE
The status byte from the previous command. -1 means that device information indicates
the peripheral card is not connected to the master, and -2 means that the data length was
greater than 15.
SEE ALSO
rn_read