|
@@ -28,7 +28,7 @@ class foo(object):
|
|
|
self.__led_pin_button.init(mode=Pin.OUT)
|
|
|
self.__button.init(mode=Pin.IN)
|
|
|
self.__timer = Timer()
|
|
|
- self.__timer.init(mode=Timer.PERIODIC;period = 200,callback= self.__bliink_handler)
|
|
|
+ self.__timer.init(mode=Timer.PERIODIC,period = 200,callback= self.__blink_handler)
|
|
|
self.__button.irq(handler=self.__int_handler,hard=True,trigger=Pin.IRQ_FALLING)
|
|
|
|
|
|
############################## Property ##############################
|
|
@@ -53,8 +53,8 @@ class foo(object):
|
|
|
else:
|
|
|
return pin
|
|
|
|
|
|
-def __blink_handler(self,timer):
|
|
|
- self.__led_pin_timer.toggle()
|
|
|
-
|
|
|
-def __int_handler(self,pin):
|
|
|
- self.__led_pin_button.toggle()
|
|
|
+ def __blink_handler(self,timer):
|
|
|
+ self.__led_pin_timer.toggle()
|
|
|
+
|
|
|
+ def __int_handler(self,pin):
|
|
|
+ self.__led_pin_button.toggle()
|