def timeseq_isr(self,p):
'''compute edge to edge transition time, ignore polarity'''
e=self.ticks_us()
self.dbgport.high()
s=2*p.value()-1
d=self.ticks_diff(e,self.ledge)
self.ledge=e
self.buf[self.wptr]=d*s
self.wptr=(self.wptr+1)&self.MASK
self.dbgport.low()
评论列表
文章目录