main
Line | |
---|
1 | /* CrO2 datassette emulator
|
---|
2 | * Copyright 2013, Adrien Destugues <pulkomandy@pulkomandy.tk>
|
---|
3 | *
|
---|
4 | * Distributed under the terms of the MIT licence.
|
---|
5 | *
|
---|
6 | * Handles device communication through Haiku USB Kit
|
---|
7 | */
|
---|
8 |
|
---|
9 | #include "device.h"
|
---|
10 |
|
---|
11 | #include <stdint.h>
|
---|
12 | #include <USBKit.h>
|
---|
13 |
|
---|
14 | class Tape;
|
---|
15 |
|
---|
16 | class HaikuDevice: public Device
|
---|
17 | {
|
---|
18 | public:
|
---|
19 | ~HaikuDevice();
|
---|
20 |
|
---|
21 | // Device
|
---|
22 | int read(uint8_t* buffer, size_t max);
|
---|
23 | // Fill the buffer with data from device
|
---|
24 | int write(const uint8_t* buffer, size_t size, int blktype);
|
---|
25 | uint8_t getStatus();
|
---|
26 |
|
---|
27 | private:
|
---|
28 | HaikuDevice(BUSBDevice* handle) throw(const char*);
|
---|
29 | // Open device and set it up for communication
|
---|
30 | HaikuDevice(const Device& other);
|
---|
31 |
|
---|
32 | BUSBDevice* handle;
|
---|
33 |
|
---|
34 | friend Device& Device::getDevice();
|
---|
35 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.