source: thomson/elec/CrO2/software/device_bekit.h@ 6bd7144

main
Last change on this file since 6bd7144 was 6bd7144, checked in by Adrien Destugues <pulkomandy@…>, 11 years ago

More work on Haiku port

git-svn-id: svn://localhost/thomson@29 85ae3b6b-dc8f-4344-a89d-598714f2e4e5

  • Property mode set to 100644
File size: 743 bytes
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
14class Tape;
15
16class 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.