PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
Namespace List
Class List
File List
Examples
Build System
File List
File Members
propsideworkspace
Learn
Simple Libraries
TextDevices
libsimpletext
simpleterm_close.c
1
/*
2
* @file SimpleTerm_close.c
3
* SimpleTerm close is rarely used.
4
*
5
* Copyright (c) 2013, Parallax Inc.
6
* Written by Steve Denson
7
*/
8
#include "serial.h"
9
10
extern
HUBDATA
terminal
*dport_ptr;
11
12
void
simpleterm_close()
13
{
14
extern
text_t
*dport_ptr;
15
if
(!dport_ptr)
16
return
;
17
serial_close(dport_ptr);
18
dport_ptr = 0;
19
}
20
21
terminal
*simpleterm_reopen(
int
rxpin,
int
txpin,
int
mode,
int
baud)
22
{
23
simpleterm_close();
24
dport_ptr = serial_open(rxpin, txpin, mode, baud);
25
return
dport_ptr;
26
}
27
28
/*
29
+--------------------------------------------------------------------
30
| TERMS OF USE: MIT License
31
+--------------------------------------------------------------------
32
Permission is hereby granted, free of charge, to any person obtaining
33
a copy of this software and associated documentation files
34
(the "Software"), to deal in the Software without restriction,
35
including without limitation the rights to use, copy, modify, merge,
36
publish, distribute, sublicense, and/or sell copies of the Software,
37
and to permit persons to whom the Software is furnished to do so,
38
subject to the following conditions:
39
40
The above copyright notice and this permission notice shall be
41
included in all copies or substantial portions of the Software.
42
43
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
44
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
45
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
46
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
47
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
48
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
49
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
50
+--------------------------------------------------------------------
51
*/
52
text_struct
Structure that contains data used by simple text device libraries.
Definition:
simpletext.h:70
Generated on Sat Aug 27 2016 00:58:09 for PropWare by
1.8.12