[Jetson.GPIO] Update to 2.1.12 (#14849)

This commit is contained in:
Semyon Moroz
2025-10-08 19:19:32 +04:00
committed by GitHub
parent be7e7c5e2b
commit 4e6a00ece5
7 changed files with 68 additions and 30 deletions
@@ -1,10 +1,9 @@
# The high level module can only be imported on a Jetson SBC
# stubtest produces false positives for Jetson.GPIO-related modules in CI
# The high-level Jetson.GPIO library can only be imported on Jetson SBC,
# and requires specific system permissions (/dev/gpiochip0 access).
Jetson.GPIO
# error: Jetson.GPIO failed to import. RuntimeError: The current user does not have permissions set to access the library functionalites. Please configure permissions or use the root user to run this. It is also possible that /dev/gpiochip0 does not exist. Please check if that file is present.
Jetson.GPIO.gpio
# error: Jetson.GPIO.gpio failed to import. RuntimeError: The current user does not have permissions set to access the library functionalites. Please configure permissions or use the root user to run this. It is also possible that /dev/gpiochip0 does not exist. Please check if that file is present.
Jetson.GPIO.gpio_pinmux_lookup
# This builtin error doesn't need to be re-exported
Jetson.GPIO.gpio_event.InterruptedError
@@ -0,0 +1,22 @@
from typing import Final
BOARD: Final = 10
BCM: Final = 11
TEGRA_SOC: Final = 1000
CVM: Final = 1001
PUD_OFF: Final = 20
PUD_DOWN: Final = 21
PUD_UP: Final = 22
HIGH: Final = 1
LOW: Final = 0
RISING: Final = 31
FALLING: Final = 32
BOTH: Final = 33
UNKNOWN: Final = -1
OUT: Final = 0
IN: Final = 1
HARD_PWM: Final = 43
+2 -21
View File
@@ -1,26 +1,7 @@
from collections.abc import Callable, Sequence
from typing import Final, Literal
from typing import Literal
BOARD: Final = 10
BCM: Final = 11
TEGRA_SOC: Final = 1000
CVM: Final = 1001
PUD_OFF: Final = 20
PUD_DOWN: Final = 21
PUD_UP: Final = 22
HIGH: Final = 1
LOW: Final = 0
RISING: Final = 31
FALLING: Final = 32
BOTH: Final = 33
UNKNOWN: Final = -1
OUT: Final = 0
IN: Final = 1
HARD_PWM: Final = 43
from .constants import *
model = ...
JETSON_INFO = ...
@@ -1,4 +1,5 @@
import ctypes
from dataclasses import dataclass
from typing import Final, Literal
from .gpio_pin_data import ChannelInfo
@@ -70,3 +71,13 @@ def request_handle(line_offset: int, direction: Literal[0, 1], initial: Literal[
def request_event(line_offset: int, edge: int, consumer: str) -> gpioevent_request: ...
def get_value(line_handle: int) -> int: ...
def set_value(line_handle: int, value: int) -> None: ...
@dataclass
class PadCtlRegister:
is_gpio: bool
is_input: bool
is_tristate: bool
def __init__(self, value: int) -> None: ...
@property
def is_bidi(self) -> bool: ...
def check_pinmux(ch_info: ChannelInfo, direction: int) -> None: ...
@@ -15,11 +15,11 @@ JETSON_THOR_REFERENCE: Final = "JETSON_THOR_REFERENCE"
JETSON_MODELS: list[str]
JETSON_ORIN_NX_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None]]
JETSON_ORIN_NX_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None, int]]
compats_jetson_orins_nx: Sequence[str]
compats_jetson_orins_nano: Sequence[str]
JETSON_ORIN_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None]]
JETSON_ORIN_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None, int]]
compats_jetson_orins: Sequence[str]
CLARA_AGX_XAVIER_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None]]
@@ -49,8 +49,27 @@ compats_jetson_thor_reference: Sequence[str]
jetson_gpio_data: dict[str, tuple[list[tuple[int, str, str, int, int, str, str, str | None, int | None]], dict[str, Any]]]
class ChannelInfo:
channel: int
chip_fd: int | None
line_handle: int | None
line_offset: int
direction: int | None
edge: int | None
consumer: str
gpio_name: str
gpio_chip: str
pwm_chip_dir: str
pwm_id: int
reg_addr: int | None
def __init__(
self, channel: int, line_offset: int, gpio_name: str, gpio_chip: str, pwm_chip_dir: str, pwm_id: int
self,
channel: int,
line_offset: int,
gpio_name: str,
gpio_chip: str,
pwm_chip_dir: str,
pwm_id: int,
reg_addr: int | None = None,
) -> None: ...
ids_warned: bool
@@ -0,0 +1,6 @@
from collections.abc import Iterable
def lookup_mux_register(
gpio_pin: int, pin_defs: Iterable[tuple[int, str, str, int, int, str, str, str | None, int | None, int]]
) -> int: ...
def main() -> None: ...
+1 -1
View File
@@ -1,2 +1,2 @@
version = "2.1.11"
version = "2.1.12"
upstream_repository = "https://github.com/NVIDIA/jetson-gpio"