File: vol.h

package info (click to toggle)
ocp 1%3A0.1.20-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 5,216 kB
  • ctags: 7,770
  • sloc: ansic: 91,284; cpp: 9,718; sh: 3,100; makefile: 2,445
file content (24 lines) | stat: -rw-r--r-- 718 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef __VOL_H
#define __VOL_H

struct ocpvolstruct
{
	int val,               /* the current value */
	    min,               /* the minimal value */
	    max,               /* the maximal value */
	    step,              /* stepping */
	    log;               /* log scale? (not yet supported) */
	const char *name;
};

/* min<=val<=max !! */
/* (max-min)%step==0 !! */

struct ocpvolregstruct
{
	int (*GetVolumes)(void);                   /* returns the number of setable volumes */
	int (*GetVolume)(struct ocpvolstruct *, int);  /* gets a volume (min, max, step and log should be same on every call!) */
	int (*SetVolume)(struct ocpvolstruct *, int);  /* sets a volume (only val should be changed!) */
};

#endif