Kaynağa Gözat

update examples/Device/GPIO_CALLBCK.py.

Signed-off-by: 李昂 <liang6516@outlook.com>
李昂 3 yıl önce
ebeveyn
işleme
6c1d9ebc81
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      examples/Device/GPIO_CALLBCK.py

+ 1 - 1
examples/Device/GPIO_CALLBCK.py

@@ -9,7 +9,7 @@ io.enable()
 def cb1(signal):
     print('cb1', signal)
 
-io.addEventCallBack(cb1, io.SIGNAL_FALLING)
+io.setCallBack(cb1, io.SIGNAL_FALLING)
 
 while True:
     pass