mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Merge pull request #4648 from lzurbriggen/fix/get-comm-ports
move GetCommPorts, add missing comm functions, add communication events
This commit is contained in:
@@ -20,6 +20,15 @@ COMMON_LVB_GRID_RVERTICAL :: WORD(0x1000)
|
|||||||
COMMON_LVB_REVERSE_VIDEO :: WORD(0x4000)
|
COMMON_LVB_REVERSE_VIDEO :: WORD(0x4000)
|
||||||
COMMON_LVB_UNDERSCORE :: WORD(0x8000)
|
COMMON_LVB_UNDERSCORE :: WORD(0x8000)
|
||||||
COMMON_LVB_SBCSDBCS :: WORD(0x0300)
|
COMMON_LVB_SBCSDBCS :: WORD(0x0300)
|
||||||
|
EV_BREAK :: DWORD(0x0040)
|
||||||
|
EV_CTS :: DWORD(0x0008)
|
||||||
|
EV_DSR :: DWORD(0x0010)
|
||||||
|
EV_ERR :: DWORD(0x0080)
|
||||||
|
EV_RING :: DWORD(0x0100)
|
||||||
|
EV_RLSD :: DWORD(0x0020)
|
||||||
|
EV_RXCHAR :: DWORD(0x0001)
|
||||||
|
EV_RXFLAG :: DWORD(0x0002)
|
||||||
|
EV_TXEMPTY :: DWORD(0x0004)
|
||||||
|
|
||||||
@(default_calling_convention="system")
|
@(default_calling_convention="system")
|
||||||
foreign kernel32 {
|
foreign kernel32 {
|
||||||
@@ -109,7 +118,9 @@ foreign kernel32 {
|
|||||||
ClearCommError :: proc(hFile: HANDLE, lpErrors: ^Com_Error, lpStat: ^COMSTAT) -> BOOL ---
|
ClearCommError :: proc(hFile: HANDLE, lpErrors: ^Com_Error, lpStat: ^COMSTAT) -> BOOL ---
|
||||||
GetCommState :: proc(handle: HANDLE, dcb: ^DCB) -> BOOL ---
|
GetCommState :: proc(handle: HANDLE, dcb: ^DCB) -> BOOL ---
|
||||||
SetCommState :: proc(handle: HANDLE, dcb: ^DCB) -> BOOL ---
|
SetCommState :: proc(handle: HANDLE, dcb: ^DCB) -> BOOL ---
|
||||||
GetCommPorts :: proc(lpPortNumbers: PULONG, uPortNumbersCount: ULONG, puPortNumbersFound: PULONG) -> ULONG ---
|
SetCommMask :: proc(handle: HANDLE, dwEvtMap: DWORD) -> BOOL ---
|
||||||
|
GetCommMask :: proc(handle: HANDLE, lpEvtMask: LPDWORD) -> BOOL ---
|
||||||
|
WaitCommEvent :: proc(handle: HANDLE, lpEvtMask: LPDWORD, lpOverlapped: LPOVERLAPPED) -> BOOL ---
|
||||||
GetCommandLineW :: proc() -> LPCWSTR ---
|
GetCommandLineW :: proc() -> LPCWSTR ---
|
||||||
GetTempPathW :: proc(nBufferLength: DWORD, lpBuffer: LPCWSTR) -> DWORD ---
|
GetTempPathW :: proc(nBufferLength: DWORD, lpBuffer: LPCWSTR) -> DWORD ---
|
||||||
GetCurrentProcess :: proc() -> HANDLE ---
|
GetCurrentProcess :: proc() -> HANDLE ---
|
||||||
@@ -1072,6 +1083,11 @@ foreign one_core {
|
|||||||
PageProtection: ULONG,
|
PageProtection: ULONG,
|
||||||
PreferredNode: ULONG,
|
PreferredNode: ULONG,
|
||||||
) -> PVOID ---
|
) -> PVOID ---
|
||||||
|
GetCommPorts :: proc(
|
||||||
|
lpPortNumbers: PULONG,
|
||||||
|
uPortNumbersCount: ULONG,
|
||||||
|
puPortNumbersFound: PULONG,
|
||||||
|
) -> ULONG ---
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user