Vala bindings and examples added. Minor clean-up in header file
[freerunner-navigation-board:bmp085.git] / userspace / vala / bmp085.vapi
1 [CCode (cheader_filename = "bmp085.h")]
2 namespace Bmp {
3         [CCode(cname = "struct bmp085_calibration_data")]
4         public struct BmpCalibrationData {
5                 [CCode(cname = "AC1")]
6                 public int16 AC1 ;
7                 [CCode(cname = "AC2")]
8                 public int16 AC2 ;
9                 [CCode(cname = "AC3")]
10                 public int16 AC3 ;
11                 [CCode(cname = "AC4")]
12                 public uint16 AC4 ;
13                 [CCode(cname = "AC5")]
14                 public uint16 AC5 ;
15                 [CCode(cname = "AC6")]
16                 public uint16 AC6 ;
17                 [CCode(cname = "B1")]
18                 public int16 B1 ;
19                 [CCode(cname = "B2")]
20                 public int16 B2 ;
21                 [CCode(cname = "MB")]
22                 public int16 MB ;
23                 [CCode(cname = "MC")]
24                 public int16 MC ;
25                 [CCode(cname = "MD")]
26                 public int16 MD ;
27         }
28
29         [CCode(cname = "struct bmp085_data")]
30         public struct BmpData {
31                 [CCode(cname = "client")]
32                 public int client;
33
34                 [CCode(cname = "calibration")]
35                 public BmpCalibrationData calibration_data;
36                 
37                 [CCode(cname = "raw_temperature")]
38                 public ulong raw_temperature;
39
40                 [CCode(cname = "raw_pressure")]
41                 public ulong raw_pressure;
42                 
43                 [CCode(cname = "oversampling_setting")]
44                 public uchar oversampling_setting;
45
46                 [CCode(cname = "next_temp_measurement")]
47                 public ulong next_temp_measurement;
48
49                 [CCode(cname = "b6")]
50                 public long calc_correction_coeff;
51         }
52
53         [CCode (cname = "open_bmp085")]
54         public int open_bmp085(int adapter_nr, out BmpData data);
55     
56         [CCode (cname = "close_bmp085")]
57         public void close_bmp085 (BmpData data);
58         
59         [CCode (cname = "set_oversampling")]
60         public void set_oversampling (out BmpData data,uchar oversampling);
61
62         [CCode (cname = "get_oversampling")]
63         public uchar get_oversampling (BmpData data);
64
65         [CCode (cname = "get_temperature")]
66         public int32 get_temperature (BmpData data);
67
68         [CCode (cname = "get_pressure")]
69         public int32 get_pressure (BmpData data);
70
71 }
72