libpruio  0.6.8
Fast and easy Digital/Analog Input/Output for Beaglebones
dts_universal.bas
Go to the documentation of this file.
1 
91 
92 
93 #INCLUDE ONCE "pruiotools.bas"
94 
95 '''''''''''''''''''''''''''''''''''''''''''''''''''''''' adapt this code
96 
97 
98 #DEFINE FILE_NAME "libpruio"
99 
100 #DEFINE VERS_NAME "00A0"
101 
102 VAR TARG_PATH = "/lib/firmware/"
103 
104 VAR COMPATIBL = "ti,beaglebone-black"
105 
106 ' quick & dirty: first create settings for all pins ...
107 #INCLUDE ONCE "P8.bi"
108 #INCLUDE ONCE "P9.bi"
109 #INCLUDE ONCE "JT.bi"
110 #INCLUDE ONCE "SD.bi"
111 
112 ''''''''''''''''''' ... then delete unwanted pin groups (or single pins)
113 SELECT CASE UCASE(COMMAND(2))
114 CASE "BBW"
115  PIN_DEL(EMMC2_Pins)
116  'PIN_DEL(I2C1_Pins)
117  'PIN_DEL(MCASP0_Pins)
118  COMPATIBL = "ti,beaglebone-white"
119 CASE "BBG"
120  PIN_DEL(EMMC2_Pins)
121  'PIN_DEL(I2C1_Pins)
122  'PIN_DEL(MCASP0_Pins)
123  COMPATIBL = "ti,beaglebone-green"
124 CASE "ALL" ' all pins
125 CASE ELSE ' default is BBB
126  PIN_DEL(HDMI_Pins)
127  PIN_DEL(EMMC2_Pins)
128  'PIN_DEL(I2C1_Pins)
129  'PIN_DEL(I2C2_Pins)
130  PIN_DEL(MCASP0_Pins)
131  M(P8_25) = "" ' #4:BB-BONE-EMMC-2G
132  COMPATIBL = "ti,beaglebone-black"
133 END SELECT
134 ''''''''''''''''''''''''''''''''''''''''''''''''''''''' end of adaptions
135 
136 CREATE()
137