libpruio  0.6.8
Fast and easy Digital/Analog Input/Output for Beaglebones
pruio_c_wrapper.bas
Go to the documentation of this file.
1 
14 
15 
16 ' driver header file
17 #INCLUDE ONCE "pruio.bi"
18 
19 
20 '&pruIo* pruio_new(uint16 Act, uint8 Av, uint32 OpD, uint8 SaD);/*
21 FUNCTION pruio_new CDECL ALIAS "pruio_new"( _
22  BYVAL Act AS UInt16 = PRUIO_DEF_ACTIVE _
23  , BYVAL Av AS UInt8 = PRUIO_DEF_AVRAGE _
24  , BYVAL OpD AS UInt32 = PRUIO_DEF_ODELAY _
25  , BYVAL SaD AS UInt8 = PRUIO_DEF_SDELAY) AS PruIo PTR EXPORT
26 
27  RETURN NEW PruIo(Act, Av, OpD, SaD)
28 END FUNCTION
29 '&*/
30 
31 
32 '&void pruio_destroy(pruIo* Io);/*
33 SUB pruio_destroy CDECL ALIAS "pruio_destroy"( _
34  BYVAL Io AS PruIo PTR) EXPORT
35 
36  IF Io THEN DELETE Io : Io = 0
37 END SUB
38 '&*/
39 
40 
41 '&char* pruio_config(pruIo* Io, uint32 Samp, uint32 Mask, uint32 Tmr, uint16 Mds);/*
42 FUNCTION pruio_config CDECL ALIAS "pruio_config"( _
43  BYVAL Io AS PruIo PTR _
44  , BYVAL Samp AS UInt32 _
45  , BYVAL Mask AS UInt32 _
46  , BYVAL Tmr AS UInt32 _
47  , BYVAL Mds AS UInt16) AS ZSTRING PTR EXPORT
48 
49  RETURN Io->config(Samp, Mask, Tmr, Mds)
50 END FUNCTION
51 '&*/
52 
53 
54 '&char* pruio_Pin(pruIo* Io, uint8 Ball);/*
55 FUNCTION pruio_Pin CDECL ALIAS "pruio_Pin"( _
56  BYVAL Io AS PruIo PTR _
57  , BYVAL Ball AS UInt8 _
58  , BYVAL Mo AS UInt8) AS ZSTRING PTR EXPORT
59 
60  RETURN Io->Pin(Ball, Mo)
61 END FUNCTION
62 '&*/
63 
64 
65 '&char* pruio_mm_start(pruIo* Io, uint32 Trg1, uint32 Trg2, uint32 Trg3, uint32 Trg4);/*
66 FUNCTION pruio_mm_start CDECL ALIAS "pruio_mm_start"( _
67  BYVAL Io AS PruIo PTR _
68  , BYVAL Trg1 AS UInt32 _
69  , BYVAL Trg2 AS UInt32 _
70  , BYVAL Trg3 AS UInt32 _
71  , BYVAL Trg4 AS UInt32) AS ZSTRING PTR EXPORT
72 
73  RETURN Io->mm_start(Trg1, Trg2, Trg3, Trg4)
74 END FUNCTION
75 '&*/
76 
77 
78 '&char* pruio_rb_start(pruIo* Io);/*
79 FUNCTION pruio_rb_start CDECL ALIAS "pruio_rb_start"( _
80  BYVAL Io AS PruIo PTR) AS ZSTRING PTR EXPORT
81 
82  RETURN Io->rb_start()
83 END FUNCTION
84 '&*/
85 
86 
87 
88 '&char* pruio_adc_setStep(pruIo* Io, uint8 Stp, uint8 ChN, uint8 Av, uint8 SaD, uint32 OpD);/*
89 FUNCTION pruio_adc_setStep CDECL ALIAS "pruio_adc_setStep"( _
90  BYVAL Io AS PruIo PTR _
91  , BYVAL Stp AS UInt8 _
92  , BYVAL ChN AS UInt8 _
93  , BYVAL SaD AS UInt8 _
94  , BYVAL Av AS UInt8 _
95  , BYVAL OpD AS UInt32) AS ZSTRING PTR EXPORT
96 
97  RETURN Io->Adc->setStep(Stp, ChN, Av, SaD, OpD)
98 END FUNCTION
99 '&*/
100 
101 
102 '&uint32 pruio_adc_mm_trg_pin(pruIo* Io, uint8 Ball, uint8 GpioV, uint16 Skip);/*
103 FUNCTION pruio_adc_mm_trg_pin CDECL ALIAS "pruio_adc_mm_trg_pin"( _
104  BYVAL Io AS PruIo PTR _
105  , BYVAL Ball AS UInt8 _
106  , BYVAL GpioV AS UInt8 _
107  , BYVAL Skip AS UInt16) AS UInt32 EXPORT
108 
109  RETURN Io->Adc->mm_trg_pin(Ball, GpioV, Skip)
110 END FUNCTION
111 '&*/
112 
113 
114 '&uint32 pruio_adc_mm_trg_ain(pruIo* Io, uint8 Stp, int32 AdcV, uint8 Rela, uint16 Skip);/*
115 FUNCTION pruio_adc_mm_trg_ain CDECL ALIAS "pruio_adc_mm_trg_ain"( _
116  BYVAL Io AS PruIo PTR _
117  , BYVAL Stp AS UInt8 _
118  , BYVAL AdcV AS Int32 _
119  , BYVAL Rela AS UInt8 _
120  , BYVAL Skip AS UInt16) AS UInt32 EXPORT
121 
122  RETURN Io->Adc->mm_trg_ain(Stp, AdcV, Rela, Skip)
123 END FUNCTION
124 '&*/
125 
126 
127 '&uint32 pruio_adc_mm_trg_pre(pruIo* Io, uint8 Stp, int32 AdcV, uint16 Samp, uint8 Rela);/*
128 FUNCTION pruio_adc_mm_trg_pre CDECL ALIAS "pruio_adc_mm_trg_pre"( _
129  BYVAL Io AS PruIo PTR _
130  , BYVAL Stp AS UInt8 _
131  , BYVAL AdcV AS Int32 _
132  , BYVAL Samp AS UInt16 _
133  , BYVAL Rela AS UInt8) AS UInt32 EXPORT
134 
135  RETURN Io->Adc->mm_trg_pre(Stp, AdcV, Samp, Rela)
136 END FUNCTION
137 '&*/
138 
139 
140 
141 '&char* pruio_gpio_config(pruIo* Io, uint8 Ball, uint8 Modus);/*
142 FUNCTION pruio_gpio_config CDECL ALIAS "pruio_gpio_config"( _
143  BYVAL Io AS PruIo PTR _
144  , BYVAL Ball AS UInt8 _
145  , BYVAL Modus AS UInt8) AS ZSTRING PTR EXPORT
146 
147  RETURN Io->Gpio->config(Ball, Modus)
148 END FUNCTION
149 '&*/
150 
151 
152 '&char* pruio_gpio_setValue(pruIo* Io, uint8 Ball, uint8 Modus);/*
153 FUNCTION pruio_gpio_setValue CDECL ALIAS "pruio_gpio_setValue"( _
154  BYVAL Io AS PruIo PTR _
155  , BYVAL Ball AS UInt8 _
156  , BYVAL Modus AS UInt8) AS ZSTRING PTR EXPORT
157 
158  RETURN Io->Gpio->setValue(Ball, Modus)
159 END FUNCTION
160 '&*/
161 
162 
163 '&char* pruio_gpio_setValue(pruIo* Io, uint8 Indx);/*
164 FUNCTION pruio_gpio_flush CDECL ALIAS "pruio_gpio_flush"( _
165  BYVAL Io AS PruIo PTR _
166  , BYVAL Indx AS UInt8) AS ZSTRING PTR EXPORT
167 
168  RETURN Io->Gpio->flush(Indx)
169 END FUNCTION
170 '&*/
171 
172 
173 '&uint32 pruio_gpio_Value(pruIo* Io, uint8 Ball);/*
174 FUNCTION pruio_gpio_Value CDECL ALIAS "pruio_gpio_Value"( _
175  BYVAL Io AS PruIo PTR _
176  , BYVAL Ball AS UInt8) AS UInt32 EXPORT
177 
178  RETURN Io->Gpio->Value(Ball)
179 END FUNCTION
180 '&*/
181 
182 
183 
184 '&char* pruio_cap_config(pruIo* Io, uint8 Ball, float_t FLow);/*
185 FUNCTION pruio_cap_config CDECL ALIAS "pruio_cap_config"( _
186  BYVAL Io AS PruIo PTR _
187  , BYVAL Ball AS UInt8 _
188  , BYVAL FLow AS Float_t = 0.) AS ZSTRING PTR EXPORT
189 
190  RETURN Io->Cap->config(Ball, FLow)
191 END FUNCTION
192 '&*/
193 
194 
195 '&char* pruio_cap_Value(pruIo* Io, uint8 Ball, float_t* Hz, float_t* Du);/*
196 FUNCTION pruio_cap_Value CDECL ALIAS "pruio_cap_Value"( _
197  BYVAL Io AS PruIo PTR _
198  , BYVAL Ball AS UInt8 _
199  , BYVAL Hz AS Float_t PTR = 0 _
200  , BYVAL Du AS Float_t PTR = 0) AS ZSTRING PTR EXPORT
201 
202  RETURN Io->Cap->Value(Ball, Hz, Du)
203 END FUNCTION
204 '&*/
205 
206 
207 
208 '&char* pruio_qep_config(pruIo* Io, uint8 Ball, uint32 PMax, float_t VHz, float_t Scale, uint8 Mo);/*
209 FUNCTION pruio_qep_config CDECL ALIAS "pruio_qep_config"( _
210  BYVAL Io AS PruIo PTR _
211  , BYVAL Ball AS UInt8 _
212  , BYVAL PMax AS UInt32 = 0 _
213  , BYVAL VHz AS Float_t = 25. _
214  , BYVAL Scale AS Float_t = 1. _
215  , BYVAL Mo AS UInt8 = 0) AS ZSTRING PTR EXPORT
216 
217  RETURN Io->Qep->config(Ball, PMax, VHz, Scale, Mo)
218 END FUNCTION
219 '&*/
220 
221 
222 '&char* pruio_qep_Value(pruIo* Io, uint8 Ball, uint32* Posi, float_t* Velo);/*
223 FUNCTION pruio_qep_Value CDECL ALIAS "pruio_qep_Value"( _
224  BYVAL Io AS PruIo PTR _
225  , BYVAL Ball AS UInt8 _
226  , BYVAL Posi AS UInt32 PTR = 0 _
227  , BYVAL Velo AS Float_t PTR = 0) AS ZSTRING PTR EXPORT
228 
229  RETURN Io->Qep->Value(Ball, Posi, Velo)
230 END FUNCTION
231 '&*/
232 
233 
234 
235 '&char* pruio_pwm_Value(pruIo* Io, uint8 Ball, float_t* Hz, float_t* Du);/*
236 FUNCTION pruio_pwm_Value CDECL ALIAS "pruio_pwm_Value"( _
237  BYVAL Io AS PruIo PTR _
238  , BYVAL Ball AS UInt8 _
239  , BYVAL Hz AS Float_t PTR = 0 _
240  , BYVAL Du AS Float_t PTR = 0) AS ZSTRING PTR EXPORT
241 
242  RETURN Io->Pwm->Value(Ball, Hz, Du)
243 END FUNCTION
244 '&*/
245 
246 
247 '&char* pruio_pwm_setValue(pruIo* Io, uint8 Ball, float_t Hz, float_t Du);/*
248 FUNCTION pruio_pwm_setValue CDECL ALIAS "pruio_pwm_setValue"( _
249  BYVAL Io AS PruIo PTR _
250  , BYVAL Ball AS UInt8 _
251  , BYVAL Hz AS Float_t _
252  , BYVAL Du AS Float_t) AS ZSTRING PTR EXPORT
253 
254  RETURN Io->Pwm->setValue(Ball, Hz, Du)
255 END FUNCTION
256 '&*/
257 
258 
259 
260 '&char* pruio_tim_Value(pruIo* Io, uint8 Ball, float_t* Dur1, float_t* Dur2);/*
261 FUNCTION pruio_tim_Value CDECL ALIAS "pruio_tim_Value"( _
262  BYVAL Io AS PruIo PTR _
263  , BYVAL Ball AS UInt8 _
264  , BYVAL Dur1 AS Float_t PTR _
265  , BYVAL Dur2 AS Float_t PTR) AS ZSTRING PTR EXPORT
266 
267  RETURN Io->Tim->Value(Ball, Dur1, Dur2)
268 END FUNCTION
269 '&*/
270 
271 
272 '&char* pruio_tim_setValue(pruIo* Io, uint8 Ball, float_t Dur1, float_t Dur2, uint16 Mode);/*
273 FUNCTION pruio_tim_setValue CDECL ALIAS "pruio_tim_setValue"( _
274  BYVAL Io AS PruIo PTR _
275  , BYVAL Ball AS UInt8 _
276  , BYVAL Dur1 AS Float_t _
277  , BYVAL Dur2 AS Float_t _
278  , BYVAL Mode AS UInt16) AS ZSTRING PTR EXPORT
279 
280  RETURN Io->Tim->setValue(Ball, Dur1, Dur2, Mode)
281 END FUNCTION
282 '&*/
283 
284 
285