Skip to content

Commit 7288091

Browse files
author
neil.hamilton
committed
Create psospa.py with open and close unit functions
1 parent eeb28ed commit 7288091

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

picosdk/psospa.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#
2+
# Copyright (C) 2024 Pico Technology Ltd. See LICENSE file for terms.
3+
#
4+
"""
5+
This is a Python module defining the functions from the psospaApi.h C header
6+
file for PicoScope 3000 A Series oscilloscopes using the psospa driver API
7+
functions.
8+
"""
9+
10+
from ctypes import *
11+
from picosdk.library import Library
12+
from picosdk.ctypes_wrapper import C_CALLBACK_FUNCTION_FACTORY
13+
from picosdk.constants import make_enum
14+
from picosdk.PicoDeviceEnums import picoEnum as enums
15+
16+
class Psospalib(Library)
17+
def __init__(self):
18+
super(Psospalib, self).__init__("psospa")
19+
20+
psospa = Psospalib()
21+
22+
doc = """ PICO_STATUS psospaOpenUnit
23+
(
24+
int16_t* handle,
25+
int8_t* serial,
26+
PICO_DEVICE_RESOLUTION resolution,
27+
PICO_USB_POWER_DETAILS* powerDetails
28+
); """
29+
psospa.make_symbol("psospaOpenUnit", c_uint32, [c_void_p, c_char_p, c_int32, c_void_p], doc)
30+
31+
doc = """ PICO_STATUS psospaCloseUnit
32+
(
33+
int16_t handle
34+
); """
35+
psospa.make_symbol("psospaCloseUnit", c_uint32, [c_int16], doc)

0 commit comments

Comments
 (0)