Home > Arduino, Bluetooth, TKJ Electronics, USB > Documentation added for the USB Host Library

Documentation added for the USB Host Library

February 20th, 2013 Leave a comment Go to comments

I’m happy to announce that documentation is now available for all the libraries I have written for the USB Host Shield library.
The documentation is available at the following link: http://felis.github.com/USB_Host_Shield_2.0.
The documentation is generated using Doxygen which is a free documentation-generator based upon the header files in the source code.

For instance the following comment will end up looking like this in the documentation:

I hope this will be useful for people who is new to the USB host library or even people who just want a quick overview.
If you spot any typos or got any comments please let me know in the comments below.

Categories: Arduino, Bluetooth, TKJ Electronics, USB Tags:
  1. Kareem
    February 23rd, 2013 at 23:06 | #1

    Awesome Lauszus,
    Thank you very much

  2. March 8th, 2013 at 08:39 | #2

    Thank you for this.
    It would be great if the same could be made for the PTP lib.
    I’m struggling with being able to compile the examples for this library and cannot find an accurate guide and help…

  3. March 8th, 2013 at 11:45 | #3

    @Adi Soffer
    I haven’t wrote that library, so I’m afraid that I’m not able to do that.
    What version of the QP library are you using? Actually I have never used that library.

  4. March 8th, 2013 at 20:39 | #4

    @Lauszus
    Hey -- thanks for taking the time here --
    after reading extensively about it I’m using 4.3

  5. March 8th, 2013 at 21:14 | #5

    @Adi Soffer
    Here is a zip file with the code: PTP_20.zip. I have made the necessary changes, in order for the library to compile.
    Also make sure that the USB Host library directory is called: “USB_Host_Shield_20″

  6. March 8th, 2013 at 21:47 | #6

    I really appreciate this.
    Since I’ve gone through all sorts of library editing after reading comments and tips,
    I’ll let you know the changes I’ve made:
    1. Replaced qp_ccp (as was recommended by Oleg)
    2. Commented out these lines in the qp_port.cpp: (as was recommended by Alex)
    // void operator delete(void *) {
    // Q_ERROR(); // this operator should never be actually called
    // }
    3. Added the following line to eoseventhandler.h file found in EOSCamController folder:
    virtual void OnObjectCreated(const EOSEvent *evt) {};
    (as was recommended by Alex)

    All this led to being able to compile all -- but the EOSRemote sketch -- that compiled with the following error:
    EOSRemote.cpp: In member function ‘virtual void CamStateHandlers::OnDeviceInitializedState(PTP*)’:
    EOSRemote.pde:-1: error: cannot declare variable ‘hnd’ to be of abstract type ‘EosEventHandlers’
    /eoseventhandlers.h:12: note: because the following virtual functions are pure within ‘EosEventHandlers’:
    C:\Program Files (x86)\arduino-1.0.1\libraries\ptp/eoseventparser.h:37: note: virtual void EOSEventHandlers::OnObjectCreated(const EOSEvent*)

    Now, after dl your zip and renaming as instructed, EOSCamController is no longer able to compile. I’m pasting jsut the first few lines of the error log so as not to clog everything up here:
    qp\qp.cpp.o: In function `QEP::getVersion()’:
    C:\Program Files (x86)\arduino-1.0.3\libraries\qp/qp.cpp:95: multiple definition of `QEP::getVersion()’
    PTP_20\qp.cpp.o:C:\Program Files (x86)\arduino-1.0.3\libraries\PTP_20/qp.cpp:95: first defined here

    Once again, thanks a lot

  7. March 8th, 2013 at 21:50 | #7

    @soffer
    Simply delete both the PTP and QP libraries downloaded and download the zip file I provided! I have made the necessary changes to make it work.

  8. March 8th, 2013 at 22:11 | #8

    Oh man -- It is finally compiling!
    Thank you so much!
    This is great, and I’m truly thankful.

    I can finally begin testing this with my 5D mkII

    :-)

  9. March 8th, 2013 at 22:20 | #9

    @soffer
    You are welcome :)

  10. Jose Wilson
    March 13th, 2013 at 19:03 | #10

    Mil gracias por informacion tan valiosa. Será de gran ayuda para realizar proyectos con arduino.

  11. March 13th, 2013 at 19:18 | #11

    @Jose Wilson
    You are welcome :)

  12. Moofleta
    July 15th, 2013 at 03:11 | #12

    downloading the current USB_Host_Shield_20 then your PTP_20 above, can not compile any of the files due to PrintHex:

    (example from EOSRemote)

    C:\Users\moofleta\Documents\Arduino\libraries\PTP_20\eoseventdump.cpp: In member function ‘virtual void EOSEventDump::Parse(uint16_t, const uint8_t*, const uint32_t&)’:
    C:\Users\moofleta\Documents\Arduino\libraries\PTP_20\eoseventdump.cpp:38: error: no matching function for call to ‘PrintHex(unsigned char&)’
    C:\Users\moofleta\Documents\Arduino\libraries\PTP_20\eoseventdump.cpp:67: error: no matching function for call to ‘PrintHex(unsigned char&)’
    C:\Users\moofleta\Documents\Arduino\libraries\PTP_20\eoseventdump.cpp:81: error: no matching function for call to ‘PrintHex(unsigned char&)’
    C:\Users\moofleta\Documents\Arduino\libraries\PTP_20\eoseventdump.cpp:99: error: no matching function for call to ‘PrintHex(unsigned char&)’

    @Lauszus -- any chance that the PrintHex is either not being loaded or changed? I could not find (maybe I missed) where its including printhex.h also I saw that many of the other examples were modified to use: D_PrintHex recently.
    Could you please assist?

  13. July 15th, 2013 at 18:54 | #13

    @Moofleta
    That’s because the libraries has been changes since.
    I believe Oleg has already made the changes to the PTP library: https://github.com/felis/PTP_2.0/commits/master.

    Please see the following comment I wrote: http://www.circuitsathome.com/camera-control/ptp-2-0-library-function-turns-on-bulb-mode-on-nikon-dslr-camera-via-usb/comment-page-1#comment-18312.
    It shows all the steps you need to do in order for it to compile :)

  14. Moofleta
    July 21st, 2013 at 20:32 | #14

    Thank you for the tips, any idea if Canon 5D Mark 3 is supported?

  15. July 23rd, 2013 at 01:59 | #15

    @Moofleta
    Yes it is supported ;)

  1. February 21st, 2013 at 06:38 | #1
  2. April 14th, 2013 at 01:40 | #2