ReactOS  0.4.15-dev-1397-g19779b3
version.c
Go to the documentation of this file.
1 /*
2  ReactOS Sound System
3  Sound Blaster DSP support
4  Version routine
5 
6  Author:
7  Andrew Greenwood (silverblade@reactos.org)
8 
9  History:
10  2 July 2008 - Created (split from sbdsp.c)
11 
12  Notes:
13  Functions documented in sbdsp.h
14 */
15 
16 #include "precomp.h"
17 
20  IN PUCHAR BasePort,
24 {
26 
27  /* Make sure our parameters are sane */
28  if ( ! MajorVersion )
30 
31  if ( ! MinorVersion )
33 
34  /* Send version request */
36  if ( Status != STATUS_SUCCESS )
37  return Status;
38 
39  /* Get the major version */
40  Status = SbDspRead(BasePort, MajorVersion, Timeout);
41  if ( Status != STATUS_SUCCESS )
42  return FALSE;
43 
44  /* Get the minor version */
45  Status = SbDspRead(BasePort, MinorVersion, Timeout);
46  return Status;
47 }
#define IN
Definition: typedefs.h:39
NTSTATUS SbDspWrite(IN PUCHAR BasePort, IN UCHAR DataByte, IN ULONG Timeout)
Definition: dsp_io.c:99
ULONG MinorVersion
Definition: ros_glue.cpp:5
ULONG MajorVersion
Definition: ros_glue.cpp:4
#define SB_DSP_VERSION
Definition: sbdsp.h:78
unsigned char * PUCHAR
Definition: retypes.h:3
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS SbDspRead(IN PUCHAR BasePort, OUT PUCHAR DataByte, IN ULONG Timeout)
Definition: dsp_io.c:120
#define STATUS_INVALID_PARAMETER_3
Definition: ntstatus.h:477
#define FALSE
Definition: types.h:117
NTSTATUS SbDspGetVersion(IN PUCHAR BasePort, OUT PUCHAR MajorVersion, OUT PUCHAR MinorVersion, IN ULONG Timeout)
Definition: version.c:19
#define STATUS_INVALID_PARAMETER_2
Definition: ntstatus.h:476
Status
Definition: gdiplustypes.h:24
static ULONG Timeout
Definition: ping.c:61
#define OUT
Definition: typedefs.h:40
unsigned int ULONG
Definition: retypes.h:1
#define STATUS_SUCCESS
Definition: shellext.h:65