USRP_DATAOUT_ENDPOINT -- where is it declared?


#1

Does anybody know where to find the “.h” file
declaring “USRP_DATOUT_ENDPOINT” ?

Its referenced in “USRP.CC” (see below)…



int r = usb_bulk_write (udh,
USRP_DATAOUT_ENDPOINT, (char *) buf, n * sizeof
(short), 1000);
if (r < 0){
fprintf (stderr, “usb_bulk_write failed (loop
%d): %s\n”, loop_counter, usb_strerror ());
return false;
}

Thankx,

Angilberto.


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


#2

On Sat, Jun 10, 2006 at 08:51:46AM -0700, Angilberto Muniz Sb wrote:

if (r < 0){
fprintf (stderr, “usb_bulk_write failed (loop
%d): %s\n”, loop_counter, usb_strerror ());
return false;
}

Thankx,
Angilberto.

As you probably noticed, it’s in an #if 0’d section of code. That’s
because it’s no longer applicable (and doesn’t work anymore). There
are now many more registers that must be written to set up the USRP
for reasonable behavior. That’s why the code in usrp_basic.{h,cc} and
usrp_standard.{h,cc} exist.

You’ll be better off trying test_usrp_standard_{rx, tx}.cc

Back to your original question, See usrp_interfaces.h.
They are now called USRP_TX_ENDPOINT and USRP_RX_ENDPOINT.

Also, as I recall, you’re trying to use the USRP without GNU Radio.
The high-level interface you’ll want to use is defined in
usrp_standard.h.
Create instances of usrp_standard_tx and usrp_standard_rx.

Eric

#ifndef USRP_INTERFACES_H
#define USRP_INTERFACES_H

/*

  • We’ve now split the USRP into 3 separate interfaces.
  • Interface 0 contains only ep0 and is used for command and status.
  • Interface 1 is the Tx path and it uses ep2 OUT BULK.
  • Interface 2 is the Rx path and it uses ep6 IN BULK.
    */

#define USRP_CMD_INTERFACE 0
#define USRP_CMD_ALTINTERFACE 0
#define USRP_CMD_ENDPOINT 0

#define USRP_TX_INTERFACE 1
#define USRP_TX_ALTINTERFACE 0
#define USRP_TX_ENDPOINT 2 // streaming data from host to FPGA

#define USRP_RX_INTERFACE 2
#define USRP_RX_ALTINTERFACE 0
#define USRP_RX_ENDPOINT 6 // streaming data from FPGA to host

#endif /* USRP_INTERFACES_H */