]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Merge pull request #247 from yeyeto2788/busio_fix
authorMelissa LeBlanc-Williams <melissa@adafruit.com>
Mon, 24 Feb 2020 20:03:35 +0000 (12:03 -0800)
committerGitHub <noreply@github.com>
Mon, 24 Feb 2020 20:03:35 +0000 (12:03 -0800)
Fix busio board detection for Orange Pi boards.

setup.py
src/_bleio.py [deleted file]
src/adafruit_blinka/microcontroller/mcp2221/mcp2221.py
src/board.py

index 9f1e8ef15decde313b6983a92cbf3805cb02306d..073fd1897dce079dcf7fbb47178d902a40ece2c8 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -44,7 +44,7 @@ setup(
     packages=find_packages("src"),
     # py_modules lists top-level single file packages to include.
     # find_packages only finds packages in directories with __init__.py files.
-    py_modules=['_bleio', 'analogio', 'bitbangio', 'board', 'busio', 'digitalio', 'micropython', 'pulseio', 'neopixel_write'],
+    py_modules=['analogio', 'bitbangio', 'board', 'busio', 'digitalio', 'micropython', 'pulseio', 'neopixel_write'],
     package_data={'adafruit_blinka.microcontroller.bcm283x.pulseio': ['libgpiod_pulsein']},
     install_requires=[
         "Adafruit-PlatformDetect",
@@ -60,7 +60,7 @@ setup(
         'License :: OSI Approved :: MIT License',
         'Programming Language :: Python',
         'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.4',
+        'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: Implementation :: MicroPython',
     ],
 )
diff --git a/src/_bleio.py b/src/_bleio.py
deleted file mode 100755 (executable)
index d6c1426..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-"""This is a stub of _bleio for use in GitHub Actions CI. It is NOT meant to provide _bleio
-   functionality in CPython."""
-
-adapter = None
-
-class Attribute:
-    NO_ACCESS = 0
-    OPEN = 0
-    ENCRYPT_NO_MITM = 0
-    ENCRYPT_WITH_MITM = 0
-    LESC_ENCRYPT_WITH_MITM = 0
-    SIGNED_NO_MITM = 0
-    SIGNED_WITH_MITM = 0
-
-class UUID:
-    def __init__(self, uuid):
-        pass
-
-class Descriptor:
-    @staticmethod
-    def add_to_characteristic(characteristic, uuid, *, read_perm=Attribute.OPEN,
-                              write_perm=Attribute.OPEN, max_length=20, fixed_length=False,
-                              initial_value=b''):
-        pass
-
-class CharacteristicBuffer:
-    pass
-
-class PacketBuffer:
-    pass
-
-class Characteristic:
-    BROADCAST = 0
-    READ = 0
-    WRITE = 0
-    NOTIFY = 0
-    INDICATE = 0
-    WRITE_NO_RESPONSE = 0
-
-    @staticmethod
-    def add_to_service(service, uuid, *, properties=0, read_perm=Attribute.OPEN,
-                       write_perm=Attribute.OPEN, max_length=20, fixed_length=False,
-                       initial_value=None):
-        raise NotImplementedError()
-
-
index 3cfb46be33e4c9358959fece3abca9ba5542e4c1..0cddf42eeac253dc72bc277099e7986734f949da 100644 (file)
@@ -2,10 +2,10 @@ import os
 import time
 import hid
 
-# Small values seem to help on some Windows setups
+# Here if you need it
 MCP2221_HID_DELAY = float(os.environ.get('BLINKA_MCP2221_HID_DELAY', 0))
-# Windows also seems to want some time after a reset
-MCP2221_RESET_DELAY = float(os.environ.get('BLINKA_MCP2221_RESET_DELAY', 0.1))
+# Use to set delay between reset and device reopen
+MCP2221_RESET_DELAY = float(os.environ.get('BLINKA_MCP2221_RESET_DELAY', 0.5))
 
 # from the C driver
 # http://ww1.microchip.com/downloads/en/DeviceDoc/mcp2221_0_1.tar.gz
index d30f631d168d83ed882517964ab2d4094309477f..c804bb8dacba7653843992ac19e2f0758399485f 100755 (executable)
@@ -66,7 +66,8 @@ elif board_id == ap_board.BEAGLEBONE_BLACK_INDUSTRIAL:
 
 elif board_id == ap_board.BEAGLEBONE_GREEN_WIRELESS:
     from adafruit_blinka.board.beagleboard.beaglebone_black import *
-
+elif board_id == ap_board.BEAGLEBONE_BLACK_WIRELESS:
+    from adafruit_blinka.board.beagleboard.beaglebone_black import *
 elif board_id == ap_board.BEAGLEBONE_POCKETBEAGLE:
     from adafruit_blinka.board.beagleboard.beaglebone_pocketbeagle import *