summaryrefslogtreecommitdiffstats
path: root/group__gpio.html
blob: abce3977d08c32af1ce00a9c6c049e0b23b267ae (plain)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Sensor Watch: Digital Input and Output</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="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Sensor Watch
   &#160;<span id="projectnumber">0.0.0</span>
   </div>
   <div id="projectbrief">A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @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&amp;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>
</div><!-- top -->
<!-- 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 class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Digital Input and Output</div>  </div>
</div><!--header-->
<div class="contents">

<p>This section covers functions related to general-purpose input and output signals.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga8f6035dc4a5226fa34504e8a5a930e0c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio.html#ga8f6035dc4a5226fa34504e8a5a930e0c">watch_enable_digital_input</a> (const uint8_t pin)</td></tr>
<tr class="memdesc:ga8f6035dc4a5226fa34504e8a5a930e0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the selected pin for digital input.  <a href="group__gpio.html#ga8f6035dc4a5226fa34504e8a5a930e0c">More...</a><br /></td></tr>
<tr class="separator:ga8f6035dc4a5226fa34504e8a5a930e0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae58e015e96f9e9c42a664b69185265b9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio.html#gae58e015e96f9e9c42a664b69185265b9">watch_disable_digital_input</a> (const uint8_t pin)</td></tr>
<tr class="memdesc:gae58e015e96f9e9c42a664b69185265b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables any digital input, along with any pull-up or pull-down configuration.  <a href="group__gpio.html#gae58e015e96f9e9c42a664b69185265b9">More...</a><br /></td></tr>
<tr class="separator:gae58e015e96f9e9c42a664b69185265b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga55a16884f634ee0eb2c981d1b9a06a4d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio.html#ga55a16884f634ee0eb2c981d1b9a06a4d">watch_enable_pull_up</a> (const uint8_t pin)</td></tr>
<tr class="memdesc:ga55a16884f634ee0eb2c981d1b9a06a4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables a pull-up resistor on the selected pin.  <a href="group__gpio.html#ga55a16884f634ee0eb2c981d1b9a06a4d">More...</a><br /></td></tr>
<tr class="separator:ga55a16884f634ee0eb2c981d1b9a06a4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae974fce4ac5d38ffe256186a84c63ff9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio.html#gae974fce4ac5d38ffe256186a84c63ff9">watch_enable_pull_down</a> (const uint8_t pin)</td></tr>
<tr class="memdesc:gae974fce4ac5d38ffe256186a84c63ff9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables a pull-down resistor on the selected pin.  <a href="group__gpio.html#gae974fce4ac5d38ffe256186a84c63ff9">More...</a><br /></td></tr>
<tr class="separator:gae974fce4ac5d38ffe256186a84c63ff9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacc7c5e867c05cd03f5955e8e8036b879"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio.html#gacc7c5e867c05cd03f5955e8e8036b879">watch_get_pin_level</a> (const uint8_t pin)</td></tr>
<tr class="memdesc:gacc7c5e867c05cd03f5955e8e8036b879"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the level of the selected pin.  <a href="group__gpio.html#gacc7c5e867c05cd03f5955e8e8036b879">More...</a><br /></td></tr>
<tr class="separator:gacc7c5e867c05cd03f5955e8e8036b879"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf73a6405eb90bc6de32fb66f512fe4a9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio.html#gaf73a6405eb90bc6de32fb66f512fe4a9">watch_enable_digital_output</a> (const uint8_t pin)</td></tr>
<tr class="memdesc:gaf73a6405eb90bc6de32fb66f512fe4a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the selected pin for digital output.  <a href="group__gpio.html#gaf73a6405eb90bc6de32fb66f512fe4a9">More...</a><br /></td></tr>
<tr class="separator:gaf73a6405eb90bc6de32fb66f512fe4a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga15b40170b4225ac6a927da1d76e4fd3d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio.html#ga15b40170b4225ac6a927da1d76e4fd3d">watch_disable_digital_output</a> (const uint8_t pin)</td></tr>
<tr class="memdesc:ga15b40170b4225ac6a927da1d76e4fd3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables digital output on the selected pin.  <a href="group__gpio.html#ga15b40170b4225ac6a927da1d76e4fd3d">More...</a><br /></td></tr>
<tr class="separator:ga15b40170b4225ac6a927da1d76e4fd3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2e781c7e15045d2270f0cb3f87d619d6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio.html#ga2e781c7e15045d2270f0cb3f87d619d6">watch_set_pin_level</a> (const uint8_t pin, const bool level)</td></tr>
<tr class="memdesc:ga2e781c7e15045d2270f0cb3f87d619d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the level of the selected pin.  <a href="group__gpio.html#ga2e781c7e15045d2270f0cb3f87d619d6">More...</a><br /></td></tr>
<tr class="separator:ga2e781c7e15045d2270f0cb3f87d619d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This section covers functions related to general-purpose input and output signals. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="gae58e015e96f9e9c42a664b69185265b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae58e015e96f9e9c42a664b69185265b9">&#9670;&nbsp;</a></span>watch_disable_digital_input()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void watch_disable_digital_input </td>
          <td>(</td>
          <td class="paramtype">const uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disables any digital input, along with any pull-up or pull-down configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>The pin that you wish to disable. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga15b40170b4225ac6a927da1d76e4fd3d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga15b40170b4225ac6a927da1d76e4fd3d">&#9670;&nbsp;</a></span>watch_disable_digital_output()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void watch_disable_digital_output </td>
          <td>(</td>
          <td class="paramtype">const uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disables digital output on the selected pin. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>The pin that you wish disable. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8f6035dc4a5226fa34504e8a5a930e0c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8f6035dc4a5226fa34504e8a5a930e0c">&#9670;&nbsp;</a></span>watch_enable_digital_input()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void watch_enable_digital_input </td>
          <td>(</td>
          <td class="paramtype">const uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configures the selected pin for digital input. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>The pin that you wish to act as an input. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaf73a6405eb90bc6de32fb66f512fe4a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf73a6405eb90bc6de32fb66f512fe4a9">&#9670;&nbsp;</a></span>watch_enable_digital_output()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void watch_enable_digital_output </td>
          <td>(</td>
          <td class="paramtype">const uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configures the selected pin for digital output. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>The pin that you wish to act as an output. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gae974fce4ac5d38ffe256186a84c63ff9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae974fce4ac5d38ffe256186a84c63ff9">&#9670;&nbsp;</a></span>watch_enable_pull_down()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void watch_enable_pull_down </td>
          <td>(</td>
          <td class="paramtype">const uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enables a pull-down resistor on the selected pin. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>The pin that you wish to configure. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga55a16884f634ee0eb2c981d1b9a06a4d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga55a16884f634ee0eb2c981d1b9a06a4d">&#9670;&nbsp;</a></span>watch_enable_pull_up()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void watch_enable_pull_up </td>
          <td>(</td>
          <td class="paramtype">const uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enables a pull-up resistor on the selected pin. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>The pin that you wish to configure. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gacc7c5e867c05cd03f5955e8e8036b879"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacc7c5e867c05cd03f5955e8e8036b879">&#9670;&nbsp;</a></span>watch_get_pin_level()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool watch_get_pin_level </td>
          <td>(</td>
          <td class="paramtype">const uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the level of the selected pin. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>The pin whose value you wish to read. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the pin was logic high; otherwise, false. </dd></dl>

</div>
</div>
<a id="ga2e781c7e15045d2270f0cb3f87d619d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2e781c7e15045d2270f0cb3f87d619d6">&#9670;&nbsp;</a></span>watch_set_pin_level()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void watch_set_pin_level </td>
          <td>(</td>
          <td class="paramtype">const uint8_t&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const bool&#160;</td>
          <td class="paramname"><em>level</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the level of the selected pin. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>The pin whose value you wish to set. </td></tr>
    <tr><td class="paramname">level</td><td>The level you wish to set: true for high, false for low. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>