mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 12:02:02 +00:00
[KDCOM]
- Use the UCHAR type directly instead of using a typedef for defining BYTE. - A little bit of header reorganization. svn path=/trunk/; revision=58824
This commit is contained in:
parent
6515d813b3
commit
5159da237d
4 changed files with 21 additions and 27 deletions
|
@ -9,6 +9,9 @@
|
||||||
#include "kddll.h"
|
#include "kddll.h"
|
||||||
#include <cportlib/cportlib.h>
|
#include <cportlib/cportlib.h>
|
||||||
|
|
||||||
|
long atol(const char *str);
|
||||||
|
|
||||||
|
|
||||||
/* Serial debug connection */
|
/* Serial debug connection */
|
||||||
#define DEFAULT_DEBUG_PORT 2 /* COM2 */
|
#define DEFAULT_DEBUG_PORT 2 /* COM2 */
|
||||||
#define DEFAULT_DEBUG_COM1_IRQ 4 /* COM1 IRQ */
|
#define DEFAULT_DEBUG_COM1_IRQ 4 /* COM1 IRQ */
|
||||||
|
@ -166,7 +169,7 @@ KdDebuggerInitialize0(IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
KdpSendByte(IN BYTE Byte)
|
KdpSendByte(IN UCHAR Byte)
|
||||||
{
|
{
|
||||||
/* Send the byte */
|
/* Send the byte */
|
||||||
CpPutByte(&KdDebugComPort, Byte);
|
CpPutByte(&KdDebugComPort, Byte);
|
||||||
|
@ -174,7 +177,7 @@ KdpSendByte(IN BYTE Byte)
|
||||||
|
|
||||||
KDP_STATUS
|
KDP_STATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
KdpPollByte(OUT PBYTE OutByte)
|
KdpPollByte(OUT PUCHAR OutByte)
|
||||||
{
|
{
|
||||||
/* Poll the byte */
|
/* Poll the byte */
|
||||||
return (CpGetByte(&KdDebugComPort, OutByte, FALSE) == CP_GET_SUCCESS
|
return (CpGetByte(&KdDebugComPort, OutByte, FALSE) == CP_GET_SUCCESS
|
||||||
|
@ -184,7 +187,7 @@ KdpPollByte(OUT PBYTE OutByte)
|
||||||
|
|
||||||
KDP_STATUS
|
KDP_STATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
KdpReceiveByte(OUT PBYTE OutByte)
|
KdpReceiveByte(OUT PUCHAR OutByte)
|
||||||
{
|
{
|
||||||
/* Get the byte */
|
/* Get the byte */
|
||||||
return (CpGetByte(&KdDebugComPort, OutByte, TRUE) == CP_GET_SUCCESS
|
return (CpGetByte(&KdDebugComPort, OutByte, TRUE) == CP_GET_SUCCESS
|
||||||
|
|
|
@ -415,3 +415,4 @@ KdSendPacket(
|
||||||
CurrentPacketId &= ~SYNC_PACKET_ID;
|
CurrentPacketId &= ~SYNC_PACKET_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
||||||
|
|
|
@ -8,27 +8,28 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
//#define KDDEBUG /* uncomment to enable debugging this dll */
|
|
||||||
|
|
||||||
#define NOEXTAPI
|
#define NOEXTAPI
|
||||||
#include <ntifs.h>
|
#include <ntifs.h>
|
||||||
|
#include <arc/arc.h>
|
||||||
#include <halfuncs.h>
|
#include <halfuncs.h>
|
||||||
#include "arc/arc.h"
|
#include <windbgkd.h>
|
||||||
#include "windbgkd.h"
|
|
||||||
|
|
||||||
#include <wdbgexts.h>
|
#include <wdbgexts.h>
|
||||||
#include <ioaccess.h> /* port intrinsics */
|
#include <ioaccess.h> /* port intrinsics */
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
long atol(const char *str);
|
//#define KDDEBUG /* uncomment to enable debugging this dll */
|
||||||
|
|
||||||
typedef UCHAR BYTE, *PBYTE;
|
|
||||||
|
|
||||||
typedef ULONG (*PFNDBGPRNT)(const char *Format, ...);
|
typedef ULONG (*PFNDBGPRNT)(const char *Format, ...);
|
||||||
extern PFNDBGPRNT KdpDbgPrint;
|
extern PFNDBGPRNT KdpDbgPrint;
|
||||||
|
|
||||||
|
#ifndef KDDEBUG
|
||||||
|
#define KDDBGPRINT(...)
|
||||||
|
#else
|
||||||
|
#define KDDBGPRINT KdpDbgPrint
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
KDP_PACKET_RECEIVED = 0,
|
KDP_PACKET_RECEIVED = 0,
|
||||||
|
@ -36,12 +37,6 @@ typedef enum
|
||||||
KDP_PACKET_RESEND = 2
|
KDP_PACKET_RESEND = 2
|
||||||
} KDP_STATUS;
|
} KDP_STATUS;
|
||||||
|
|
||||||
#ifndef KDDEBUG
|
|
||||||
#define KDDBGPRINT(...)
|
|
||||||
#else
|
|
||||||
#define KDDBGPRINT KdpDbgPrint
|
|
||||||
#endif
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
KdpSendBuffer(
|
KdpSendBuffer(
|
||||||
|
@ -61,24 +56,18 @@ KdpReceivePacketLeader(
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
KdpSendByte(IN BYTE Byte);
|
KdpSendByte(IN UCHAR Byte);
|
||||||
|
|
||||||
KDP_STATUS
|
KDP_STATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
KdpPollByte(OUT PBYTE OutByte);
|
KdpPollByte(OUT PUCHAR OutByte);
|
||||||
|
|
||||||
KDP_STATUS
|
KDP_STATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
KdpReceiveByte(OUT PBYTE OutByte);
|
KdpReceiveByte(OUT PUCHAR OutByte);
|
||||||
|
|
||||||
KDP_STATUS
|
KDP_STATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
KdpPollBreakIn(VOID);
|
KdpPollBreakIn(VOID);
|
||||||
|
|
||||||
|
/* EOF */
|
||||||
#if 0
|
|
||||||
NTSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdDebuggerInitialize0(
|
|
||||||
IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL);
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -143,3 +143,4 @@ KdpReceivePacketLeader(
|
||||||
return KDP_PACKET_RECEIVED;
|
return KDP_PACKET_RECEIVED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue