libpruio
0.6.8
Fast and easy Digital/Analog Input/Output for Beaglebones
pruio_globals.bi
Go to the documentation of this file.
1
8
9
' Common macros, shared with PRU pasm compiler
10
#INCLUDE ONCE
"
pruio.hp
"
11
12
13
'#DEFINE NULL CAST(ANY PTR, 0)
14
CONST AS
ANY
PTR
NULL
= 0
15
16
17
CONST AS DOUBLE
LOG2
=
LOG
(2)
18
19
20
#DEFINE
PRUIO_DEF_AVRAGE 4
21
22
#DEFINE
PRUIO_DEF_ODELAY 183
23
24
#DEFINE
PRUIO_DEF_SDELAY 0
25
26
#DEFINE
PRUIO_DEF_SAMPLS 1
27
28
#DEFINE
PRUIO_DEF_STPMSK &b111111110
29
30
#DEFINE
PRUIO_DEF_TIMERV 0
31
32
#DEFINE
PRUIO_DEF_LSLMOD 4
33
34
#DEFINE
PRUIO_DEF_CLKDIV 0
35
36
37
#DEFINE
ModeCheck(_B_,_M_) (.BallConf[_B_]
AND
&b111) <> _M_
38
39
#DEFINE
ModeSet(_B_,_M_)
IF
.setPin(Top, _B_, _M_)
THEN RETURN
.Errr
40
41
#DEFINE
PruReady(_I_)
WHILE
.DRam[1] : .WaitCycles += _I_ :
WEND
42
43
TYPE
AS BYTE
Int8
44
TYPE
AS SHORT
Int16
45
TYPE
AS LONG
Int32
46
TYPE
AS UBYTE
UInt8
47
TYPE
AS USHORT
UInt16
48
TYPE
AS ULONG
UInt32
49
TYPE
AS SINGLE
Float_t
50
51
TYPE
AS
PruIo
Pruio_
52
TYPE
AS
AdcUdt
AdcUdt_
53
TYPE
AS
GpioUdt
GpioUdt_
54
TYPE
AS
PwmssUdt
PwmssUdt_
55
TYPE
AS
PwmMod
PwmMod_
56
TYPE
AS
CapMod
CapMod_
57
TYPE
AS
QepMod
QepMod_
58
TYPE
AS
TimerUdt
TimerUdt_
59
60
61
ENUM
PinMuxing
62
PRUIO_PULL_DOWN
= &b000000
63
PRUIO_NO_PULL
= &b001000
64
PRUIO_PULL_UP
= &b010000
65
PRUIO_RX_ACTIV
= &b100000
66
PRUIO_GPIO_OUT0
= 7 +
PRUIO_NO_PULL
67
PRUIO_GPIO_OUT1
= 7 +
PRUIO_NO_PULL
+ 128
68
PRUIO_GPIO_IN
= 7 +
PRUIO_NO_PULL
+
PRUIO_RX_ACTIV
69
PRUIO_GPIO_IN_0
= 7 +
PRUIO_PULL_DOWN
+
PRUIO_RX_ACTIV
70
PRUIO_GPIO_IN_1
= 7 +
PRUIO_PULL_UP
+
PRUIO_RX_ACTIV
71
PRUIO_PIN_RESET = &hFF
72
END ENUM
73
src
pruio
pruio_globals.bi
Generated on Thu May 11 2023 12:42:51 for libpruio by
1.9.1