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
|
/*
* Communication functions
* Copyright (C) 2008 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Author: Barry deFreese.
*/
/*
* Communication functions.
*
*/
#ifndef _COM_H_
#define _COM_H_
#include <mach/std_types.h>
#include <device/cons.h>
#include <device/tty.h>
#include <chips/busses.h>
/*
* Set receive modem state from modem status register.
*/
extern void fix_modem_state(int unit, int modem_stat);
extern void comtimer(void * param);
/*
* Modem change (input signals)
*/
extern void commodem_intr(int unit, int stat);
extern int comgetc(int unit);
extern int comcnprobe(struct consdev *cp);
extern int comcninit(struct consdev *cp);
extern int comcngetc(dev_t dev, int wait);
extern int comcnputc(dev_t dev, int c);
extern void comintr(int unit);
int comprobe(int port, struct bus_device *dev);
int commctl(struct tty *tp, int bits, int how);
void comstart(struct tty *tp);
void comstop(struct tty *tp, int flags);
void comattach(struct bus_device *dev);
extern io_return_t
comgetstat(
dev_t dev,
int flavor,
int *data,
natural_t *count);
extern io_return_t
comsetstat(
dev_t dev,
int flavor,
int *data,
natural_t count);
extern io_return_t comopen(int dev, int flag, io_req_t ior);
extern io_return_t comclose(int dev, int flag);
extern io_return_t comread(int dev, io_req_t ior);
extern io_return_t comwrite(int dev, io_req_t ior);
extern io_return_t comportdeath(dev_t dev, mach_port_t port);
#endif /* _COM_H_ */
|