CircuitPython/digitalio.py

Sun, 04 Apr 2021 16:54:03 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 04 Apr 2021 16:54:03 +0200
changeset 11
c8198736bff3
parent 7
e336d6afc5a6
permissions
-rw-r--r--

Updated BBC micro:bit APIs for V2.

# -*- coding: utf-8 -*-

# Copyright (c) 2019 Detlev Offenbach <detlev@die-offenbachs.de>
#

"""
Module containing stubs for API generation of the 'digitalio' module.
"""

class DriveMode():
    PUSH_PULL = 0
    OPEN_DRAIN = 0

class DigitalInOut():
    direction = 0
    value = 0
    drive_mode = 0
    pull = 0
    
    def __init__(self, pin):
        pass
    
    def deinit(self):
        pass
    
    def switch_to_output(self, value=False, drive_mode=DriveMode.PUSH_PULL):
        pass
    
    def switch_to_input(self, pull=None):
        pass

class Pull():
    UP = 0
    DOWN = 0

eric ide

mercurial