-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_user_define_8h_source.html
More file actions
82 lines (80 loc) · 12.1 KB
/
Copy path_user_define_8h_source.html
File metadata and controls
82 lines (80 loc) · 12.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MiniMouse Stack: C:/GITEXT/githubdoc/LoRaWanMiniMouse.github.io/MMstack/UserCode/UserDefine.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="lora.bmp"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MiniMouse Stack
 <span id="projectnumber">V1.0.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</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>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_4479a50ac3338962579017839c6d11ac.html">GITEXT</a></li><li class="navelem"><a class="el" href="dir_313566ed96e2d68b7746be4483e9b217.html">githubdoc</a></li><li class="navelem"><a class="el" href="dir_a1fe12ccd40675146f9c8376113c041e.html">LoRaWanMiniMouse.github.io</a></li><li class="navelem"><a class="el" href="dir_502a2e6a450cda7c1e5931c413e42c70.html">MMstack</a></li><li class="navelem"><a class="el" href="dir_287984a24aa2b0df1572ba9f4b944a4c.html">UserCode</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">UserDefine.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="_user_define_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> </div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#ifndef USERDEFINE_H</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#define USERDEFINE_H</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include "mbed.h"</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment">/********************************************************************************/</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment">/* Application dependant */</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment">/********************************************************************************/</span></div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="_user_define_8h.html#a1a14f2ab6e23e263754ecca29d5114f1"> 29</a></span> <span class="preprocessor">#define DEBUG_TRACE 1 // set to 1 to activate debug traces</span></div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="_user_define_8h.html#aa3670ccf1c0318d91d5c20cfc35dce86"> 30</a></span> <span class="preprocessor">#define LOW_POWER_MODE 0 // set to 1 to activate sleep mode , set to 0 to replace by wait functions (easier in debug mode) </span></div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="_user_define_8h.html#ab74b6078d998f230d9698b29524ccd61"> 31</a></span> <span class="preprocessor">#define SERIAL_TX USBTX</span></div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="_user_define_8h.html#aaae3922f17d44d7598f76346d661d1f8"> 32</a></span> <span class="preprocessor">#define SERIAL_RX USBRX</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> </div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment">/*SX126w BOARD specific */</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment">//#define LORA_SPI_MOSI PA_7</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment">//#define LORA_SPI_MISO PA_6</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment">//#define LORA_SPI_SCLK PA_5</span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment">//#define LORA_CS PA_8</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="comment">//#define LORA_RESET PA_0</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="comment">//#define TX_RX_IT PB_4</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="comment">//#define LORA_BUSY PB_3</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="comment">//#define CRYSTAL_ERROR 10 // for mcu clock with 3% accuracy (in case of clk is generated by internal rc for example)</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="comment">//#define BOARD_DELAY_RX_SETTING_MS 7 // Time to configure board in rx mode</span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> </div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="comment">/*SX1276 BOARD specific */</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="_user_define_8h.html#a3f5699acd29748e068ddd6d6c28b8fab"> 49</a></span> <span class="preprocessor">#define LORA_SPI_MOSI D11</span></div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="_user_define_8h.html#af8db8e4d626d327ad8a7b2bf4455209c"> 50</a></span> <span class="preprocessor">#define LORA_SPI_MISO D12</span></div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="_user_define_8h.html#a7d5bea89ac1696411e1f40209e7ebaa7"> 51</a></span> <span class="preprocessor">#define LORA_SPI_SCLK D13</span></div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="_user_define_8h.html#a1cccfa48213935b19a2a848cc25cddf3"> 52</a></span> <span class="preprocessor">#define LORA_CS D10</span></div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="_user_define_8h.html#a34f60e4069b1e8a10b1e4e73a446f952"> 53</a></span> <span class="preprocessor">#define LORA_RESET A0</span></div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="_user_define_8h.html#aed07b4957134494f3545189abece0f04"> 54</a></span> <span class="preprocessor">#define TX_RX_IT D2 // Interrupt TX/RX Done</span></div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="_user_define_8h.html#a106bb2c77f5f8bbd6ec084f37e9c6506"> 55</a></span> <span class="preprocessor">#define RX_TIMEOUT_IT D3 // Interrupt RX TIME OUT </span></div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="_user_define_8h.html#ad6b73a2ceac7032b5468420fceb6122b"> 56</a></span> <span class="preprocessor">#define CRYSTAL_ERROR 5 // Crystal error of the MCU to fine adjust the rx window for lorawan ( ex: set 3² for a crystal error = 0.3%)</span></div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="_user_define_8h.html#a65798635bcc2b9f4f44d3ffc37ab0fdf"> 57</a></span> <span class="preprocessor">#define BOARD_DELAY_RX_SETTING_MS 4 // Delay introduce by the mcu Have to fine tune to adjust the window rx for lorawan</span></div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="_user_define_8h.html#ab2c34bea2b27ea30dceaba853cc8a341"> 58</a></span> <span class="preprocessor">#define PA_BOOST_CONNECTED 1 // Set to 1 to select Pa_boost outpin pin on the sx127x </span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="_user_define_8h.html#a177e4c7d734bdcefd2d0abda13f55887"> 60</a></span> <span class="preprocessor">#define FLASH_UPDATE_PERIOD 128 // The Lorawan context is stored in memory with a period equal to FLASH_UPDATE_PERIOD packets transmitted</span></div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="_user_define_8h.html#ac4f86f88b3a4d50662612b4e40c63c83"> 61</a></span> <span class="preprocessor">#define USERFLASHADRESS 0x807F800U - 2048 // start flash adress to store lorawan context</span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> </div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="_user_define_8h.html#af21473c2473c95f114bce9d3d2b39a1f"> 63</a></span> <span class="preprocessor">#define USER_NUMBER_OF_RETRANSMISSION 2 // Only used in case of user defined darate distribution strategy</span></div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="_user_define_8h.html#adf3d7d6b7db31d5d169ead702de25c77"> 64</a></span> <span class="preprocessor">#define USER_DR_DISTRIBUTION_PARAMETERS 0x11003300 + USER_NUMBER_OF_RETRANSMISSION // Only used in case of user defined darate distribution strategy refered to doc that explain this value</span></div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="preprocessor">#endif</span></div></div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>