Dependencies:   mbed

Committer:
abe00makoto
Date:
Thu May 26 19:39:37 2011 +0000
Revision:
1:237cfff63ef8
Parent:
0:e939856c1939

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
abe00makoto 0:e939856c1939 1
abe00makoto 0:e939856c1939 2 #ifndef ADK_H_INCLUDED
abe00makoto 0:e939856c1939 3 #define ADK_H_INCLUDED
abe00makoto 0:e939856c1939 4
abe00makoto 0:e939856c1939 5 #include "mbed.h"
abe00makoto 0:e939856c1939 6
abe00makoto 0:e939856c1939 7
abe00makoto 0:e939856c1939 8 #define ACCESSORY_STRING_MANUFACTURER 0
abe00makoto 0:e939856c1939 9 #define ACCESSORY_STRING_MODEL 1
abe00makoto 0:e939856c1939 10 #define ACCESSORY_STRING_DESCRIPTION 2
abe00makoto 0:e939856c1939 11 #define ACCESSORY_STRING_VERSION 3
abe00makoto 0:e939856c1939 12 #define ACCESSORY_STRING_URI 4
abe00makoto 0:e939856c1939 13 #define ACCESSORY_STRING_SERIAL 5
abe00makoto 0:e939856c1939 14
abe00makoto 0:e939856c1939 15 #define ACCESSORY_GET_PROTOCOL 51
abe00makoto 0:e939856c1939 16 #define ACCESSORY_SEND_STRING 52
abe00makoto 0:e939856c1939 17 #define ACCESSORY_START 53
abe00makoto 0:e939856c1939 18
abe00makoto 0:e939856c1939 19
abe00makoto 0:e939856c1939 20 //void sendString(int device, int index, const char *str);
abe00makoto 0:e939856c1939 21 //int getProtocol(int device);
abe00makoto 0:e939856c1939 22 bool switchDevice(int device);
abe00makoto 0:e939856c1939 23
abe00makoto 0:e939856c1939 24 class AdkUSB
abe00makoto 0:e939856c1939 25 {
abe00makoto 0:e939856c1939 26 public:
abe00makoto 0:e939856c1939 27 AdkUSB(int device, int configuration, int interfaceNumber);
abe00makoto 0:e939856c1939 28 int read(u8 *buff, int len, int nakLimit);
abe00makoto 0:e939856c1939 29 int write(u8 *buff, int len );
abe00makoto 0:e939856c1939 30 void loop();
abe00makoto 0:e939856c1939 31
abe00makoto 0:e939856c1939 32 private:
abe00makoto 0:e939856c1939 33 int input_ep;
abe00makoto 0:e939856c1939 34 int output_ep;
abe00makoto 0:e939856c1939 35 int _device;
abe00makoto 0:e939856c1939 36 int _configuration;
abe00makoto 0:e939856c1939 37 int _interfaceNumber;
abe00makoto 0:e939856c1939 38
abe00makoto 0:e939856c1939 39
abe00makoto 0:e939856c1939 40 };
abe00makoto 0:e939856c1939 41
abe00makoto 0:e939856c1939 42
abe00makoto 0:e939856c1939 43
abe00makoto 0:e939856c1939 44 #endif