Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
ADK.h
00001 00002 #ifndef ADK_H_INCLUDED 00003 #define ADK_H_INCLUDED 00004 00005 #include "mbed.h" 00006 00007 00008 #define ACCESSORY_STRING_MANUFACTURER 0 00009 #define ACCESSORY_STRING_MODEL 1 00010 #define ACCESSORY_STRING_DESCRIPTION 2 00011 #define ACCESSORY_STRING_VERSION 3 00012 #define ACCESSORY_STRING_URI 4 00013 #define ACCESSORY_STRING_SERIAL 5 00014 00015 #define ACCESSORY_GET_PROTOCOL 51 00016 #define ACCESSORY_SEND_STRING 52 00017 #define ACCESSORY_START 53 00018 00019 00020 //void sendString(int device, int index, const char *str); 00021 //int getProtocol(int device); 00022 bool switchDevice(int device); 00023 00024 class AdkUSB 00025 { 00026 public: 00027 AdkUSB(int device, int configuration, int interfaceNumber); 00028 void setup(); 00029 int read(u8 *buff, int len ); 00030 int write(u8 *buff, int len ); 00031 void loop(); 00032 void loopend(){ 00033 _loopend=true; 00034 }; 00035 00036 00037 00038 private: 00039 00040 int input_ep; 00041 int output_ep; 00042 int _device; 00043 int _configuration; 00044 int _interfaceNumber; 00045 00046 bool _loopend; 00047 00048 00049 }; 00050 00051 00052 00053 #endif
Generated on Sat Jul 23 2022 04:28:40 by
1.7.2