Skip to content

Commit be5a74a

Browse files
committed
corrected return types and added 'Callable' as argument to check_timeout
1 parent e547653 commit be5a74a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adafruit_rfm69.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
pass
6363

6464
try:
65-
from typing import Optional, Type
65+
from typing import Callable, Optional, Type
6666
from circuitpython_typing import WriteableBuffer, ReadableBuffer
6767
from digitalio import DigitalInOut
6868
from busio import SPI
@@ -151,7 +151,7 @@ def ticks_diff(ticks1: int, ticks2: int) -> int:
151151
return diff
152152

153153

154-
def check_timeout(flag: int, limit: float) -> bool:
154+
def check_timeout(flag: Callable, limit: float) -> bool:
155155
"""test for timeout waiting for specified flag"""
156156
timed_out = False
157157
if HAS_SUPERVISOR:
@@ -738,11 +738,11 @@ def frequency_deviation(self, val: float) -> None:
738738
self._write_u8(_REG_FDEV_MSB, fdev >> 8)
739739
self._write_u8(_REG_FDEV_LSB, fdev & 0xFF)
740740

741-
def packet_sent(self) -> int:
741+
def packet_sent(self) -> bool:
742742
"""Transmit status"""
743743
return (self._read_u8(_REG_IRQ_FLAGS2) & 0x8) >> 3
744744

745-
def payload_ready(self) -> int:
745+
def payload_ready(self) -> bool:
746746
"""Receive status"""
747747
return (self._read_u8(_REG_IRQ_FLAGS2) & 0x4) >> 2
748748

0 commit comments

Comments
 (0)