Rabbit OP7100 User Manual Page 161

  • Download
  • Add to my manuals
  • Print
  • Page
    / 172
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 160
User’s Manual 155
Returns an address index to device information from a given physical node address. This function will
check device information to determine that the peripheral board is connected to a master.
PARAMETER
pna is the physical node address, indicated as a byte.
7,6—Port number
5,4,3—Level 1 downstream port
2,1,0—Level 2 downstream port
RETURN VALUE
Pointer to device information. -1 indicates that the peripheral board either cannot be identified or is not
connected to the master.
SEE ALSO
rn_find
Locates the first active device that matches the search criteria.
PARAMETER
srch is the search criteria structure rn_search:
unsigned int flags; // status flags see MATCH macros below
unsigned int ports; // port bitmask
char productid; // product id
char productrev; // product rev
char coderev; // code rev
long serialnum; // serial number
Use a maximum of 3 macros for the search criteria:
RN_MATCH_PORT // match port bitmask
RN_MATCH_PNA // match physical node address
RN_MATCH_HANDLE // match instance (reg 3)
RN_MATCH_PRDID // match id/version (reg 1)
RN_MATCH_PRDREV // match product revision
RN_MATCH_CODEREV // match code revision
RN_MATCH_SN // match serial number
For example:
rn_search newdev;
newdev.flags = RN_MATCH_PORT|RN_MATCH_SN;
newdev.ports = 0x03; //search ports 0 and 1
newdev.serialnum = E3446C01L;
handle = rn_find(&newdev);
RETURN VALUE
Returns the handle of the first device matching the criteria. 0 indicates no such devices were found.
SEE ALSO
rn_device
int rn_device(char pna);
int rn_find(rn_search *srch);
Page view 160
1 2 ... 156 157 158 159 160 161 162 163 164 165 166 ... 171 172

Comments to this Manuals

No comments