Subversion Repositories group.NITPanels

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 24
Line 1... Line 1...
1
#ifndef _CONFIG_H_
1
#ifndef _CONFIG_H_
2
#define _CONFIG_H_
2
#define _CONFIG_H_
3
 
3
 
4
#define OSFRADIO
-
 
5
#define HW_VERSION 0x01
-
 
6
#define SW_VERSION 0x01
-
 
7
 
-
 
8
#define I2C_SLAVE_ADDR  0x26
-
 
9
 
-
 
10
#define DISPLAY_REFRESH 2
-
 
11
/*
-
 
12
 * Setup for the shift register
-
 
13
 */
-
 
14
#define HC595_PORT		PORTA
-
 
15
#define HC595_DDR		DDRA
-
 
16
#define	HC595_DS_PIN	PA0
-
 
17
#define	HC595_STCP_PIN	PA1
-
 
18
#define	HC595_SHCP_PIN	PA2
-
 
19
 
-
 
20
#define ROT_1_PIN		PINB
-
 
21
#define ROT_1A_PIN		PCINT8
-
 
22
#define ROT_1B_PIN		PCINT9
-
 
23
 
-
 
24
// Decimal point output pin
-
 
25
//  - for drawing the DP on 7 segment
-
 
26
#define DP_PORT			PORTA
-
 
27
#define DP_PIN			PA5
-
 
28
 
-
 
29
// Blank output pin
-
 
30
//  - for blanking the 4511 during update
-
 
31
#define BL_PORT			PORTA
-
 
32
#define BL_PIN			PA3
-
 
33
 
-
 
34
// Flip & Swap buttons
-
 
35
#define SB_INPUT		PINB
-
 
36
#define SB_PIN			PB2
-
 
37
#define FB_INPUT		PINA
-
 
38
#define FB_PIN			PA7
-
 
39
 
4
 
-
 
5
 
-
 
6
#ifndef HW_VERSION
-
 
7
	#error "No HW_VERSION set"
-
 
8
#endif
-
 
9
 
-
 
10
#if HW_VERSION==0x01
-
 
11
	#include "config_hw01.h"
40
#endif
12
#endif
-
 
13
#if HW_VERSION==0x02
-
 
14
	#include "config_hw02.h"
-
 
15
#endif
-
 
16
 
-
 
17
#define SW_VERSION 			0x02
-
 
18
#define I2C_SLAVE_ADDR  	0x26
-
 
19
#define DISPLAY_REFRESH 	2
41
 
20
 
-
 
21
#endif