48 DPRINT(
"Sorry - only 1 device supported by MPU401 driver at present :(\n");
52 DPRINT(
"Creating IO device\n");
68 DPRINT(
"Creating DOS link\n");
74 DPRINT(
"Initializing device\n");
92 DPRINT(
"Setting reg path\n");
96 DPRINT(
"Zeroing table memory and setting query routine\n");
100 DPRINT(
"Setting port and IRQ defaults\n");
122 DPRINT(
"UART mode initialization FAILED!\n");
145 DPRINT(
"MPU401Create() called!\n");
160 Irp->IoStatus.Information = 0;
182 DPRINT(
"MPU401Close() called!\n");
189 Irp->IoStatus.Information = 0;
209 DPRINT(
"MPU401Cleanup() called!\n");
212 for (Channel = 0; Channel <= 15; Channel ++)
222 Irp->IoStatus.Information = 0;
246 DPRINT(
"MPU401DeviceControl() called!\n");
251 DPRINT(
"Control code %d [0x%x]\n",
Stack->Parameters.DeviceIoControl.IoControlCode,
252 Stack->Parameters.DeviceIoControl.IoControlCode);
254 switch(
Stack->Parameters.DeviceIoControl.IoControlCode)
258 DPRINT(
"Received IOCTL_MIDI_PLAY\n");
261 DPRINT(
"Sending %d bytes of MIDI data to 0x%x:\n",
Stack->Parameters.DeviceIoControl.InputBufferLength, DeviceExtension->Port);
356 DPRINT(
"MPU401Unload() called!\n");
377 DPRINT(
"MPU401 Device Driver 0.0.1\n");
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define STATUS_NOT_IMPLEMENTED
#define NT_SUCCESS(StatCode)
DRIVER_INITIALIZE DriverEntry
static NTSTATUS NTAPI MPU401Create(PDEVICE_OBJECT DeviceObject, PIRP Irp)
static NTSTATUS NTAPI MPU401Cleanup(PDEVICE_OBJECT DeviceObject, PIRP Irp)
static NTSTATUS NTAPI MPU401Close(PDEVICE_OBJECT DeviceObject, PIRP Irp)
static VOID NTAPI MPU401Unload(PDRIVER_OBJECT DriverObject)
static NTSTATUS InitDevice(IN PUNICODE_STRING RegistryPath, IN PVOID Context)
static NTSTATUS NTAPI MPU401DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
#define MPU401_WRITE_DATA(bp, x)
#define MPU401_WRITE_BYTE(bp, x)
BOOLEAN WaitToSend(ULONG BasePort)
BOOLEAN InitUARTMode(ULONG BasePort)
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
#define IoCompleteRequest
NTSTATUS NTAPI IoCreateSymbolicLink(IN PUNICODE_STRING SymbolicLinkName, IN PUNICODE_STRING DeviceName)
#define FILE_DEVICE_SOUND
#define IRP_MJ_DEVICE_CONTROL
#define RTL_CONSTANT_STRING(s)
#define RtlZeroMemory(Destination, Length)
#define STATUS_INSUFFICIENT_RESOURCES
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _In_ LARGE_INTEGER ByteCount