def get_measure():
"""Read 12bit measurement from LIN Hall Click.
Note: An exception is thrown if it fails.
"""
measure = ctypes.c_uint16(0)
ret = _LIB.lin_hall_click_get_measure(ctypes.byref(measure))
if ret < 0:
raise Exception("LIN HALL get measure failed")
return measure.value
评论列表
文章目录