131 lines
10 KiB
HTML
131 lines
10 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||
|
<title>CTHN.de - LEDCube - commandline client: ledcube.h Source File</title>
|
||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="search/search.js"></script>
|
||
|
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
||
|
</head>
|
||
|
<body onload='searchBox.OnSelectItem(0);'>
|
||
|
<!-- Generated by Doxygen 1.7.4 -->
|
||
|
<script type="text/javascript"><!--
|
||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||
|
--></script>
|
||
|
<div id="top">
|
||
|
<div id="titlearea">
|
||
|
<table cellspacing="0" cellpadding="0">
|
||
|
<tbody>
|
||
|
<tr style="height: 56px;">
|
||
|
<td style="padding-left: 0.5em;">
|
||
|
<div id="projectname">CTHN.de - LEDCube - commandline client</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div id="navrow1" class="tabs">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||
|
<li id="searchli">
|
||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||
|
<span class="left">
|
||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
alt=""/>
|
||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||
|
</span><span class="right">
|
||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||
|
</span>
|
||
|
</div>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div id="navrow2" class="tabs2">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||
|
<li><a href="globals.html"><span>File Members</span></a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="header">
|
||
|
<div class="headertitle">
|
||
|
<div class="title">ledcube.h</div> </div>
|
||
|
</div>
|
||
|
<div class="contents">
|
||
|
<a href="ledcube_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
|
||
|
<a name="l00002"></a>00002 <span class="comment"> * CTHN.de MiniLEDCube</span>
|
||
|
<a name="l00003"></a>00003 <span class="comment"> *</span>
|
||
|
<a name="l00004"></a>00004 <span class="comment"> * By Kai Lauterbach (klaute at web dot de) 11/2011</span>
|
||
|
<a name="l00005"></a>00005 <span class="comment"> *</span>
|
||
|
<a name="l00006"></a>00006 <span class="comment"> * Based on http://mosfetkiller.de/?s=miniledcube</span>
|
||
|
<a name="l00007"></a>00007 <span class="comment"> *</span>
|
||
|
<a name="l00008"></a>00008 <span class="comment"> * License: General Public License (GPL v3)</span>
|
||
|
<a name="l00009"></a>00009 <span class="comment"> *</span>
|
||
|
<a name="l00010"></a>00010 <span class="comment"> */</span>
|
||
|
<a name="l00011"></a>00011
|
||
|
<a name="l00012"></a>00012 <span class="preprocessor">#ifndef __LEDCUBE_H_INCLUDED__</span>
|
||
|
<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">#define __LEDCUBE_H_INCLUDED__</span>
|
||
|
<a name="l00014"></a>00014 <span class="preprocessor"></span>
|
||
|
<a name="l00015"></a><a class="code" href="ledcube_8h.html#ac70f88eda20bac5cf379d1512ad5f2ab">00015</a> <span class="preprocessor">#define NOT_CONNECTED_ERROR -1</span>
|
||
|
<a name="l00016"></a><a class="code" href="ledcube_8h.html#a9346e6751e831ccf0560c7a1152a2fab">00016</a> <span class="preprocessor"></span><span class="preprocessor">#define DEVICE_NOT_FOUND_ERROR -2</span>
|
||
|
<a name="l00017"></a>00017 <span class="preprocessor"></span>
|
||
|
<a name="l00018"></a><a class="code" href="ledcube_8h.html#a685f5d598cb43342b6357ced7e77c380">00018</a> <span class="preprocessor">#define SUCCESSFULLY_CONNECTED 1</span>
|
||
|
<a name="l00019"></a>00019 <span class="preprocessor"></span>
|
||
|
<a name="l00020"></a>00020 <span class="preprocessor">#include <stdio.h></span>
|
||
|
<a name="l00021"></a>00021 <span class="preprocessor">#include <usb.h></span> <span class="comment">/* this is libusb */</span>
|
||
|
<a name="l00022"></a>00022
|
||
|
<a name="l00023"></a>00023 <span class="preprocessor">#include "<a class="code" href="opendevice_8h.html">opendevice.h</a>"</span> <span class="comment">/* common code moved to separate module */</span>
|
||
|
<a name="l00024"></a>00024
|
||
|
<a name="l00025"></a>00025 <span class="preprocessor">#include "../firmware/globals.h"</span> <span class="comment">/* custom request numbers */</span>
|
||
|
<a name="l00026"></a>00026 <span class="preprocessor">#include "../firmware/requests.h"</span> <span class="comment">/* custom request numbers */</span>
|
||
|
<a name="l00027"></a>00027 <span class="preprocessor">#include "../firmware/usbconfig.h"</span> <span class="comment">/* device's VID/PID and names */</span>
|
||
|
<a name="l00028"></a>00028
|
||
|
<a name="l00029"></a><a class="code" href="ledcube_8h.html#a6425bf1a1c385443f415abfd8287f1a3">00029</a> usb_dev_handle *<a class="code" href="ledcube_8h.html#a6425bf1a1c385443f415abfd8287f1a3">_lc_handle</a> = NULL;
|
||
|
<a name="l00030"></a>00030
|
||
|
<a name="l00031"></a><a class="code" href="ledcube_8h.html#a27287e09e72aa83387797c8f7934c404">00031</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="ledcube_8h.html#a27287e09e72aa83387797c8f7934c404">_lc_rawVid</a>[2] = {USB_CFG_VENDOR_ID},
|
||
|
<a name="l00032"></a><a class="code" href="ledcube_8h.html#af3706eb25df4a97fb3afb5c76b725ac2">00032</a> <a class="code" href="ledcube_8h.html#af3706eb25df4a97fb3afb5c76b725ac2">_lc_rawPid</a>[2] = {USB_CFG_DEVICE_ID};
|
||
|
<a name="l00033"></a>00033
|
||
|
<a name="l00034"></a><a class="code" href="ledcube_8h.html#ac302050d44ed50afec5d806d0834ff32">00034</a> <span class="keywordtype">char</span> <a class="code" href="ledcube_8h.html#ac302050d44ed50afec5d806d0834ff32">_lc_vendor</a>[] = {USB_CFG_VENDOR_NAME, 0},
|
||
|
<a name="l00035"></a><a class="code" href="ledcube_8h.html#aa46691773a9b13cbaee644ec4d4a28aa">00035</a> <a class="code" href="ledcube_8h.html#aa46691773a9b13cbaee644ec4d4a28aa">_lc_product</a>[] = {USB_CFG_DEVICE_NAME, 0};
|
||
|
<a name="l00036"></a>00036
|
||
|
<a name="l00037"></a><a class="code" href="ledcube_8h.html#ac61239c8872d93071e0f9824234b6cd8">00037</a> <span class="keywordtype">char</span> <a class="code" href="ledcube_8h.html#ac61239c8872d93071e0f9824234b6cd8">_lc_buffer</a>[4];
|
||
|
<a name="l00038"></a>00038
|
||
|
<a name="l00039"></a><a class="code" href="ledcube_8h.html#aa24273d8d3e8fd3f3af40fe62bf82439">00039</a> <span class="keywordtype">int</span> <a class="code" href="ledcube_8h.html#aa24273d8d3e8fd3f3af40fe62bf82439">_lc_vid</a>,
|
||
|
<a name="l00040"></a>00040 <a class="code" href="ledcube_8h.html#a90c96f24a9760ef3a0e7e4d718fefe3f">_lc_pid</a>;
|
||
|
<a name="l00041"></a>00041
|
||
|
<a name="l00042"></a>00042 <span class="keywordtype">int</span> <a class="code" href="clcc_8c.html#ab49cd720216d340f0a8d714c5a0edc0c" title="The setFrame function.">lc_setFrame</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>);
|
||
|
<a name="l00043"></a>00043 <span class="keywordtype">int</span> <a class="code" href="clcc_8c.html#a3f08044a8d0798166650fe7b6db4a9ef" title="The setMode function.">lc_setMode</a>(<span class="keywordtype">int</span>);
|
||
|
<a name="l00044"></a>00044 <span class="keywordtype">int</span> <a class="code" href="clcc_8c.html#a5e18f08e6f672e6bd82897c3b4da6a43">lc_saveFrame</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>);
|
||
|
<a name="l00045"></a>00045 <span class="keywordtype">int</span> <a class="code" href="clcc_8c.html#ad597eaee897fac3032ba8f152ceeaab3" title="The init function.">lc_init</a>(<span class="keywordtype">void</span>);
|
||
|
<a name="l00046"></a>00046 <span class="keywordtype">int</span> <a class="code" href="clcc_8c.html#aac3c592ebdd30e903e4a6b3f1bc1fa6a" title="The close function.">lc_close</a>(<span class="keywordtype">void</span>);
|
||
|
<a name="l00047"></a>00047
|
||
|
<a name="l00048"></a>00048 <span class="preprocessor">#endif // __LEDCUBE_H_INCLUDED__</span>
|
||
|
<a name="l00049"></a>00049 <span class="preprocessor"></span>
|
||
|
</pre></div></div>
|
||
|
</div>
|
||
|
<!-- window showing the filter options -->
|
||
|
<div id="MSearchSelectWindow"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Defines</a></div>
|
||
|
|
||
|
<!-- iframe showing the search results (closed by default) -->
|
||
|
<div id="MSearchResultsWindow">
|
||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||
|
name="MSearchResults" id="MSearchResults">
|
||
|
</iframe>
|
||
|
</div>
|
||
|
|
||
|
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 25 2011 13:37:31 for CTHN.de - LEDCube - commandline client by 
|
||
|
<a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||
|
</body>
|
||
|
</html>
|