libpruio  0.6.8
Fast and easy Digital/Analog Input/Output for Beaglebones
pruio_adc.bi
Go to the documentation of this file.
1 
9 
10 
11 
22 TYPE AdcSteps
23  AS UInt32 _
24  Confg _
25  , Delay
26 END TYPE
27 
28 
36 TYPE AdcSet
37  AS UInt32 _
38  DeAd _
39  , ClAd _
40  , ClVa
41 
42  AS UInt32 _
43  REVISION _
44  , SYSCONFIG _
45  , IRQSTATUS_RAW _
46  , IRQSTATUS _
47  , IRQENABLE_SET _
48  , IRQENABLE_CLR _
49  , IRQWAKEUP _
50  , DMAENABLE_SET _
51  , DMAENABLE_CLR _
52  , CTRL _
53  , ADCSTAT _
54  , ADCRANGE _
55  , ADC_CLKDIV _
56  , ADC_MISC _
57  , STEPENABLE _
58  , IDLECONFIG _
59 
60 
61  AS AdcSteps St_p(16)
62 
63  AS UInt32 _
64  FIFO0COUNT _
65  , FIFO0THRESHOLD _
66  , DMA0REQ _
67  , FIFO1COUNT _
68  , FIFO1THRESHOLD _
69  , DMA1REQ
70 END TYPE
71 
72 
79 TYPE AdcUdt
80  AS Pruio_ PTR Top
81  AS AdcSet PTR _
82  Init _
83  , Conf
84  AS UInt32 _
85  Samples _
86  , TimerVal _
87  , InitParA
88  AS UInt16 _
89  LslMode _
90  , ChAz
91  AS UInt16 PTR _
92  Value
93  AS ZSTRING PTR _
94  E0 = @"step number too big" _
95  , E1 = @"channel number too big" _
96  , E2 = @"too much values to skip" _
97  , E3 = @"trigger step not configured" _
98  , E4 = @"invalid step number" _
99  , E5 = @"ADC not enabled"
100 
101  DECLARE CONSTRUCTOR (BYVAL AS Pruio_ PTR )
102  DECLARE FUNCTION initialize CDECL( _
103  BYVAL AS UInt8 = PRUIO_DEF_AVRAGE _
104  , BYVAL AS UInt32 = PRUIO_DEF_ODELAY _
105  , BYVAL AS UInt8 = PRUIO_DEF_SDELAY) AS ZSTRING PTR
106  DECLARE FUNCTION configure CDECL( _
107  BYVAL AS UInt32 = PRUIO_DEF_SAMPLS _
108  , BYVAL AS UInt32 = PRUIO_DEF_STPMSK _
109  , BYVAL AS UInt32 = PRUIO_DEF_TIMERV _
110  , BYVAL AS UInt16 = PRUIO_DEF_LSLMOD) AS ZSTRING PTR
111  DECLARE FUNCTION setStep CDECL( _
112  BYVAL AS UInt8 _
113  , BYVAL AS UInt8 _
114  , BYVAL AS UInt8 = PRUIO_DEF_AVRAGE _
115  , BYVAL AS UInt8 = PRUIO_DEF_SDELAY _
116  , BYVAL AS UInt32 = PRUIO_DEF_ODELAY) AS ZSTRING PTR
117  DECLARE FUNCTION mm_trg_pin CDECL( _
118  BYVAL AS UInt8 _
119  , BYVAL AS UInt8 = 0 _
120  , BYVAL AS UInt16 = 0) AS UInt32
121  DECLARE FUNCTION mm_trg_ain CDECL( _
122  BYVAL AS UInt8 _
123  , BYVAL AS Int32 _
124  , BYVAL AS UInt8 = 0 _
125  , BYVAL AS UInt16 = 0) AS UInt32
126  DECLARE FUNCTION mm_trg_pre CDECL( _
127  BYVAL AS UInt8 _
128  , BYVAL AS Int32 _
129  , BYVAL AS UInt16 = 0 _
130  , BYVAL AS UInt8 = 0) AS UInt32
131 END TYPE
132