PropWare  3.0.0.229
C++ objects and CMake build system for Parallax Propeller
putln.c
1 /*
2  * @file putLine.c
3  * Function to print a string with new-line to the terminal.
4  *
5  * Copyright (c) 2013, Parallax Inc.
6  * Written by Steve Denson
7  * putln name by Parallax.
8  */
9 #include "simpletext.h"
10 
11 extern HUBDATA terminal *dport_ptr;
12 
13 int putln(const char *str)
14 {
15  int n = 0;
16  while(*str)
17  {
18  putChar(*str);
19  str++;
20  n++;
21  }
22  //putChar('\n');
23  //putChar(*(dport_ptr->ec));
24  putChar(dport_ptr->ecA);
25  return n;
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 
53 
putln
int putln(const char *str)
Print string + new line on the transmit debug port.
Definition: putln.c:13
simpletext.h
This library provides a collection of functions for communicating with text devices such as SimpleIDE...
HUBDATA
#define HUBDATA
HUBDATA tells compiler to put data into HUB RAM section. This is mostly useful in XMM modes where dat...
Definition: propeller.h:32
putChar
void putChar(char c)
Print a char to the debug port.
Definition: putChar.c:30
text_struct
Structure that contains data used by simple text device libraries.
Definition: simpletext.h:81
text_struct::ecA
volatile char ecA
Definition: simpletext.h:97