add doxy comments

parent e25f0a08
......@@ -13,8 +13,8 @@
#include "liboasis-usb-att.h"
#include "usb-enum.h"
#define OAU_VENDOR_ID 0x1556 /* CERN USB Vendor ID */
#define OAU_DEVICE_ID 0x0443 /* oau USB Device ID */
#define OAU_VENDOR_ID 0x1556 /**< CERN USB Vendor ID */
#define OAU_DEVICE_ID 0x0443 /**< oau USB Device ID */
#define OAU_MAX_HANDLES 16
......
......@@ -29,16 +29,13 @@ extern "C" {
*/
enum oau_att_value_enum {
ATT_ERR = -1, /**< Error */
ATT_NONE = 0x0, /**< No attenuation */
ATT_1 = 0x01, /**< Attenuator 1: 20dB */
ATT_2 = 0x03, /**< Attenuator 1+2: 40dB */
ATT_MINUS_40dB = 0x0, /**< -40dB attn (power-on default) */
ATT_MINUS_20dB = 0x01, /**< -20dB attn */
ATT_0dB = 0x03, /**< 0dB attn */
ATT_ZERO_dB = 0x03, /**< 0dB attn */
};
/**
* @brief Open a msatt device
* @brief Open a msatt device by LUN (not implemented)
*
* A board is selected by lun, and a handle is returned for further
* reference to it.
......@@ -70,10 +67,11 @@ int oau_att_close(int fd);
/**
* @brief Get attenuation value for a given channel
*
* Each channel can be on one of these states:
* - No attenuation active (Relay value = 0x0)
* - 20dB attenuation (Relay value = 0x1)
* - 40dB attenuation (Relay value = 0x3)
* Each channel can be in one of these states:
*
* - attenuation -40dB (power-on default) (Relay value = 0x0)
* - attenuation -20dB (Relay value = 0x1)
* - attenuation 0dB (Relay value = 0x3)
*
* @param fd Device handle identifying board
* @param channel Channel [1,2,3,4] on the board to read from
......
......@@ -14,22 +14,35 @@
* Released under the GPL v2. (and only v2, not any later version)
*/
/**
* \brief oau_usb_dev - representation of an oattn device in all
* concevable forms
*/
struct oau_usb_dev {
int lun;
char busnum[6];
char devnum[6];
char portnum[6];
char busport[16];
char devno[10];
char serial[48];
char path[256];
int lun; /**< logical unit number (not implemented) */
char busnum[6]; /**< USB bus number (decimal) */
char devnum[6]; /**< USB dev number (decimal) */
char portnum[6]; /**< USB port number (decimal) */
char busport[16]; /**< USB bus-port string (decimal bbb-ppp) */
char devno[10]; /**< Linux kernel devno (decimal major:minor) */
char serial[48]; /**< Serial number (e.g. HCCAIAD000-CR000003) */
char path[256]; /**< Linux sysfs device path */
int unused[4];
};
/**
* \struct oau_devarray - array of oattn devices detected in the system
*/
struct oau_devarray {
int ndevs;
struct oau_usb_dev *devs;
int ndevs; /**< number of devices (i.e. array length) */
struct oau_usb_dev *devs; /**< pointer to array of devices */
};
/** oau_display_devarray - auxiliary function to display the
* detected device array table
*/
void oau_display_devarray(struct oau_devarray *ls);
struct oau_devarray *oau_get_devarray(char *vendor_id, char *device_id);
/** oau_get_devarray - populate library's static table of detected devices
*/
struct oau_devarray *oau_get_devarray(unsigned int vendor_id, unsigned int device_id);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment