source: thomson/elec/CrO2/software/device_libusb.h@ e017851

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

Port to Haiku. Untested.

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

  • Property mode set to 100644
File size: 693 bytes
Line 
1/* CrO2 datassette emulator
2 * Copyright 2012, Adrien Destugues <pulkomandy@pulkomandy.ath.cx>
3 *
4 * Distributed under the terms of the MIT licence.
5 *
6 * Handles device communication through libusb
7 */
8
9#include <stdint.h>
10#include <lusb0_usb.h>
11
12class Tape;
13
14class LibUSBDevice: public Device
15{
16 public:
17 ~LibUSBDevice();
18
19 int read(uint8_t* buffer, size_t max);
20 // Fill the buffer with data from device
21 int write(const uint8_t* buffer, size_t size, int blktype);
22 uint8_t getStatus();
23
24 private:
25 LibUSBDevice() throw(const char*);
26 // Open device and set it up for communication
27 LibUSBDevice(const Device& other);
28
29
30 usb_dev_handle* handle;
31};
Note: See TracBrowser for help on using the repository browser.