Subversion Repositories svn.mios

Rev

Rev 1 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
44 tk 1
// $Id: main.h 44 2008-01-30 21:39:30Z tk $
2
/*
3
 * Analog Toolbox
4
 *
5
 * ==========================================================================
6
 *
7
 * Copyright (C) 2005  Thorsten Klose (tk@midibox.org)
8
 *
9
 * ==========================================================================
10
 *
11
 * This file is part of a MIOS application
12
 *
13
 * This application is free software; you can redistribute it and/or modify
14
 * it under the terms of the GNU General Public License as published by
15
 * the Free Software Foundation; either version 2 of the License, or
16
 * (at your option) any later version.
17
 *
18
 * This application is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU General Public License
24
 * along with This application; if not, write to the Free Software
25
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
 *
27
 * ==========================================================================
28
 */
29
 
30
#ifndef _MAIN_H
31
#define _MAIN_H
32
 
33
/////////////////////////////////////////////////////////////////////////////
34
// Global definitions
35
/////////////////////////////////////////////////////////////////////////////
36
 
37
#define AIN_NUMBER_INPUTS      8    // number of used analog inputs (0..64)
38
#define AIN_MUXED_MODE         0    // set this to 1 if AIN modules are used
39
#define AIN_DEADBAND           3    // define deadband here (higher values reduce the effective resolution but reduce jitter)
40
 
41
// Note: AOUT specific settings are defined in aout.h
42
 
43
 
44
/////////////////////////////////////////////////////////////////////////////
45
// Global Types
46
/////////////////////////////////////////////////////////////////////////////
47
 
48
// status of analog toolbox application
49
typedef union {
50
  struct {
51
    unsigned ALL:8;
52
  };
53
  struct {
54
    unsigned DISPLAY_UPDATE_REQ:1;  // requests a display update
55
  };
56
} app_flags_t;
57
 
58
 
59
/////////////////////////////////////////////////////////////////////////////
60
// Export global variables
61
/////////////////////////////////////////////////////////////////////////////
62
extern app_flags_t app_flags;
63
 
64
extern unsigned char last_ain_pin;
65
 
66
#endif /* _MAIN_H */