File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 88"""
99
1010from ctypes import *
11+ from picosdk .ctypes_wrapper import C_CALLBACK_FUNCTION_FACTORY
1112from picosdk .library import Library
1213from picosdk .constants import make_enum
1314
@@ -103,6 +104,16 @@ def process_enum(enum):
103104
104105ps4000 .PICO_VOLTAGE_RANGE = process_enum (ps4000 .PS4000_RANGE )
105106
107+ ps4000 .PS4000_TIME_UNITS = make_enum ([
108+ 'PS4000_FS' ,
109+ 'PS4000_PS' ,
110+ 'PS4000_NS' ,
111+ 'PS4000_US' ,
112+ 'PS4000_MS' ,
113+ 'PS4000_S' ,
114+ 'PS4000_MAX_TIME_UNITS' ,
115+ ])
116+
106117doc = """ PICO_STATUS ps4000OpenUnit
107118 (
108119 int16_t *handle
@@ -614,6 +625,32 @@ def process_enum(enum):
614625 ); """
615626ps4000 .make_symbol ("_GetStreamingLatestValues" , "ps4000GetStreamingLatestValues" , c_uint32 ,
616627 [c_int16 , c_void_p , c_void_p ], doc )
628+
629+ doc = """ void *ps4000StreamingReady
630+ (
631+ int16_t handle,
632+ int32_t noOfSamples,
633+ uint32_t startIndex,
634+ int16_t overflow,
635+ uint32_t triggerAt,
636+ int16_t triggered,
637+ int16_t autoStop,
638+ void *pParameter
639+ );
640+ define a python function which accepts the correct arguments, and pass it to the constructor of this type.
641+ """
642+
643+ ps4000 .StreamingReadyType = C_CALLBACK_FUNCTION_FACTORY (None ,
644+ c_int16 ,
645+ c_int32 ,
646+ c_uint32 ,
647+ c_int16 ,
648+ c_uint32 ,
649+ c_int16 ,
650+ c_int16 ,
651+ c_void_p )
652+
653+ ps4000 .StreamingReadyType .__doc__ = doc
617654
618655doc = """ PICO_STATUS ps4000NoOfStreamingValues
619656 (
You can’t perform that action at this time.
0 commit comments