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
27 RETURN NEW PruIo(Act, Av, OpD, SaD)
34 BYVAL Io
AS PruIo
PTR)
EXPORT
36 IF Io
THEN DELETE Io : Io = 0
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
49 RETURN Io->config(Samp, Mask, Tmr, Mds)
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
60 RETURN Io->Pin(Ball, Mo)
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
73 RETURN Io->mm_start(Trg1, Trg2, Trg3, Trg4)
80 BYVAL Io
AS PruIo
PTR)
AS ZSTRING PTR EXPORT
90 BYVAL Io
AS PruIo
PTR _
91 ,
BYVAL Stp
AS UInt8 _
92 ,
BYVAL ChN
AS UInt8 _
93 ,
BYVAL SaD
AS UInt8 _
95 ,
BYVAL OpD
AS UInt32)
AS ZSTRING PTR EXPORT
97 RETURN Io->Adc->setStep(Stp, ChN, Av, SaD, OpD)
104 BYVAL Io
AS PruIo
PTR _
105 ,
BYVAL Ball
AS UInt8 _
106 ,
BYVAL GpioV
AS UInt8 _
107 ,
BYVAL Skip
AS UInt16)
AS UInt32
EXPORT
109 RETURN Io->Adc->mm_trg_pin(Ball, GpioV, Skip)
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
122 RETURN Io->Adc->mm_trg_ain(Stp, AdcV, Rela, Skip)
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
135 RETURN Io->Adc->mm_trg_pre(Stp, AdcV, Samp, Rela)
143 BYVAL Io
AS PruIo
PTR _
144 ,
BYVAL Ball
AS UInt8 _
145 ,
BYVAL Modus
AS UInt8)
AS ZSTRING PTR EXPORT
147 RETURN Io->Gpio->config(Ball, Modus)
154 BYVAL Io
AS PruIo
PTR _
155 ,
BYVAL Ball
AS UInt8 _
156 ,
BYVAL Modus
AS UInt8)
AS ZSTRING PTR EXPORT
158 RETURN Io->Gpio->setValue(Ball, Modus)
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
168 RETURN Io->Gpio->flush(Indx)
175 BYVAL Io
AS PruIo
PTR _
176 ,
BYVAL Ball
AS UInt8)
AS UInt32
EXPORT
178 RETURN Io->Gpio->Value(Ball)
186 BYVAL Io
AS PruIo
PTR _
187 ,
BYVAL Ball
AS UInt8 _
188 ,
BYVAL FLow
AS Float_t = 0.)
AS ZSTRING PTR EXPORT
190 RETURN Io->Cap->config(Ball, FLow)
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
202 RETURN Io->Cap->Value(Ball, Hz, Du)
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
217 RETURN Io->Qep->config(Ball, PMax,
VHz, Scale, Mo)
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
229 RETURN Io->Qep->Value(Ball, Posi, Velo)
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
242 RETURN Io->Pwm->Value(Ball, Hz, Du)
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
254 RETURN Io->Pwm->setValue(Ball, Hz, Du)
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
267 RETURN Io->Tim->Value(Ball, Dur1, Dur2)
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
280 RETURN Io->Tim->setValue(Ball, Dur1, Dur2, Mode)