Skip to content

Commit

Permalink
add km/ata.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobatymo committed Jun 12, 2024
1 parent 56f330d commit 833feac
Show file tree
Hide file tree
Showing 7 changed files with 3,010 additions and 10 deletions.
2,999 changes: 2,999 additions & 0 deletions cwinsdk/km/ata.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions cwinsdk/shared/ntddscsi.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from ctypes import POINTER, Structure
from ctypes.wintypes import LPVOID, ULONG, USHORT

from ..um.winnt import ANYSIZE_ARRAY
from .basetsd import ULONG_PTR
from .devioctl import (
CTL_CODE,
Expand All @@ -11,7 +10,7 @@
FILE_WRITE_ACCESS,
METHOD_BUFFERED,
)
from .ntdef import PVOID, UCHAR
from .ntdef import ANYSIZE_ARRAY, PVOID, UCHAR

IOCTL_SCSI_BASE = FILE_DEVICE_CONTROLLER
FILE_DEVICE_SCSI = 0x0000001B
Expand Down
2 changes: 2 additions & 0 deletions cwinsdk/shared/ntdef.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
)
from ctypes.wintypes import HANDLE, WCHAR

ANYSIZE_ARRAY = 1 # winnt

PWCHAR = POINTER(WCHAR)
LPWCH = POINTER(WCHAR)
PWCH = POINTER(WCHAR)
Expand Down
7 changes: 3 additions & 4 deletions cwinsdk/shared/nvme.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from ctypes import POINTER, Structure, Union, sizeof
from ctypes.wintypes import CHAR, ULONG, USHORT

from cwinsdk import CEnum, make_struct, make_union
from cwinsdk.shared.guiddef import GUID
from cwinsdk.shared.ntdef import UCHAR, ULONGLONG
from cwinsdk.um.winnt import ANYSIZE_ARRAY
from .. import CEnum, make_struct, make_union
from .guiddef import GUID
from .ntdef import ANYSIZE_ARRAY, UCHAR, ULONGLONG

_pack_ = 0
"""++
Expand Down
1 change: 1 addition & 0 deletions cwinsdk/windows.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .km.ata import *
from .km.crt.excpt import *
from .km.dderror import *
from .km.wdm import *
Expand Down
1 change: 1 addition & 0 deletions transpile/transpile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def main(args: Namespace) -> None:
"shared/scsi.h",
"um/wingdi.h",
"um/winioctl.h",
"km/ata.h",
]
header_files = list(map(Path, header_files))

Expand Down
7 changes: 3 additions & 4 deletions transpile/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,17 +691,16 @@ def typedef_sub(m: re.Match) -> str:
],
Path("shared/ntddscsi.h"): [],
Path("shared/nvme.h"): [
["cwinsdk.shared.ntdef", ["LPWCH", "PWSTR", "ULONGLONG", "UCHAR", "PVOID"]],
["cwinsdk.um.winnt", ["ANYSIZE_ARRAY"]],
["cwinsdk.shared.ntdef", ["ANYSIZE_ARRAY", "LPWCH", "PWSTR", "ULONGLONG", "UCHAR", "PVOID"]],
["cwinsdk.shared.guiddef", ["GUID"]],
],
Path("shared/scsi.h"): [
["cwinsdk", ["DECLSPEC_ALIGN"]],
["cwinsdk.shared.ntdef", ["UCHAR", "ULONGLONG"]],
["cwinsdk.um.winnt", ["ANYSIZE_ARRAY"]],
["cwinsdk.shared.ntdef", ["ANYSIZE_ARRAY", "UCHAR", "ULONGLONG"]],
],
Path("shared/ntddscsi.h"): [],
Path("shared/winioctl.h"): [],
Path("km/ata.h"): [["cwinsdk.shared.ntdef", ["UCHAR", "ULONGLONG", "ANYSIZE_ARRAY"]]],
}


Expand Down

0 comments on commit 833feac

Please sign in to comment.