fremoclock
1_3A01
FREMO Clock - Software for UTG
Main Page
Related Pages
Data Structures
Files
File List
Globals
sysdef.h
Go to the documentation of this file.
1
21
/*
22
Copyright (C) 2007 Bernd Wisotzki
23
24
This library is free software; you can redistribute it and/or
25
modify it under the terms of the GNU Lesser General Public
26
License as published by the Free Software Foundation; either
27
version 2.1 of the License, or (at your option) any later version.
28
29
This library is distributed in the hope that it will be useful,
30
but WITHOUT ANY WARRANTY; without even the implied warranty of
31
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
32
Lesser General Public License for more details.
33
34
You should have received a copy of the GNU Lesser General Public
35
License along with this library; if not, write to the Free Software
36
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
37
*/
38
39
#ifndef SYSDEF_H_
40
#define SYSDEF_H_
41
42
#include <avr/io.h>
// PORTA, DDRA, PINA, PINA0, .., PORTB, .., PORTC, ..
43
44
/* -- General Items --------------------------------------------------------- */
45
55
#if defined(__DOXYGEN__) // make visible to doxygen only
56
#define MCU
57
#endif
58
59
#ifndef F_CPU // if not predefined by eclipse avr plugin or makefile
60
64
//#define F_CPU 11059200 //slightly incorrect in SysHwTimer
65
//#define F_CPU 14745600 //slightly incorrect in SysHwTimer
66
//#define F_CPU 8000000
67
#define F_CPU 16000000
68
//#define F_CPU 18432000
69
//#define F_CPU 1000000 //not supported in SysHwTimer
70
//#define F_CPU 7372800 //not supported in SysHwTimer
71
#endif
72
77
#define VERSION "1.3A01"
78
80
#define HOST_BAUD_RATE 115200
81
//#define HOST_BAUD_RATE 57600
82
//#define HOST_BAUD_RATE 38400
83
//#define HOST_BAUD_RATE 19200
84
85
/* -- Special Items --------------------------------------------------------- */
86
87
#define DEBUG_TIMER_ON
88
//#define SERIAL_OUT_ON
89
#define SYSTEM_TIMER_ON
92
/* -- Board ----------------------------------------------------------------- */
93
99
//#define BOARD_LOCO_DEV
100
//#define BOARD_PROTO_128
101
#define BOARD_PROTO_48
102
//#define BOARD_PROTO_128_STEFAN
103
104
/* -- FREMO Clock ----------------------------------------------------------- */
105
106
/* -- Common ------------------------------------------------------------ */
107
#define CLOCK_PERIOD_10 6000
109
/* -- Board specific ---------------------------------------------------- */
110
#if defined BOARD_PROTO_128 //ProtoBoardMega128
111
112
#define CLOCK_PORT PORTG
113
#define CLOCK_DDR DDRG
114
#define CLOCK_PULSE_ODD PG3
115
#define CLOCK_PULSE_EVEN PG4
116
117
#define BUTTON_PORT PORTA
118
#define BUTTON_DDR DDRA
119
#define BUTTON_PINS PINA
120
121
#define BUTTON_ENTER_PIN PINA0
122
#define BUTTON_BACK_PIN PINA1
123
#define BUTTON_UP_PIN PINA2
124
#define BUTTON_DOWN_PIN PINA3
125
126
#elif defined BOARD_PROTO_48 //ProtoBoardMega48
127
128
#define CLOCK_PORT PORTC
129
#define CLOCK_DDR DDRC
130
#define CLOCK_PULSE_ODD PC1
131
#define CLOCK_PULSE_EVEN PC2
132
#define CLOCK_PULSE_ENABLE12 PC3
133
#define CLOCK_PULSE_ENABLE34 PC0
134
135
#define BUTTON_PORT PORTB
136
#define BUTTON_DDR DDRB
137
#define BUTTON_PINS PINB
138
139
#define BUTTON_ENTER_PIN PINB2
140
#define BUTTON_BACK_PIN PINB3
141
#define BUTTON_UP_PIN PINB4
142
#define BUTTON_DOWN_PIN PINB5
143
144
#else //No Board defined (Error)
145
#warning "Board not defined"
146
#endif //Boardtype
147
148
#endif
/* SYSDEF_H_ */
sysdef.h
Generated on Sat Sep 3 2016 10:08:07 for fremoclock by
1.8.11