mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-18 04:20:28 +00:00
add SetCommMask, GetCommMask, WaitCommEvent, GetCommPorts, communication event constants
This commit is contained in:
@@ -21,6 +21,16 @@ COMMON_LVB_REVERSE_VIDEO :: WORD(0x4000)
|
||||
COMMON_LVB_UNDERSCORE :: WORD(0x8000)
|
||||
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")
|
||||
foreign kernel32 {
|
||||
OutputDebugStringA :: proc(lpOutputString: LPCSTR) --- // The only A thing that is allowed
|
||||
@@ -109,6 +119,9 @@ foreign kernel32 {
|
||||
ClearCommError :: proc(hFile: HANDLE, lpErrors: ^Com_Error, lpStat: ^COMSTAT) -> BOOL ---
|
||||
GetCommState :: proc(handle: HANDLE, dcb: ^DCB) -> BOOL ---
|
||||
SetCommState :: proc(handle: HANDLE, dcb: ^DCB) -> BOOL ---
|
||||
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 ---
|
||||
GetTempPathW :: proc(nBufferLength: DWORD, lpBuffer: LPCWSTR) -> DWORD ---
|
||||
GetCurrentProcess :: proc() -> HANDLE ---
|
||||
@@ -1067,7 +1080,11 @@ foreign one_core {
|
||||
PageProtection: ULONG,
|
||||
PreferredNode: ULONG,
|
||||
) -> PVOID ---
|
||||
GetCommPorts :: proc(lpPortNumbers: PULONG, uPortNumbersCount: ULONG, puPortNumbersFound: PULONG) -> ULONG ---
|
||||
GetCommPorts :: proc(
|
||||
lpPortNumbers: PULONG,
|
||||
uPortNumbersCount: ULONG,
|
||||
puPortNumbersFound: PULONG,
|
||||
) -> ULONG ---
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user