mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
Fixed compiler warnings.
svn path=/trunk/; revision=451
This commit is contained in:
parent
d0fbe6c728
commit
a2e9c0c7a4
4 changed files with 30 additions and 11 deletions
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
OBJECTS= parallel.o ../../../ntoskrnl/ntoskrnl.a
|
||||
|
||||
all: parallel.o
|
||||
all: parallel.sys
|
||||
|
||||
.phony: all
|
||||
|
||||
|
|
|
@ -12,9 +12,14 @@
|
|||
/* FUNCTIONS **************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/halio.h>
|
||||
|
||||
#include "parallel.h"
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
|
||||
#define LP_B (0x378)
|
||||
#define LP_S (inb_p(LP_B+1))
|
||||
#define LP_C (LP_B+2)
|
||||
|
@ -52,7 +57,7 @@ static void Parallel_putchar(unsigned char ch)
|
|||
|
||||
if (count==500000)
|
||||
{
|
||||
printk("printer_putchar(): timed out\n");
|
||||
DPRINT("printer_putchar(): timed out\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -79,7 +84,7 @@ NTSTATUS Dispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
switch (Stack->MajorFunction)
|
||||
{
|
||||
case IRP_MJ_CREATE:
|
||||
printk("(Parallel Port Driver) Creating\n");
|
||||
DPRINT("(Parallel Port Driver) Creating\n");
|
||||
Parallel_Reset();
|
||||
status = STATUS_SUCCESS;
|
||||
break;
|
||||
|
@ -89,7 +94,7 @@ NTSTATUS Dispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
break;
|
||||
|
||||
case IRP_MJ_WRITE:
|
||||
printk("(Parallel Port Driver) Writing %d bytes\n",
|
||||
DPRINT("(Parallel Port Driver) Writing %d bytes\n",
|
||||
Stack->Parameters.Write.Length);
|
||||
for (i=0;i<Stack->Parameters.Write.Length;i++)
|
||||
{
|
||||
|
@ -110,7 +115,8 @@ NTSTATUS Dispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
return(status);
|
||||
}
|
||||
|
||||
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
||||
STDCALL NTSTATUS
|
||||
DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
||||
/*
|
||||
* FUNCTION: Called by the system to initalize the driver
|
||||
* ARGUMENTS:
|
||||
|
@ -121,12 +127,20 @@ NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
|||
{
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
NTSTATUS ret;
|
||||
ANSI_STRING ansi_device_name;
|
||||
UNICODE_STRING device_name;
|
||||
|
||||
printk("Parallel Port Driver 0.0.1\n");
|
||||
DbgPrint("Parallel Port Driver 0.0.1\n");
|
||||
|
||||
|
||||
ret = IoCreateDevice(DriverObject,0,"\\Device\\Parallel",
|
||||
FILE_DEVICE_PARALLEL_PORT,0,FALSE,&DeviceObject);
|
||||
RtlInitAnsiString (&ansi_device_name, "\\Device\\Parallel");
|
||||
RtlAnsiStringToUnicodeString (&device_name, &ansi_device_name, TRUE);
|
||||
ret = IoCreateDevice(DriverObject,
|
||||
0,
|
||||
&device_name,
|
||||
FILE_DEVICE_PARALLEL_PORT,
|
||||
0,
|
||||
FALSE,
|
||||
&DeviceObject);
|
||||
if (ret!=STATUS_SUCCESS)
|
||||
{
|
||||
return(ret);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
OBJECTS= serial.o ../../../ntoskrnl/ntoskrnl.a
|
||||
|
||||
all: serial.o
|
||||
all: serial.sys
|
||||
|
||||
.phony: all
|
||||
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
#include <internal/mmhal.h>
|
||||
#include <internal/halio.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
|
||||
#define COM1 0x3F8
|
||||
#define COM2 0x2F8
|
||||
#define COM3 0x3E8
|
||||
|
@ -141,7 +145,8 @@ void testserial(void)
|
|||
};
|
||||
};
|
||||
|
||||
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
||||
STDCALL NTSTATUS
|
||||
DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
||||
{
|
||||
DbgPrint("Serial Driver 0.0.2\n");
|
||||
InitializeSerial();
|
||||
|
|
Loading…
Reference in a new issue