Skip to content

Commit 24c8097

Browse files
author
neil.hamilton
committed
Add BlockReady callback function to ps5000a.py
1 parent facdae3 commit 24c8097

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

picosdk/ps5000a.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -706,20 +706,20 @@ class PS5000A_PWQ_CONDITIONS (Structure):
706706

707707
ps5000a.StreamingReadyType.__doc__ = doc
708708

709-
# TODO sort out how to make a callback for a C function in ctypes!
710-
# doc = """ void *ps5000aStreamingReady
711-
# (
712-
# int16_t handle,
713-
# int32_t noOfSamples,
714-
# uint32_t startIndex,
715-
# int16_t overflow,
716-
# uint32_t triggerAt,
717-
# int16_t triggered,
718-
# int16_t autoStop,
719-
# void *pParameter
720-
# ); """
721-
# ps5000a.make_symbol("_StreamingReady", "ps5000aStreamingReady", c_void_p,
722-
# [c_int16, c_int32, c_uint32, c_int16, c_uint32, c_int16, c_int16, c_void_p], doc)
709+
doc = """void *ps5000aBlockReady
710+
(
711+
int16_t handle,
712+
PICO_STATUS status,
713+
void *pParameter
714+
);
715+
"""
716+
717+
ps5000a.BlockReadyType = C_CALLBACK_FUNCTION_FACTORY(None,
718+
c_int16,
719+
c_int32,
720+
c_void_p)
721+
722+
ps5000a.BlockReadyType.__doc__ = doc
723723

724724
doc = """ PICO_STATUS ps5000aNoOfStreamingValues
725725
(

0 commit comments

Comments
 (0)