led.py 文件源码

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

项目:PyLetMeCreate 作者: CreatorDev 项目源码 文件源码
def get_mode(index):
    """Returns the mode of a LED.

    The LED must be initialised before calling this function.

    index: must be an integer in range 0..7

    Note: An exception is thrown if it fails to retrieve the mode of a LED.
    """
    mode = ctypes.c_uint8(0)
    ret = _LIB.led_get_mode(index, ctypes.byref(mode))
    if ret < 0:
        raise Exception("led get mode failed")
    return mode.value
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号