File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 19
19
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
20
# THE SOFTWARE.
21
21
22
- import Adafruit_GPIO .platform_detect as pd
22
+ import Adafruit_GPIO .Platform as Platform
23
23
24
24
25
25
OUT = 0
@@ -135,12 +135,12 @@ def get_platform_gpio(**keywords):
135
135
exception if a GPIO instance can't be created for the current platform. The
136
136
returned GPIO object is an instance of BaseGPIO.
137
137
"""
138
- plat = pd .platform_detect ()
139
- if plat == pd .RASPBERRY_PI :
138
+ plat = Platform .platform_detect ()
139
+ if plat == Platform .RASPBERRY_PI :
140
140
import RPi .GPIO
141
141
return RPiGPIOAdapter (RPi .GPIO , ** keywords )
142
- elif plat == pd .BEAGLEBONE_BLACK :
142
+ elif plat == Platform .BEAGLEBONE_BLACK :
143
143
import Adafruit_BBIO .GPIO
144
144
return AdafruitBBIOAdapter (Adafruit_BBIO .GPIO , ** keywords )
145
- elif plat == pd .UNKNOWN :
145
+ elif plat == Platform .UNKNOWN :
146
146
raise RuntimeError ('Could not determine platform.' )
You can’t perform that action at this time.
0 commit comments