Project

General

Profile

Download (3.03 KB) Statistics
| Branch: | Tag: | Revision:
1 633c646a henryk
/*
2
	FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry.
3
4
	This file is part of the FreeRTOS.org distribution.
5
6
	FreeRTOS.org is free software; you can redistribute it and/or modify
7
	it under the terms of the GNU General Public License as published by
8
	the Free Software Foundation; either version 2 of the License, or
9
	(at your option) any later version.
10
11
	FreeRTOS.org is distributed in the hope that it will be useful,
12
	but WITHOUT ANY WARRANTY; without even the implied warranty of
13
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
	GNU General Public License for more details.
15
16
	You should have received a copy of the GNU General Public License
17
	along with FreeRTOS.org; if not, write to the Free Software
18
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
20
	A special exception to the GPL can be applied should you wish to distribute
21
	a combined work that includes FreeRTOS.org, without being obliged to provide
22
	the source code for any proprietary components.  See the licensing section 
23
	of http://www.FreeRTOS.org for full details of how and when the exception
24
	can be applied.
25
26
	***************************************************************************
27
	See http://www.FreeRTOS.org for documentation, latest information, license 
28
	and contact details.  Please ensure to read the configuration and relevant 
29
	port sections of the online documentation.
30
31
	Also see http://www.SafeRTOS.com for an IEC 61508 compliant version along
32
	with commercial development and support options.
33
	***************************************************************************
34
*/
35
36
#ifndef SERIAL_COMMS_H
37
#define SERIAL_COMMS_H
38
39
typedef void *xComPortHandle;
40
41
typedef enum
42
{
43
  serCOM1,
44
  serCOM2,
45
  serCOM3,
46
  serCOM4,
47
  serCOM5,
48
  serCOM6,
49
  serCOM7,
50
  serCOM8
51
} eCOMPort;
52
53
typedef enum
54
{
55
  serNO_PARITY,
56
  serODD_PARITY,
57
  serEVEN_PARITY,
58
  serMARK_PARITY,
59
  serSPACE_PARITY
60
} eParity;
61
62
typedef enum
63
{
64
  serSTOP_1,
65
  serSTOP_2
66
} eStopBits;
67
68
typedef enum
69
{
70
  serBITS_5,
71
  serBITS_6,
72
  serBITS_7,
73
  serBITS_8
74
} eDataBits;
75
76
typedef enum
77
{
78
  ser50,
79
  ser75,
80
  ser110,
81
  ser134,
82
  ser150,
83
  ser200,
84
  ser300,
85
  ser600,
86
  ser1200,
87
  ser1800,
88
  ser2400,
89
  ser4800,
90
  ser9600,
91
  ser19200,
92
  ser38400,
93
  ser57600,
94
  ser115200
95
} eBaud;
96
97
xComPortHandle xSerialPortInitMinimal (unsigned portLONG ulWantedBaud,
98
				       unsigned portBASE_TYPE uxQueueLength);
99
xComPortHandle xSerialPortInit (eCOMPort ePort, eBaud eWantedBaud,
100
				eParity eWantedParity,
101
				eDataBits eWantedDataBits,
102
				eStopBits eWantedStopBits,
103
				unsigned portBASE_TYPE uxBufferLength);
104
void vSerialPutString (xComPortHandle pxPort,
105
		       const signed portCHAR * const pcString,
106
		       unsigned portSHORT usStringLength);
107
signed portBASE_TYPE xSerialGetChar (xComPortHandle pxPort,
108
				     signed portCHAR * pcRxedChar,
109
				     portTickType xBlockTime);
110
signed portBASE_TYPE xSerialPutChar (xComPortHandle pxPort,
111
				     signed portCHAR cOutChar,
112
				     portTickType xBlockTime);
113
portBASE_TYPE xSerialWaitForSemaphore (xComPortHandle xPort);
114
void vSerialClose (xComPortHandle xPort);
115
116
#endif
Add picture from clipboard (Maximum size: 48.8 MB)