~ubuntu-branches/ubuntu/gutsy/cwdaemon/gutsy

« back to all changes in this revision

Viewing changes to cwdaemon.h

  • Committer: Bazaar Package Importer
  • Author(s): Joop Stakenborg
  • Date: 2004-04-26 21:27:29 UTC
  • Revision ID: james.westby@ubuntu.com-20040426212729-3wwptnx2a1l9kein
Tags: 0.8
* Cwdaemon is now integrated with unixcw, see cwlib.c and cwlib.h.
  Weighting has been added to unixcw and some special characters needed
  by cwdaemon. The choppiness reported in previous versions of cwdaemon is
  fixed. And we have soundcard support!
* Better handling of aborting messages.
* Weighting now uses a value of -50 to 50.
* 2 extra command line options: -v for volume and -x for sound device.
* 2 extra escape sequences for controlling cwdaemon: ESCfx for switching the
  sound output on the fly and ESCgx for setting the soundcard volume.
* Tune (ESCc) now uses seconds as an argument, e.g. ESCc1 tunes 1 second,
  ESCc10 tunes 10 seconds. Maximum tune value is 10 seconds.
* A fix by Lada, OK1ZIA for big endian systems.
* Footswitch support by Wolf, DL2WRJ (pin 15 of the parallel port).
* New morse character '@' has been added.
* Process priority of cwdaemon can be set with the -P flag. You can try this
  if you experience timing problems.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * cwdaemon - morse sounding daemon for the parallel or serial port
 
3
 * Copyright (C) 2002 -2003 Joop Stakenborg <pg4i@amsat.org>
 
4
 *                       and many authors, see the AUTHORS file.
 
5
 *
 
6
 * This program is free oftware; 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
 * This program 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 Library General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the Free Software
 
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
19
 */
 
20
 
 
21
#ifndef _CWDAEMON_H
 
22
#define _CWDAEMON_H
 
23
 
 
24
#ifndef OFF
 
25
# define OFF 0
 
26
#endif
 
27
#ifndef ON
 
28
# define ON 1
 
29
#endif
 
30
#define MICROPHONE 0
 
31
#define SOUNDCARD 1
 
32
 
 
33
typedef struct cwdev_s
 
34
{
 
35
        int (*init) (struct cwdev_s *);
 
36
        int (*free) (struct cwdev_s *);
 
37
        int (*reset) (struct cwdev_s *);
 
38
        int (*cw) (struct cwdev_s *, int onoff);
 
39
        int (*ptt) (struct cwdev_s *, int onoff);
 
40
        int (*ssbway) (struct cwdev_s *, int onoff);
 
41
        int (*switchband) (struct cwdev_s *, unsigned char bandswitch);
 
42
        int (*footswitch) (struct cwdev_s *);
 
43
        int fd;
 
44
        char *desc;
 
45
}
 
46
cwdevice;
 
47
 
 
48
void errmsg (char *info, ...);
 
49
void debug (char *info, ...);
 
50
 
 
51
#ifdef HAVE_LINUX_PPDEV_H
 
52
int lp_init (cwdevice * dev);
 
53
int lp_free (cwdevice * dev);
 
54
int lp_reset (cwdevice * dev);
 
55
int lp_cw (cwdevice * dev, int onoff);
 
56
int lp_ptt (cwdevice * dev, int onoff);
 
57
int lp_ssbway (cwdevice * dev, int onoff);
 
58
int lp_switchband (cwdevice * dev, unsigned char bandswitch);
 
59
int lp_footswitch (cwdevice * dev);
 
60
#endif
 
61
 
 
62
int ttys_init (cwdevice * dev);
 
63
int ttys_free (cwdevice * dev);
 
64
int ttys_reset (cwdevice * dev);
 
65
int ttys_cw (cwdevice * dev, int onoff);
 
66
int ttys_ptt (cwdevice * dev, int onoff);
 
67
 
 
68
#endif /* _CWDAEMON_H */