types-Jetson.GPIO 2.1.0.20240903__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ ## 2.1.0.20240903 (2024-09-03)
2
+
3
+ Add stubs for `Jetson.GPIO` (#12108)
4
+
@@ -0,0 +1,3 @@
1
+ from .gpio import *
2
+
3
+ VERSION: str = ...
@@ -0,0 +1,63 @@
1
+ from collections.abc import Callable, Sequence
2
+ from typing import Final, Literal
3
+
4
+ BOARD: Final = 10
5
+ BCM: Final = 11
6
+ TEGRA_SOC: Final = 1000
7
+ CVM: Final = 1001
8
+
9
+ PUD_OFF: Final = 20
10
+ PUD_DOWN: Final = 21
11
+ PUD_UP: Final = 22
12
+
13
+ HIGH: Final = 1
14
+ LOW: Final = 0
15
+
16
+ RISING: Final = 31
17
+ FALLING: Final = 32
18
+ BOTH: Final = 33
19
+
20
+ UNKNOWN: Final = -1
21
+ OUT: Final = 0
22
+ IN: Final = 1
23
+ HARD_PWM: Final = 43
24
+
25
+ model = ...
26
+ JETSON_INFO = ...
27
+ RPI_INFO = ...
28
+
29
+ def setwarnings(state: bool) -> None: ...
30
+ def setmode(mode: Literal[10, 11, 1000, 1001]) -> None: ...
31
+ def getmode() -> Literal[10, 11, 1000, 1001]: ...
32
+ def setup(
33
+ channels: int | Sequence[int],
34
+ direction: Literal[0, 1],
35
+ pull_up_down: Literal[20, 21, 22] = ...,
36
+ initial: Literal[0, 1] = ...,
37
+ consumer: str = ...,
38
+ ) -> None: ...
39
+ def cleanup(channel: int | Sequence[int] | None = ...) -> None: ...
40
+ def input(channel: int) -> Literal[0, 1]: ...
41
+ def output(channels: int | Sequence[int], values: Literal[0, 1]) -> None: ...
42
+ def add_event_detect(
43
+ channel: int,
44
+ edge: Literal[31, 32, 33],
45
+ callback: Callable[[int], None] | None = ...,
46
+ bouncetime: int | None = ...,
47
+ polltime: float = ...,
48
+ ) -> None: ...
49
+ def remove_event_detect(channel: int, timeout: float = ...) -> None: ...
50
+ def event_detected(channel: int) -> bool: ...
51
+ def add_event_callback(channel: int, callback: Callable[[int], None]) -> None: ...
52
+ def wait_for_edge(
53
+ channel: int, edge: Literal[31, 32, 33], bouncetime: int | None = ..., timeout: float | None = ...
54
+ ) -> int | None: ...
55
+ def gpio_function(channel: int) -> Literal[-1, 0, 1]: ...
56
+
57
+ class PWM:
58
+ def __init__(self, channel: int, frequency_hz: float) -> None: ...
59
+ def __del__(self) -> None: ...
60
+ def start(self, duty_cycle_percent: float) -> None: ...
61
+ def ChangeFrequency(self, frequency_hz: float) -> None: ...
62
+ def ChangeDutyCycle(self, duty_cycle_percent: float) -> None: ...
63
+ def stop(self) -> None: ...
@@ -0,0 +1,72 @@
1
+ import ctypes
2
+ from typing import Final, Literal
3
+
4
+ from .gpio_pin_data import ChannelInfo
5
+
6
+ GPIO_HIGH: Final = 1
7
+
8
+ GPIOHANDLE_REQUEST_INPUT: Final = 0x1
9
+ GPIOHANDLE_REQUEST_OUTPUT: Final = 0x2
10
+
11
+ GPIOEVENT_REQUEST_RISING_EDGE: Final = 0x1
12
+ GPIOEVENT_REQUEST_FALLING_EDGE: Final = 0x2
13
+ GPIOEVENT_REQUEST_BOTH_EDGES: Final = 0x3
14
+
15
+ GPIO_GET_CHIPINFO_IOCTL: Final = 0x8044B401
16
+ GPIO_GET_LINEINFO_IOCTL: Final = 0xC048B402
17
+ GPIO_GET_LINEHANDLE_IOCTL: Final = 0xC16CB403
18
+ GPIOHANDLE_GET_LINE_VALUES_IOCTL: Final = 0xC040B408
19
+ GPIOHANDLE_SET_LINE_VALUES_IOCTL: Final = 0xC040B409
20
+ GPIO_GET_LINEEVENT_IOCTL: Final = 0xC030B404
21
+
22
+ class gpiochip_info(ctypes.Structure):
23
+ name: str
24
+ label: str
25
+ lines: int
26
+
27
+ class gpiohandle_request(ctypes.Structure):
28
+ lineoffsets: list[int]
29
+ flags: int
30
+ default_values: list[int]
31
+ consumer_label: str
32
+ lines: int
33
+ fd: int
34
+
35
+ class gpiohandle_data(ctypes.Structure):
36
+ values: list[int]
37
+
38
+ class gpioline_info(ctypes.Structure):
39
+ line_offset: int
40
+ flags: int
41
+ name: str
42
+ consumer: str
43
+
44
+ class gpioline_info_changed(ctypes.Structure):
45
+ line_info: gpioline_info
46
+ timestamp: int
47
+ event_type: int
48
+ padding: list[int]
49
+
50
+ class gpioevent_request(ctypes.Structure):
51
+ lineoffset: int
52
+ handleflags: int
53
+ eventflags: int
54
+ consumer_label: str
55
+ fd: int
56
+
57
+ class gpioevent_data(ctypes.Structure):
58
+ timestamp: int
59
+ id: int
60
+
61
+ class GPIOError(IOError): ...
62
+
63
+ def chip_open(gpio_chip: str) -> int: ...
64
+ def chip_check_info(label: str, gpio_device: str) -> int | None: ...
65
+ def chip_open_by_label(label: str) -> int: ...
66
+ def close_chip(chip_fd: int) -> None: ...
67
+ def open_line(ch_info: ChannelInfo, request: int) -> None: ...
68
+ def close_line(line_handle: int) -> None: ...
69
+ def request_handle(line_offset: int, direction: Literal[0, 1], initial: Literal[0, 1], consumer: str) -> gpiohandle_request: ...
70
+ def request_event(line_offset: int, edge: int, consumer: str) -> gpioevent_request: ...
71
+ def get_value(line_handle: int) -> int: ...
72
+ def set_value(line_handle: int, value: int) -> None: ...
@@ -0,0 +1,17 @@
1
+ from collections.abc import Callable
2
+ from typing import Any, Final, Literal
3
+
4
+ NO_EDGE: Final = 0
5
+ RISING_EDGE: Final = 1
6
+ FALLING_EDGE: Final = 2
7
+ BOTH_EDGE: Final = 3
8
+
9
+ def add_edge_detect(
10
+ chip_fd: int, chip_name: str, channel: int, request: int, bouncetime: int, poll_time: float
11
+ ) -> Literal[1, 2, 0]: ...
12
+ def remove_edge_detect(chip_name: str, channel: int, timeout: float = ...) -> None: ...
13
+ def add_edge_callback(chip_name: str, channel: int, callback: Callable[[int], None]) -> None: ...
14
+ def edge_event_detected(chip_name: str, channel: int) -> bool: ...
15
+ def gpio_event_added(chip_name: str, channel: int) -> Any: ...
16
+ def blocking_wait_for_edge(chip_fd: int, chip_name: str, channel: int, request: int, bouncetime: int, timeout: float) -> int: ...
17
+ def event_cleanup(chip_name: str, channel: int) -> None: ...
@@ -0,0 +1,58 @@
1
+ from collections.abc import Sequence
2
+ from typing import Any, Final
3
+
4
+ CLARA_AGX_XAVIER: Final = "CLARA_AGX_XAVIER"
5
+ JETSON_NX: Final = "JETSON_NX"
6
+ JETSON_XAVIER: Final = "JETSON_XAVIER"
7
+ JETSON_TX2: Final = "JETSON_TX2"
8
+ JETSON_TX1: Final = "JETSON_TX1"
9
+ JETSON_NANO: Final = "JETSON_NANO"
10
+ JETSON_TX2_NX: Final = "JETSON_TX2_NX"
11
+ JETSON_ORIN: Final = "JETSON_ORIN"
12
+ JETSON_ORIN_NX: Final = "JETSON_ORIN_NX"
13
+ JETSON_ORIN_NANO: Final = "JETSON_ORIN_NANO"
14
+
15
+ JETSON_MODELS: list[str] = ...
16
+
17
+ JETSON_ORIN_NX_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None]] = ...
18
+ compats_jetson_orins_nx: Sequence[str] = ...
19
+ compats_jetson_orins_nano: Sequence[str] = ...
20
+
21
+ JETSON_ORIN_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None]] = ...
22
+ compats_jetson_orins: Sequence[str] = ...
23
+
24
+ CLARA_AGX_XAVIER_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None]] = ...
25
+ compats_clara_agx_xavier: Sequence[str] = ...
26
+
27
+ JETSON_NX_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None]] = ...
28
+ compats_nx: Sequence[str] = ...
29
+
30
+ JETSON_XAVIER_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None]] = ...
31
+ compats_xavier: Sequence[str] = ...
32
+
33
+ JETSON_TX2_NX_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None]] = ...
34
+ compats_tx2_nx: Sequence[str] = ...
35
+
36
+ JETSON_TX2_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None]] = ...
37
+ compats_tx2: Sequence[str] = ...
38
+
39
+ JETSON_TX1_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None]] = ...
40
+ compats_tx1: Sequence[str] = ...
41
+
42
+ JETSON_NANO_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None]] = ...
43
+ compats_nano: Sequence[str] = ...
44
+
45
+ jetson_gpio_data: dict[str, tuple[list[tuple[int, str, str, int, int, str, str, str | None, int | None]], dict[str, Any]]] = ...
46
+
47
+ class ChannelInfo:
48
+ def __init__(
49
+ self, channel: int, line_offset: int, gpio_name: str, gpio_chip: str, pwm_chip_dir: str, pwm_id: int
50
+ ) -> None: ...
51
+
52
+ ids_warned: bool = ...
53
+
54
+ def find_pmgr_board(prefix: str) -> str | None: ...
55
+ def warn_if_not_carrier_board(*carrier_boards: str) -> None: ...
56
+ def get_compatibles(compatible_path: str) -> list[str]: ...
57
+ def get_model() -> str: ...
58
+ def get_data() -> tuple[str, Any, dict[str, dict[Any, ChannelInfo]]]: ...
@@ -0,0 +1,2 @@
1
+ version = "2.1.*"
2
+ upstream_repository = "https://github.com/NVIDIA/jetson-gpio"
File without changes
@@ -0,0 +1 @@
1
+ include CHANGELOG.md
@@ -0,0 +1,38 @@
1
+ Metadata-Version: 2.1
2
+ Name: types-Jetson.GPIO
3
+ Version: 2.1.0.20240903
4
+ Summary: Typing stubs for Jetson.GPIO
5
+ Home-page: https://github.com/python/typeshed
6
+ License: Apache-2.0
7
+ Project-URL: GitHub, https://github.com/python/typeshed
8
+ Project-URL: Changes, https://github.com/typeshed-internal/stub_uploader/blob/main/data/changelogs/Jetson.GPIO.md
9
+ Project-URL: Issue tracker, https://github.com/python/typeshed/issues
10
+ Project-URL: Chat, https://gitter.im/python/typing
11
+ Classifier: License :: OSI Approved :: Apache Software License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Typing :: Stubs Only
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
16
+
17
+ ## Typing stubs for Jetson.GPIO
18
+
19
+ This is a [PEP 561](https://peps.python.org/pep-0561/)
20
+ type stub package for the [`Jetson.GPIO`](https://github.com/NVIDIA/jetson-gpio) package.
21
+ It can be used by type-checking tools like
22
+ [mypy](https://github.com/python/mypy/),
23
+ [pyright](https://github.com/microsoft/pyright),
24
+ [pytype](https://github.com/google/pytype/),
25
+ PyCharm, etc. to check code that uses
26
+ `Jetson.GPIO`.
27
+
28
+ This version of `types-Jetson.GPIO` aims to provide accurate annotations
29
+ for `Jetson.GPIO==2.1.*`.
30
+ The source for this package can be found at
31
+ https://github.com/python/typeshed/tree/main/stubs/Jetson.GPIO. All fixes for
32
+ types and metadata should be contributed there.
33
+
34
+ See https://github.com/python/typeshed/blob/main/README.md for more details.
35
+ This package was generated from typeshed commit
36
+ [`4101e742366e5e1f79168fba8d97503b047dfd5b`](https://github.com/python/typeshed/commit/4101e742366e5e1f79168fba8d97503b047dfd5b) and was tested
37
+ with mypy 1.11.1, pyright 1.1.378, and
38
+ pytype 2024.4.11.
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,52 @@
1
+ from setuptools import setup
2
+
3
+ name = "types-Jetson.GPIO"
4
+ description = "Typing stubs for Jetson.GPIO"
5
+ long_description = '''
6
+ ## Typing stubs for Jetson.GPIO
7
+
8
+ This is a [PEP 561](https://peps.python.org/pep-0561/)
9
+ type stub package for the [`Jetson.GPIO`](https://github.com/NVIDIA/jetson-gpio) package.
10
+ It can be used by type-checking tools like
11
+ [mypy](https://github.com/python/mypy/),
12
+ [pyright](https://github.com/microsoft/pyright),
13
+ [pytype](https://github.com/google/pytype/),
14
+ PyCharm, etc. to check code that uses
15
+ `Jetson.GPIO`.
16
+
17
+ This version of `types-Jetson.GPIO` aims to provide accurate annotations
18
+ for `Jetson.GPIO==2.1.*`.
19
+ The source for this package can be found at
20
+ https://github.com/python/typeshed/tree/main/stubs/Jetson.GPIO. All fixes for
21
+ types and metadata should be contributed there.
22
+
23
+ See https://github.com/python/typeshed/blob/main/README.md for more details.
24
+ This package was generated from typeshed commit
25
+ [`4101e742366e5e1f79168fba8d97503b047dfd5b`](https://github.com/python/typeshed/commit/4101e742366e5e1f79168fba8d97503b047dfd5b) and was tested
26
+ with mypy 1.11.1, pyright 1.1.378, and
27
+ pytype 2024.4.11.
28
+ '''.lstrip()
29
+
30
+ setup(name=name,
31
+ version="2.1.0.20240903",
32
+ description=description,
33
+ long_description=long_description,
34
+ long_description_content_type="text/markdown",
35
+ url="https://github.com/python/typeshed",
36
+ project_urls={
37
+ "GitHub": "https://github.com/python/typeshed",
38
+ "Changes": "https://github.com/typeshed-internal/stub_uploader/blob/main/data/changelogs/Jetson.GPIO.md",
39
+ "Issue tracker": "https://github.com/python/typeshed/issues",
40
+ "Chat": "https://gitter.im/python/typing",
41
+ },
42
+ install_requires=[],
43
+ packages=['Jetson-stubs'],
44
+ package_data={'Jetson-stubs': ['GPIO/__init__.pyi', 'GPIO/gpio.pyi', 'GPIO/gpio_cdev.pyi', 'GPIO/gpio_event.pyi', 'GPIO/gpio_pin_data.pyi', '__init__.pyi', 'METADATA.toml', 'py.typed']},
45
+ license="Apache-2.0",
46
+ python_requires=">=3.8",
47
+ classifiers=[
48
+ "License :: OSI Approved :: Apache Software License",
49
+ "Programming Language :: Python :: 3",
50
+ "Typing :: Stubs Only",
51
+ ]
52
+ )
@@ -0,0 +1,38 @@
1
+ Metadata-Version: 2.1
2
+ Name: types-Jetson.GPIO
3
+ Version: 2.1.0.20240903
4
+ Summary: Typing stubs for Jetson.GPIO
5
+ Home-page: https://github.com/python/typeshed
6
+ License: Apache-2.0
7
+ Project-URL: GitHub, https://github.com/python/typeshed
8
+ Project-URL: Changes, https://github.com/typeshed-internal/stub_uploader/blob/main/data/changelogs/Jetson.GPIO.md
9
+ Project-URL: Issue tracker, https://github.com/python/typeshed/issues
10
+ Project-URL: Chat, https://gitter.im/python/typing
11
+ Classifier: License :: OSI Approved :: Apache Software License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Typing :: Stubs Only
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
16
+
17
+ ## Typing stubs for Jetson.GPIO
18
+
19
+ This is a [PEP 561](https://peps.python.org/pep-0561/)
20
+ type stub package for the [`Jetson.GPIO`](https://github.com/NVIDIA/jetson-gpio) package.
21
+ It can be used by type-checking tools like
22
+ [mypy](https://github.com/python/mypy/),
23
+ [pyright](https://github.com/microsoft/pyright),
24
+ [pytype](https://github.com/google/pytype/),
25
+ PyCharm, etc. to check code that uses
26
+ `Jetson.GPIO`.
27
+
28
+ This version of `types-Jetson.GPIO` aims to provide accurate annotations
29
+ for `Jetson.GPIO==2.1.*`.
30
+ The source for this package can be found at
31
+ https://github.com/python/typeshed/tree/main/stubs/Jetson.GPIO. All fixes for
32
+ types and metadata should be contributed there.
33
+
34
+ See https://github.com/python/typeshed/blob/main/README.md for more details.
35
+ This package was generated from typeshed commit
36
+ [`4101e742366e5e1f79168fba8d97503b047dfd5b`](https://github.com/python/typeshed/commit/4101e742366e5e1f79168fba8d97503b047dfd5b) and was tested
37
+ with mypy 1.11.1, pyright 1.1.378, and
38
+ pytype 2024.4.11.
@@ -0,0 +1,15 @@
1
+ CHANGELOG.md
2
+ MANIFEST.in
3
+ setup.py
4
+ Jetson-stubs/METADATA.toml
5
+ Jetson-stubs/__init__.pyi
6
+ Jetson-stubs/py.typed
7
+ Jetson-stubs/GPIO/__init__.pyi
8
+ Jetson-stubs/GPIO/gpio.pyi
9
+ Jetson-stubs/GPIO/gpio_cdev.pyi
10
+ Jetson-stubs/GPIO/gpio_event.pyi
11
+ Jetson-stubs/GPIO/gpio_pin_data.pyi
12
+ types_Jetson.GPIO.egg-info/PKG-INFO
13
+ types_Jetson.GPIO.egg-info/SOURCES.txt
14
+ types_Jetson.GPIO.egg-info/dependency_links.txt
15
+ types_Jetson.GPIO.egg-info/top_level.txt