gpio.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:PyLetMeCreate 作者: CreatorDev 项目源码 文件源码
def get_pin(mikrobus_index, pin_type):
    """Returns GPIO index of a pin on provided mikrobus

    Note: An exception is thrown if the gpio cannot be found.
    """
    pin = ctypes.c_uint8(0)
    ret = _LIB.gpio_get_pin(mikrobus_index, pin_type, ctypes.byref(pin))
    if ret < 0:
        raise Exception("gpio get pin failed")
    return pin.value
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号