@@ -66,7 +66,7 @@ def init_signals():
6666 pass
6767
6868
69- def rx_callback (device: pyhackrf.PyHackrfDevice , buffer: np.ndarray[: ], buffer_length: int , valid_length: int ):
69+ cdef rx_callback(device: pyhackrf.PyHackrfDevice, buffer : np.ndarray[np.uint8_t, 1 ], buffer_length: int , valid_length: int ):
7070 global run_available, device_data
7171
7272 if not run_available[device.serialno]:
@@ -97,7 +97,7 @@ def rx_callback(device: pyhackrf.PyHackrfDevice, buffer: np.ndarray[:], buffer_l
9797 return 0
9898
9999
100- def tx_callback (device: pyhackrf.PyHackrfDevice , buffer: np.ndarray[: ], buffer_length: int , valid_length: int ):
100+ cdef tx_callback(device: pyhackrf.PyHackrfDevice, buffer : np.ndarray[np.uint8_t, 1 ], buffer_length: int , valid_length: int ):
101101 global run_available, device_data
102102
103103 current_device_data = device_data[device.serialno]
@@ -205,7 +205,7 @@ def tx_callback(device: pyhackrf.PyHackrfDevice, buffer: np.ndarray[:], buffer_l
205205 return 0 , buffer , valid_length
206206
207207
208- def tx_complete_callback (device: pyhackrf.PyHackrfDevice , buffer: np.ndarray[: ], buffer_length: int , valid_length: int , success: int ):
208+ cdef tx_complete_callback(device: pyhackrf.PyHackrfDevice, buffer : np.ndarray[np.uint8_t, 1 ], buffer_length: int , valid_length: int , success: int ):
209209 global run_available, device_data
210210
211211 if not success:
@@ -218,7 +218,7 @@ def tx_complete_callback(device: pyhackrf.PyHackrfDevice, buffer: np.ndarray[:],
218218 current_device_data[' stream_power' ] += np.sum(buffer [:valid_length].view(np.int8).astype(np.uint64, copy = False ) ** 2 )
219219
220220
221- def flush_callback (device: pyhackrf.PyHackrfDevice , success: int ):
221+ cdef flush_callback(device: pyhackrf.PyHackrfDevice, success: int ):
222222 global run_available, device_data
223223
224224 current_device_data = device_data[device.serialno]
0 commit comments