<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Barry: bcharge.cc File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="classes.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="dir_212a764312e03f7cbfa751ada19e15e7.html">tools</a> </div> </div> <div class="contents"> <h1>bcharge.cc File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2> Talk to the Blackberry just enough to change the Max Power to 500mA. <p> Cycles through all devices attached to USB, attempting to set all matching Blackberry devices to charge.<p> This file is part of the <a class="el" href="namespaceBarry.html" title="Project namespace, containing all related functions and classes.">Barry</a> project:<p> <a href="http://www.netdirect.ca/software/packages/barry">http://www.netdirect.ca/software/packages/barry</a> <a href="http://sourceforge.net/projects/barry">http://sourceforge.net/projects/barry</a><p> Compile with the following command (needs libusb):<p> g++ -o bcharge <a class="el" href="bcharge_8cc.html" title="Talk to the Blackberry just enough to change the Max Power to 500mA.">bcharge.cc</a> -lusb <p>Definition in file <a class="el" href="bcharge_8cc-source.html">bcharge.cc</a>.</p> <p> <code>#include <usb.h></code><br> <code>#include <stdio.h></code><br> <code>#include <string.h></code><br> <code>#include <unistd.h></code><br> <code>#include <errno.h></code><br> <code>#include <sys/types.h></code><br> <code>#include <sys/stat.h></code><br> <code>#include <fcntl.h></code><br> <code>#include <string></code><br> <code>#include <barry/common.h></code><br> <code>#include "<a class="el" href="i18n_8h-source.html">i18n.h</a>"</code><br> <p> <div class="dynheader"> Include dependency graph for bcharge.cc:</div> <div class="dynsection"> <p><center><img src="bcharge_8cc__incl.png" border="0" usemap="#bcharge.cc_map" alt=""></center> <map name="bcharge.cc_map"> <area shape="rect" href="i18n_8h.html" title="Common internationalization defines, via gettext." alt="" coords="904,80,960,107"><area shape="rect" href="gettext_8h-source.html" title="gettext.h" alt="" coords="943,155,1015,181"></map> </div> <p> <a href="bcharge_8cc-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> </table> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Tue Mar 1 17:50:20 2011 for Barry by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> </body> </html>