Skip to content

Commit 9079d68

Browse files
author
neil.hamilton
committed
Add all functions to psospa.py
1 parent 85111f5 commit 9079d68

File tree

1 file changed

+308
-2
lines changed

1 file changed

+308
-2
lines changed

picosdk/psospa.py

Lines changed: 308 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,34 @@ def __init__(self):
1919

2020
psospa = Psospalib()
2121

22+
doc = """ void psospaBlockReady
23+
(
24+
int16_t handle,
25+
PICO_STATUS status,
26+
PICO_POINTER pParameter
27+
); """
28+
psospa.BlockReadyType = C_CALLBACK_FUNCTION_FACTORY(None,
29+
c_int16,
30+
c_uint32,
31+
c_void_p)
32+
psospa.BlockReadyType.__doc__ = doc
33+
34+
doc = """ void psospaDataReady
35+
(
36+
int16_t handle,
37+
PICO_STATUS status,
38+
uint64_t noOfSamples,
39+
int16_t overflow,
40+
PICO_POINTER pParameter
41+
); """
42+
psospa.DataReadyType = C_CALLBACK_FUNCTION_FACTORY(None,
43+
c_int16,
44+
c_uint32,
45+
c_uint64,
46+
c_int16,
47+
c_void_p)
48+
psospa.DataReadyType.__doc__ = doc
49+
2250
doc = """ PICO_STATUS psospaOpenUnit
2351
(
2452
int16_t* handle,
@@ -426,7 +454,7 @@ def __init__(self):
426454
int32_t nSamples,
427455
PICO_DATA_TYPE dataType,
428456
uint64_t waveform,
429-
PICO_RATIO_MODE downSampleRationMode,
457+
PICO_RATIO_MODE downSampleRatioMode,
430458
PICO_ACTION action
431459
); """
432460
psospa.make_symbol("psospaSetDataBuffers", c_uint32, [c_int16, c_uint32, c_uint32, c_uint32, c_int32, c_uint32, c_uint64, c_uint32, c_uint32], doc)
@@ -442,4 +470,282 @@ def __init__(self):
442470
psospaBlockReady lpReady,
443471
PICO_POINTER pParameter
444472
); """
445-
psospa.make_symbol("psospaRunBlock", c_uint32, [c_int16, c_uint64, c_uint64, c_uint32, c_void_p, c_uint64, c_void_p, c_uint32], doc)
473+
psospa.make_symbol("psospaRunBlock", c_uint32, [c_int16, c_uint64, c_uint64, c_uint32, c_void_p, c_uint64, c_void_p, c_uint32], doc)
474+
475+
doc = """ PICO_STATUS psospaIsReady
476+
(
477+
int16_t handle,
478+
int16_t* ready
479+
); """
480+
psospa.make_symbol("psospaIsReady", c_uint32, [c_int16, c_void_p], doc)
481+
482+
doc = """ PICO_STATUS psospaRunStreaming
483+
(
484+
int16_t handle,
485+
double* sampleInterval,
486+
PICO_TIME_UNITS sampleIntervalTimeUnits,
487+
uint64_t maxPreTriggerSamples,
488+
uint64_t maxPostPreTriggerSamples,
489+
int16_t autoStop,
490+
uint64_t downSampleRatio,
491+
PICO_RATIO_MODE downSampleRatioMode
492+
); """
493+
psospa.make_symbol("psospaRunStreaming", c_uint32, [c_int16, c_void_p, c_uint32, c_uint64, c_uint64, c_int16, c_uint64, c_uint32], doc)
494+
495+
doc = """ PICO_STATUS psospaGetStreamingLatestValues
496+
(
497+
int16_t handle,
498+
PICO_STREAMING_DATA_INFO* streamingDataInfo,
499+
uint64_t nStreamingDataInfos,
500+
PICO_STREAMING_DATA_TRIGGER_INFO* triggerInfo
501+
); """
502+
psospa.make_symbol("psospaGetStreamingLatestValues", c_uint32, [c_int16, c_void_p, c_uint64, c_void_p], doc)
503+
504+
doc = """ PICO_STATUS psospaNoOfStreamingValues
505+
(
506+
int16_t handle,
507+
uint64_t* noOfValues
508+
); """
509+
psospa.make_symbol("psospaNoOfStreamingValues", c_uint32, [c_int16, c_void_p], doc)
510+
511+
doc = """ PICO_STATUS psospaGetValues
512+
(
513+
int16_t handle,
514+
uint64_t startIndex,
515+
uint64_t* noOfSamples,
516+
uint64_t downSampleRatio,
517+
PICO_RATIO_MODE downSampleRatioMode,
518+
uint64_t segmentIndex,
519+
int16_t* overflow
520+
); """
521+
psospa.make_symbol("psospaGetValues", c_uint32, [c_int16, c_uint64, c_void_p, c_uint64, c_uint32, c_uint64, c_void_p], doc)
522+
523+
doc = """ PICO_STATUS psospaGetValuesBulk
524+
(
525+
int16_t handle,
526+
uint64_t startIndex,
527+
uint64_t* noOfSamples,
528+
uint64_t fromSegmentIndex,
529+
uint64_t toSegmentIndex,
530+
uint64_t downSampleRatio,
531+
PICO_RATIO_MODE downSampleRatioMode,
532+
int16_t* overflow
533+
); """
534+
psospa.make_symbol("psospaGetValuesBulk", c_uint32, [c_int16, c_uint64, c_void_p, c_uint64, c_uint64, c_uint64, c_uint32, c_void_p], doc)
535+
536+
doc = """ PICO_STATUS psospaGetValuesAsync
537+
(
538+
int16_t handle,
539+
uint64_t startIndex,
540+
uint64_t noOfSamples,
541+
uint64_t downSampleRatio,
542+
PICO_RATIO_MODE downSampleRatioMode,
543+
uint64_t segmentIndex,
544+
PICO_POINTER lpDataReady,
545+
PICO_POINTER pParameter
546+
); """
547+
psospa.make_symbol("psospaGetValuesAsync", c_uint32, [c_int16, c_uint64, c_uint64, c_uint64, c_uint32, c_uint64, c_void_p, c_void_p], doc)
548+
549+
doc = """ PICO_STATUS psospaGetValuesBulkAsync
550+
(
551+
int16_t handle,
552+
uint64_t startIndex,
553+
uint64_t noOfSamples,
554+
uint64_t fromSegmentIndex,
555+
uint64_t toSegmentIndex,
556+
uint64_t downSampleRatio,
557+
PICO_RATIO_MODE downSampleRatioMode,
558+
PICO_POINTER lpDataReady,
559+
PICO_POINTER pParameter
560+
); """
561+
psospa.make_symbol("psospaGetValuesBulkAsync", c_uint32, [c_int16, c_uint64, c_uint64, c_uint64, c_uint64, c_uint64, c_void_p, c_void_p], doc)
562+
563+
doc = """ PICO_STATUS psospaGetValuesOverlapped
564+
(
565+
int16_t handle,
566+
uint64_t startIndex,
567+
uint64_t* noOfSamples,
568+
uint64_t downSampleRatio,
569+
PICO_RATIO_MODE downSampleRatioMode,
570+
uint64_t fromSegmentIndex,
571+
uint64_t toSegmentIndex,
572+
int16_t* overflow
573+
); """
574+
psospa.make_symbol("psospaGetValuesOverlapped", c_uint32, [c_int16, c_uint64, c_void_p, c_uint64, c_uint32, c_uint64, c_uint64, c_void_p], doc)
575+
576+
doc = """ PICO_STATUS psospaStopUsingGetValuesOverlapped
577+
(
578+
int16_t handle
579+
); """
580+
psospa.make_symbol("psospaStopUsingGetValuesOverlapped", c_uint32, [c_int16], doc)
581+
582+
doc = """ PICO_STATUS psospaGetNoOfCaptures
583+
(
584+
int16_t handle,
585+
uint64_t* nCaptures
586+
); """
587+
psospa.make_symbol("psospaGetNoOfCaptures", c_uint32, [c_int16, c_void_p], doc)
588+
589+
doc = """ PICO_STATUS psospaGetNoOfProcessedCaptures
590+
(
591+
int16_t handle,
592+
uint64_t* nProcessedCaptures
593+
); """
594+
psospa.make_symbol("psospaGetNoOfProcessedCaptures", c_uint32, [c_int16, c_void_p], doc)
595+
596+
doc = """ PICO_STATUS psospaStop
597+
(
598+
int16_t handle
599+
); """
600+
psospa.make_symbol("psospaStop", c_uint32, [c_int16], doc)
601+
602+
doc = """ PICO_STATUS psospaSetNoOfCaptures
603+
(
604+
int16_t handle,
605+
uint64_t nCaptures
606+
); """
607+
psospa.make_symbol("psospaSetNoOfCaptures", c_uint32, [c_int16, c_uint64], doc)
608+
609+
doc = """ PICO_STATUS psospaGetTriggerInfo
610+
(
611+
int16_t handle,
612+
PICO_TRIGGER_INFO* triggerInfo,
613+
uint64_t firstSegmentIndex,
614+
uint64_t segmentIndex
615+
); """
616+
psospa.make_symbol("psospaGetTriggerInfo", c_uint32, [c_int16, c_void_p, c_uint64, c_uint64], doc)
617+
618+
doc = """ PICO_STATUS psospaEnumerateUnits
619+
(
620+
int16_t* count,
621+
int8_t* serials,
622+
int16_t* serialLth
623+
); """
624+
psospa.make_symbol("psospaEnumerateUnits", c_uint32, [c_void_p, c_char_p, c_void_p], doc)
625+
626+
doc = """ PICO_STATUS psospaPingUnit
627+
(
628+
int16_t handle
629+
); """
630+
psospa.make_symbol("psospaPingUnit", c_uint32, [c_int16], doc)
631+
632+
doc = """ PICO_STATUS psospaGetAnalogueOffsetLimits
633+
(
634+
int16_t handle,
635+
int64_t rangeMin,
636+
int64_t rangeMax,
637+
PICO_PROBE_RANGE_INFO rangeType,
638+
PICO_COUPLING coupling,
639+
double* maximumVoltage,
640+
double* minimumVoltage
641+
); """
642+
psospa.make_symbol("psospaGetAnalogueOffsetLimits", c_uint32, [c_int16, c_int64, c_int64, c_uint32, c_uint32, c_void_p, c_void_p], doc)
643+
644+
doc = """ PICO_STATUS psospaGetMinimumTimebaseStateless
645+
(
646+
int16_t handle,
647+
PICO_CHANNEL_FLAGS enabledChannelFlags,
648+
uint32_t* timebase,
649+
double* timeInterval,
650+
PICO_DEVICE_RESOLUTION resolution
651+
); """
652+
psospa.make_symbol("psospaGetMinimumTimebaseStateless", c_uint32, [c_int16, c_uint32, c_void_p, c_void_p, c_uint32], doc)
653+
654+
doc = """ PICO_STATUS psospaNearestSampleIntervalStateless
655+
(
656+
int16_t handle,
657+
PICO_CHANNEL_FLAGS enabledChannelFlags,
658+
double timeIntervalRequested,
659+
uint8_t roundFaster,
660+
PICO_DEVICE_RESOLUTION resolution,
661+
uint32_t* timebase,
662+
double* timeIntervalAvailable
663+
); """
664+
psospa.make_symbol("psospaNearestSampleIntervalStateless", c_uint32, [c_int16, c_uint32, c_double, c_char,c_uint32, c_void_p, c_void_p], doc)
665+
666+
doc = """ PICO_STATUS psospaChannelCombinationsStateless
667+
(
668+
int16_t handle,
669+
PICO_CHANNEL_FLAGS* channelFlagsCombinations,
670+
uint32_t* nChannelCombinations,
671+
PICO_DEVICE_RESOLUTION resolution,
672+
uint32_t timebase
673+
); """
674+
psospa.make_symbol("psospaChannelCombinationsStateless", c_uint32, [c_int16, c_void_p, c_void_p, c_uint32, c_uint32], doc)
675+
676+
doc = """ PICO_STATUS psospaSetDeviceResolution
677+
(
678+
int16_t handle,
679+
PICO_DEVICE_RESOLUTION resolution
680+
); """
681+
psospa.make_symbol("psospaSetDeviceResolution", c_uint32, [c_int16, c_uint32], doc)
682+
683+
doc = """ PICO_STATUS psospaGetDeviceResolution
684+
(
685+
int16_t handle,
686+
PICO_DEVICE_RESOLUTION* resolution
687+
); """
688+
psospa.make_symbol("psospaGetDeviceResolution", c_uint32, [c_int16, c_void_p], doc)
689+
690+
doc = """ PICO_STATUS psospaQueryOutputEdgeDetect
691+
(
692+
int16_t handle,
693+
int16_t* state
694+
); """
695+
psospa.make_symbol("psospaQueryOutputEdgeDetect", c_uint32, [c_int16, c_void_p], doc)
696+
697+
doc = """ PICO_STATUS psospaSetOutputEdgeDetect
698+
(
699+
int16_t handle
700+
int16_t state
701+
); """
702+
psospa.make_symbol("psospaSetOutputEdgeDetect", c_uint32, [c_int16, c_int16], doc)
703+
704+
doc = """ PICO_STATUS psospaGetScalingValues
705+
(
706+
int16_t handle,
707+
PICO_SCALING_FACTORS_FOR_RANGE_TYPES_VALUES* scalingValues,
708+
int16_t nChannels
709+
); """
710+
psospa.make_symbol("psospaGetScalingValues", c_uint32, [c_int16, c_void_p, c_int16], doc)
711+
712+
doc = """ PICO_STATUS psospaGetAdcLimits
713+
(
714+
int16_t handle,
715+
PICO_DEVICE_RESOLUTION resolution,
716+
int16_t* minValue,
717+
int16_t* maxValue
718+
); """
719+
psospa.make_symbol("psospaGetAdcLimits", c_uint32, [c_int16, c_uint32, c_void_p, c_void_p], doc)
720+
721+
doc = """ PICO_STATUS psospaCheckForUpdate
722+
(
723+
int16_t handle,
724+
PICO_FIRMWARE_INFO* firmwareInfos,
725+
int16_t* nFirmwareInfos,
726+
uint16_t* updatesRequired
727+
); """
728+
psospa.make_symbol("psospaCheckForUpdate", c_uint32, [c_int16, c_void_p, c_void_p, c_void_p], doc)
729+
730+
doc = """ PICO_STATUS psospaStartFirmwareUpdate
731+
(
732+
int16_t handle,
733+
PicoUpdateFirmwareProgree progress
734+
); """
735+
psospa.make_symbol("psospaStartFirmwareUpdate", c_uint32, [c_int16, c_uint32], doc)
736+
737+
doc = """ PICO_STATUS psospaResetChannelsAndReportAllChannelsOvervoltageTripStatus
738+
(
739+
int16_t handle,
740+
PICO_CHANNEL_OVERVOLTAGE_TRIPPED* allChannelsTriggedStatus,
741+
uint8_t nChannelTrippedStatus
742+
); """
743+
psospa.make_symbol("psospaResetChannelsAndReportAllChannelsOvervoltageTripStatus", c_uint32, [c_int16, c_void_p, c_char], doc)
744+
745+
doc = """ PICO_STATUS psospaReportAllChannelsOvervoltageTripStatus
746+
(
747+
int16_t handle,
748+
PICO_CHANNEL_OVERVOLTAGE_TRIPPED* allChannelsTriggedStatus,
749+
uint8_t nChannelTrippedStatus
750+
); """
751+
psospa.make_symbol("psospaReportAllChannelsOvervoltageTripStatus", c_uint32, [c_int16, c_void_p, c_char], doc)

0 commit comments

Comments
 (0)