nrf24.py 文件源码

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

项目:delight-diploma-thesis 作者: alexpeits 项目源码 文件源码
def irqWait(self, timeout = 30000):
        # CHANGE: detect module name because wait_for_edge is not available in
        # other libraries
        if GPIO.__name__ != "Adafruit_BBIO.GPIO":
            return False

        # TODO: A race condition may occur here.
        if GPIO.input(self.irq_pin) == 0: # Pin is already down. Packet is waiting?
            return True

        return GPIO.wait_for_edge(self.irq_pin, GPIO.FALLING, timeout) == 1
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号