|
|
@@ -74,7 +74,7 @@ class GPIO(BaseDev):
|
|
|
SIGNAL_FALLING: int
|
|
|
SIGNAL_ANY: int
|
|
|
|
|
|
- def setCallBack(self, eventCallBack: any, filter: int):
|
|
|
+ def setCallback(self, eventCallBack: any, filter: int):
|
|
|
"""
|
|
|
Add a callback function to the pin.
|
|
|
Example:
|
|
|
@@ -87,6 +87,11 @@ class GPIO(BaseDev):
|
|
|
The callback function will be called when the signal is triggered.
|
|
|
"""
|
|
|
|
|
|
+ def setCallBack(self, eventCallBack: any, filter: int):
|
|
|
+ """
|
|
|
+ deprecated, you can use `setCallback` instead.
|
|
|
+ """
|
|
|
+
|
|
|
def close(self): ...
|
|
|
|
|
|
def platformHigh(self): ...
|
|
|
@@ -234,7 +239,7 @@ class UART:
|
|
|
SIGNAL_RX: int
|
|
|
SIGNAL_TX: int
|
|
|
|
|
|
- def setCallBack(self, eventCallBack: any, filter: int):
|
|
|
+ def setCallback(self, eventCallBack: any, filter: int):
|
|
|
"""
|
|
|
Add a callback function to the pin.
|
|
|
Example:
|
|
|
@@ -245,6 +250,11 @@ class UART:
|
|
|
```
|
|
|
"""
|
|
|
|
|
|
+ def setCallBack(self, eventCallBack: any, filter: int):
|
|
|
+ """
|
|
|
+ deprecated, you can use `setCallback` instead.
|
|
|
+ """
|
|
|
+
|
|
|
@abstractmethod
|
|
|
def platformEnable(self): ...
|
|
|
|
|
|
@@ -502,9 +512,12 @@ class CAN(BaseDev):
|
|
|
|
|
|
class BaseDev:
|
|
|
@PIKA_C_MACRO_IF("PIKA_EVENT_ENABLE")
|
|
|
- def addEventCallBack(self, eventCallback: any):
|
|
|
+ def addEventCallback(self, eventCallback: any):
|
|
|
""" Add an event callback. """
|
|
|
|
|
|
+ def addEventCallBack(self, eventCallback: any):
|
|
|
+ """ deprecated, use addEventCallback instead. """
|
|
|
+
|
|
|
@abstractmethod
|
|
|
@PIKA_C_MACRO_IF("PIKA_EVENT_ENABLE")
|
|
|
def platformGetEventId(self): ...
|