logo

帧中断程序,怎么使用帧中断程序呢?例程里的定时器中断也看不懂,求大佬指点!万分感谢

2019-10-15 19:07
7
openmv铁粉
# 定时器控制例子
#
# 这个例子展示了如何使用回调函数和定时器

import time
from pyb import Pin, Timer

def tick(timer):            # we will receive the timer object when being called
    print("Timer callback")

tim = Timer(4, freq=1)      # create a timer object using timer 4 - trigger at 1Hz
tim.callback(tick)          # set the callback to our tick function

while (True):
    time.sleep(1000)
:loudly_crying_face: :loudly_crying_face: :loudly_crying_face: :loudly_crying_face: :loudly_crying_face: :loudly_crying_face: :loudly_crying_face:
2019-10-16 09:08
I
网红小智智 星瞳科技

什么叫做“帧中断”?

2019-10-16 14:43
7
openmv铁粉

@kidswong999 就是每一帧数据传过来后自动进入一个中断函数里面,STM32有帧中断函数