English
Language : 

20-101-1051 Datasheet, PDF (152/165 Pages) List of Unclassifed Manufacturers – C-Programmable Core Module with NAND Flash Mass Storage and Ethernet
F.3 Function Calls
The function calls described in this section are used with all RabbitNet peripheral cards,
and are available in the RNET.LIB library in the Dynamic C RABBITNET folder.
int rn_init(char portflag, char servicetype);
Resets, initializes, or disables a specified RabbitNet port on the master single-board computer. During
initialization, the network is enumerated and relevant tables are filled in. If the port is already initialized,
calling this function forces a re-enumeration of all devices on that port.
Call this function first before using other RabbitNet functions.
PARAMETERS
portflag is a bit that represents a RabbitNet port on the master single-board computer (from 0 to the
maximum number of ports). A set bit requires a service. If portflag = 0x03, both RabbitNet ports 0
and 1 will need to be serviced.
servicetype enables or disables each RabbitNet port as set by the port flags.
0 = disable port
1 = enable port
RETURN VALUE
0
int rn_device(char pna);
Returns an address index to device information from a given physical node address. This function will
check device information to determine that the peripheral card is connected to a master.
PARAMETER
pna is the physical node address, indicated as a byte.
7,6—2-bit binary representation of the port number on the master
5,4,3—Level 1 router downstream port
2,1,0—Level 2 router downstream port
RETURN VALUE
Pointer to device information. -1 indicates that the peripheral card either cannot be identified or is not
connected to the master.
SEE ALSO
rn_find
146
RabbitCore RCM3365/RCM3375