-
Notifications
You must be signed in to change notification settings - Fork 0
/
myUSB.h
43 lines (32 loc) · 1022 Bytes
/
myUSB.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// myUSB.h
// debugger
//
// Created by Matt Poppe on 1/25/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#ifndef _MY_USB
#define _MY_USB
#include <stdio.h>
#include <mach/mach.h>
#include <CoreFoundation/CFNumber.h>
#include <IOKit/IOKitLib.h>
#include <IOKit/IOCFPlugIn.h>
#include <IOKit/usb/IOUSBLib.h>
#include "myUSB.h"
#include "myTypes.h"
#define kUSBDeviceName "IOUSBDevice"
#define kVendorID 0x03EB
#define kProductID 0x2334
UInt8 usbDebug;
//USB Connections
IOUSBConfigurationDescriptorPtr confDesc;
UInt8 alarmOutPipeRef;
UInt8 alarmInPipeRef;
IOUSBDeviceInterface320 ** connectUSB(void);
IOUSBDeviceInterface320 ** getDevice(io_service_t usbDevice);
IOUSBInterfaceInterface300 ** getInterface(IOUSBDeviceInterface320 **dev, UInt8 num);
IOReturn transferData(IOUSBInterfaceInterface300 ***intf, char *outBuf, int len);
void asyncWriteCB(void *dummy, IOReturn result, void *arg0);
void interfaceInteraction (IOUSBInterfaceInterface300*** intfPtr, io_service_t Ref);
#endif