2009-08-28 22:44:17 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2009, Haiku, Inc. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2002-08-11 02:45:28 +04:00
|
|
|
#ifndef _D2A_H
|
|
|
|
#define _D2A_H
|
|
|
|
|
|
|
|
#include <BeBuild.h>
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
2009-08-28 22:44:17 +04:00
|
|
|
#include <stddef.h>
|
2002-08-11 02:45:28 +04:00
|
|
|
|
2009-08-28 22:44:17 +04:00
|
|
|
class BD2A {
|
2002-08-11 02:45:28 +04:00
|
|
|
public:
|
2009-08-28 22:54:39 +04:00
|
|
|
BD2A();
|
|
|
|
virtual ~BD2A();
|
2002-08-11 02:45:28 +04:00
|
|
|
|
2009-08-28 22:54:39 +04:00
|
|
|
status_t Open(const char* portName);
|
|
|
|
void Close();
|
|
|
|
bool IsOpen();
|
2002-08-11 02:45:28 +04:00
|
|
|
|
2009-08-28 22:54:39 +04:00
|
|
|
ssize_t Read(uint8* buf);
|
|
|
|
ssize_t Write(uint8 value);
|
2002-08-11 02:45:28 +04:00
|
|
|
|
|
|
|
private:
|
2009-08-28 22:44:17 +04:00
|
|
|
virtual void _ReservedD2A1();
|
|
|
|
virtual void _ReservedD2A2();
|
|
|
|
virtual void _ReservedD2A3();
|
2002-08-11 02:45:28 +04:00
|
|
|
|
2009-08-28 22:54:39 +04:00
|
|
|
int fFd;
|
|
|
|
uint32 _fReserved[3];
|
2002-08-11 02:45:28 +04:00
|
|
|
};
|
|
|
|
|
2009-08-28 22:44:17 +04:00
|
|
|
#endif //_D2A_H
|
|
|
|
|