Rewrote A2D.h and D2A.h. Small style changes to the source files.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32789 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2009-08-28 18:44:17 +00:00
parent d1966ec2c2
commit d8c2849d2c
4 changed files with 46 additions and 64 deletions
+18 -27
View File
@@ -1,43 +1,34 @@
/******************************************************************************** /*
/ * Copyright 2009, Haiku, Inc. All rights reserved.
/ File: A2D.h * Distributed under the terms of the MIT License.
/ */
/ Description: Analog-to-Digital converter class header.
/
/ Copyright 1996-98, Be Incorporated, All Rights Reserved.
/
********************************************************************************/
#ifndef _A2D_H #ifndef _A2D_H
#define _A2D_H #define _A2D_H
#include <BeBuild.h> #include <BeBuild.h>
#include <stddef.h>
#include <SupportDefs.h> #include <SupportDefs.h>
/* -----------------------------------------------------------------------*/ #include <stddef.h>
class BA2D {
class BA2D {
public: public:
BA2D(); BA2D();
virtual ~BA2D(); virtual ~BA2D();
status_t Open(const char *portName); status_t Open(const char* portName);
void Close(void); void Close();
bool IsOpen(void); bool IsOpen();
ssize_t Read(ushort *buf); ssize_t Read(ushort* buf);
/* -----------------------------------------------------------------------*/
private: private:
virtual void _ReservedA2D1(); virtual void _ReservedA2D1();
virtual void _ReservedA2D2(); virtual void _ReservedA2D2();
virtual void _ReservedA2D3(); virtual void _ReservedA2D3();
int ffd; int fFd;
uint32 _fReserved[3]; uint32 _fReserved[3];
}; };
#endif #endif // _A2D_H
+19 -29
View File
@@ -1,45 +1,35 @@
/******************************************************************************** /*
/ * Copyright 2009, Haiku, Inc. All rights reserved.
/ File: D2A.h * Distributed under the terms of the MIT License.
/ */
/ Description: Digital-To-Analog converter class header.
/
/ Copyright 1996-98, Be Incorporated, All Rights Reserved.
/
********************************************************************************/
#ifndef _D2A_H #ifndef _D2A_H
#define _D2A_H #define _D2A_H
#include <BeBuild.h> #include <BeBuild.h>
#include <stddef.h>
#include <SupportDefs.h> #include <SupportDefs.h>
/* -----------------------------------------------------------------------*/ #include <stddef.h>
class BD2A {
class BD2A {
public: public:
BD2A(); BD2A();
virtual ~BD2A(); virtual ~BD2A();
status_t Open(const char *portName); status_t Open(const char* portName);
void Close(void); void Close();
bool IsOpen(void); bool IsOpen();
ssize_t Read(uint8 *buf); ssize_t Read(uint8* buf);
ssize_t Write(uint8 value); ssize_t Write(uint8 value);
/* -----------------------------------------------------------------------*/
private: private:
virtual void _ReservedD2A1();
virtual void _ReservedD2A2();
virtual void _ReservedD2A3();
virtual void _ReservedD2A1(); int fFd;
virtual void _ReservedD2A2(); uint32 _fReserved[3];
virtual void _ReservedD2A3();
int ffd;
uint32 _fReserved[3];
}; };
#endif #endif //_D2A_H
+5 -4
View File
@@ -5,6 +5,7 @@
#include <A2D.h> #include <A2D.h>
BA2D::BA2D() BA2D::BA2D()
{ {
} }
@@ -16,27 +17,27 @@ BA2D::~BA2D()
status_t status_t
BA2D::Open(const char *portName) BA2D::Open(const char* portName)
{ {
return B_ERROR; return B_ERROR;
} }
void void
BA2D::Close(void) BA2D::Close()
{ {
} }
bool bool
BA2D::IsOpen(void) BA2D::IsOpen()
{ {
return false; return false;
} }
ssize_t ssize_t
BA2D::Read(ushort *buf) BA2D::Read(ushort* buf)
{ {
return 0; return 0;
} }
+4 -4
View File
@@ -16,27 +16,27 @@ BD2A::~BD2A()
status_t status_t
BD2A::Open(const char *portName) BD2A::Open(const char* portName)
{ {
return B_ERROR; return B_ERROR;
} }
void void
BD2A::Close(void) BD2A::Close()
{ {
} }
bool bool
BD2A::IsOpen(void) BD2A::IsOpen()
{ {
return false; return false;
} }
ssize_t ssize_t
BD2A::Read(uint8 *buf) BD2A::Read(uint8* buf)
{ {
return 0; return 0;
} }