Browse Source

Reverted to package

master^2
Cefn Hoile 3 years ago
parent
commit
69419947ae
1 changed files with 0 additions and 26 deletions
  1. +0
    -26
      src/microcontroller.py

+ 0
- 26
src/microcontroller.py View File

@ -1,26 +0,0 @@
from adafruit_blinka import Enum, agnostic
class Pin(Enum):
def __init__(self, id):
"""Identifier for pin, referencing platform-specific pin id"""
self.id = id
def __repr__(self):
import board
for key in dir(board):
if getattr(board, key) is self:
return "board.{}".format(key)
import microcontroller
for key in dir(microcontroller):
if getattr(microcontroller, key) is self:
return "microcontroller.{}".format(key)
return repr(self)
if agnostic.microcontroller == "esp8266":
from adafruit_blinka.microcontroller.esp8266 import *
elif agnostic.microcontroller == "stm32":
from adafruit_blinka.microcontroller.stm32 import *
else:
raise NotImplementedError("Microcontroller not supported")

Loading…
Cancel
Save