mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
Temporarily named the device "MidiOut0" so mmdrv.dll (when committed!) will use it.
This driver can currently play some short MIDI messages when combined with my mmdrv.dll and miditest.exe programs (which I intend to commit eventually, once they're integrated into the ReactOS tree.) svn path=/trunk/; revision=7923
This commit is contained in:
parent
392b65e4a7
commit
d00716c055
5 changed files with 16 additions and 15 deletions
|
@ -13,6 +13,7 @@
|
|||
/* INCLUDES ****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <rosrtl/string.h>
|
||||
//#include <ddk/ntddbeep.h>
|
||||
|
||||
//#define NDEBUG
|
||||
|
@ -29,14 +30,14 @@ UINT DeviceCount = 0;
|
|||
/* FUNCTIONS ***************************************************************/
|
||||
|
||||
NTSTATUS InitDevice(
|
||||
IN PWSTR RegistryPath,
|
||||
IN PUNICODE_STRING RegistryPath,
|
||||
IN PVOID Context)
|
||||
{
|
||||
// PDEVICE_INSTANCE Instance = Context;
|
||||
PDEVICE_OBJECT DeviceObject; // = Context;
|
||||
PDEVICE_EXTENSION Parameters; // = DeviceObject->DeviceExtension;
|
||||
UNICODE_STRING DeviceName = UNICODE_STRING_INITIALIZER(L"\\Device\\MPU401_Out_0");
|
||||
UNICODE_STRING SymlinkName = UNICODE_STRING_INITIALIZER(L"\\??\\MPU401_Out_0");
|
||||
UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\MidiOut0");
|
||||
UNICODE_STRING SymlinkName = ROS_STRING_INITIALIZER(L"\\??\\MidiOut0");
|
||||
// CONFIG Config;
|
||||
RTL_QUERY_REGISTRY_TABLE Table[2];
|
||||
NTSTATUS s;
|
||||
|
@ -144,17 +145,17 @@ MPU401Create(PDEVICE_OBJECT DeviceObject,
|
|||
{
|
||||
DPRINT("MPU401Create() called!\n");
|
||||
|
||||
// Initialize the MPU-401
|
||||
// Initialize the MPU-401?
|
||||
// ... do stuff ...
|
||||
|
||||
|
||||
// Play a note to say we're alive:
|
||||
// WaitToSend(MPU401_PORT);
|
||||
// MPU401_WRITE_DATA(MPU401_PORT, 0x90);
|
||||
// WaitToSend(MPU401_PORT);
|
||||
// MPU401_WRITE_DATA(MPU401_PORT, 0x50);
|
||||
// WaitToSend(MPU401_PORT);
|
||||
// MPU401_WRITE_DATA(MPU401_PORT, 0x7f);
|
||||
/* WaitToSend(MPU401_PORT);
|
||||
MPU401_WRITE_DATA(MPU401_PORT, 0x90);
|
||||
WaitToSend(MPU401_PORT);
|
||||
MPU401_WRITE_DATA(MPU401_PORT, 0x50);
|
||||
WaitToSend(MPU401_PORT);
|
||||
MPU401_WRITE_DATA(MPU401_PORT, 0x7f);*/
|
||||
|
||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||
Irp->IoStatus.Information = 0;
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
|
||||
typedef struct _DEVICE_EXTENSION
|
||||
{
|
||||
PWSTR RegistryPath;
|
||||
PUNICODE_STRING RegistryPath;
|
||||
PDRIVER_OBJECT DriverObject;
|
||||
UINT Port;
|
||||
UINT IRQ;
|
||||
|
|
|
@ -85,7 +85,7 @@ BOOLEAN InitUARTMode(UINT BasePort)
|
|||
{
|
||||
// Check to make sure the reset was acknowledged:
|
||||
for (TimeOut = MPU401_TIMEOUT;
|
||||
Status = (MPU401_READ_DATA(BasePort) & 0xfe) && TimeOut > 0;
|
||||
(Status = (MPU401_READ_DATA(BasePort) & 0xfe) && TimeOut > 0);
|
||||
TimeOut --);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
else if (s == STATUS_ACCESS_DENIED) \
|
||||
DPRINT("NTSTATUS == ACCESS_DENIED\n") \
|
||||
else \
|
||||
DPRINT("NTSTATUS == FAILURE (???)\n"); \
|
||||
DPRINT("NTSTATUS == FAILURE (?)\n"); \
|
||||
}
|
||||
#else
|
||||
#define TEST_STATUS(s)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* Sept 27, 2003: Created
|
||||
*/
|
||||
|
||||
#include <ntddk.h>
|
||||
//#include <ntddk.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include "mpu401.h"
|
||||
|
@ -296,7 +296,7 @@ NTSTATUS SaveSettings(
|
|||
NT status STATUS_SUCCESS if successful
|
||||
*/
|
||||
{
|
||||
NTSTATUS s;
|
||||
// NTSTATUS s;
|
||||
|
||||
DPRINT("SaveSettings() unimplemented\n");
|
||||
|
||||
|
|
Loading…
Reference in a new issue