adc.py 文件源码

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

项目:PyLetMeCreate 作者: CreatorDev 项目源码 文件源码
def get_raw_value(channel):
    """Read raw value from ADC Click in range 0..4095

    channel: must be in range 0-3. Channel 2 is not available on Ci40.

    Note: An exception is thrown if it fails to communicate with the click.
    """
    value = ctypes.c_uint16(0)
    ret = _LIB.adc_click_get_raw_value(channel, ctypes.byref(value))
    if ret < 0:
        raise Exception("adc click get raw value failed")
    return value.value
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号