5 * Copyright (C) 2005 Mike Isely <isely@pobox.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __PVRUSB2_CTRL_H
22 #define __PVRUSB2_CTRL_H
34 /* Set the given control. */
35 int pvr2_ctrl_set_value(struct pvr2_ctrl *,int val);
37 /* Set/clear specific bits of the given control. */
38 int pvr2_ctrl_set_mask_value(struct pvr2_ctrl *,int mask,int val);
40 /* Get the current value of the given control. */
41 int pvr2_ctrl_get_value(struct pvr2_ctrl *,int *valptr);
43 /* Retrieve control's type */
44 enum pvr2_ctl_type pvr2_ctrl_get_type(struct pvr2_ctrl *);
46 /* Retrieve control's maximum value (int type) */
47 int pvr2_ctrl_get_max(struct pvr2_ctrl *);
49 /* Retrieve control's minimum value (int type) */
50 int pvr2_ctrl_get_min(struct pvr2_ctrl *);
52 /* Retrieve control's default value (any type) */
53 int pvr2_ctrl_get_def(struct pvr2_ctrl *);
55 /* Retrieve control's enumeration count (enum only) */
56 int pvr2_ctrl_get_cnt(struct pvr2_ctrl *);
58 /* Retrieve control's valid mask bits (bit mask only) */
59 int pvr2_ctrl_get_mask(struct pvr2_ctrl *);
61 /* Retrieve the control's name */
62 const char *pvr2_ctrl_get_name(struct pvr2_ctrl *);
64 /* Retrieve the control's desc */
65 const char *pvr2_ctrl_get_desc(struct pvr2_ctrl *);
67 /* Retrieve a control enumeration or bit mask value */
68 int pvr2_ctrl_get_valname(struct pvr2_ctrl *,int,char *,unsigned int,
71 /* Return true if control is writable */
72 int pvr2_ctrl_is_writable(struct pvr2_ctrl *);
74 /* Return true if control has custom symbolic representation */
75 int pvr2_ctrl_has_custom_symbols(struct pvr2_ctrl *);
77 /* Convert a given mask/val to a custom symbolic value */
78 int pvr2_ctrl_custom_value_to_sym(struct pvr2_ctrl *,
80 char *buf,unsigned int maxlen,
83 /* Convert a symbolic value to a mask/value pair */
84 int pvr2_ctrl_custom_sym_to_value(struct pvr2_ctrl *,
85 const char *buf,unsigned int len,
86 int *maskptr,int *valptr);
88 /* Convert a given mask/val to a symbolic value */
89 int pvr2_ctrl_value_to_sym(struct pvr2_ctrl *,
91 char *buf,unsigned int maxlen,
94 /* Convert a symbolic value to a mask/value pair */
95 int pvr2_ctrl_sym_to_value(struct pvr2_ctrl *,
96 const char *buf,unsigned int len,
97 int *maskptr,int *valptr);
99 /* Convert a given mask/val to a symbolic value - must already be
100 inside of critical region. */
101 int pvr2_ctrl_value_to_sym_internal(struct pvr2_ctrl *,
103 char *buf,unsigned int maxlen,
106 #endif /* __PVRUSB2_CTRL_H */
109 Stuff for Emacs to see, in order to encourage consistent editing style:
110 *** Local Variables: ***
112 *** fill-column: 75 ***
114 *** c-basic-offset: 8 ***