sanguino/cores/arduino/wiring_private.h

Fri, 17 Nov 2017 10:13:31 +0100

author
mdd
date
Fri, 17 Nov 2017 10:13:31 +0100
changeset 3
770b218a4931
parent 2
b373b0288715
permissions
-rw-r--r--

proper configuration, homing and planner optimization

2
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
1 /*
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
2 wiring_private.h - Internal header file.
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
3 Part of Arduino - http://www.arduino.cc/
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
4
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
5 Copyright (c) 2005-2006 David A. Mellis
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
6
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
7 This library is free software; you can redistribute it and/or
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
8 modify it under the terms of the GNU Lesser General Public
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
9 License as published by the Free Software Foundation; either
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
10 version 2.1 of the License, or (at your option) any later version.
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
11
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
12 This library is distributed in the hope that it will be useful,
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
15 Lesser General Public License for more details.
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
16
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
17 You should have received a copy of the GNU Lesser General
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
18 Public License along with this library; if not, write to the
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
19 Free Software Foundation, Inc., 59 Temple Place, Suite 330,
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
20 Boston, MA 02111-1307 USA
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
21
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
22 $Id: wiring.h 239 2007-01-12 17:58:39Z mellis $
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
23 */
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
24
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
25 #ifndef WiringPrivate_h
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
26 #define WiringPrivate_h
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
27
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
28 #include <avr/io.h>
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
29 #include <avr/interrupt.h>
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
30 #include <stdio.h>
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
31 #include <stdarg.h>
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
32
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
33 #include "Arduino.h"
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
34
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
35 #ifdef __cplusplus
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
36 extern "C"{
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
37 #endif
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
38
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
39 #ifndef cbi
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
40 #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
41 #endif
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
42 #ifndef sbi
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
43 #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
44 #endif
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
45
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
46 #define EXTERNAL_INT_0 0
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
47 #define EXTERNAL_INT_1 1
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
48 #define EXTERNAL_INT_2 2
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
49 #define EXTERNAL_INT_3 3
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
50 #define EXTERNAL_INT_4 4
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
51 #define EXTERNAL_INT_5 5
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
52 #define EXTERNAL_INT_6 6
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
53 #define EXTERNAL_INT_7 7
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
54
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
55 #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
56 #define EXTERNAL_NUM_INTERRUPTS 8
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
57 #elif defined(__AVR_ATmega1284P__)
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
58 #define EXTERNAL_NUM_INTERRUPTS 3
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
59 #else
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
60 #define EXTERNAL_NUM_INTERRUPTS 2
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
61 #endif
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
62
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
63 typedef void (*voidFuncPtr)(void);
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
64
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
65 #ifdef __cplusplus
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
66 } // extern "C"
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
67 #endif
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
68
b373b0288715 added missing sanguino files
mbayer
parents:
diff changeset
69 #endif

mercurial