summaryrefslogtreecommitdiff
path: root/src/pin.h
blob: 2d339e775341a67fe29c2f91b8ac40faf4bd435e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef PIN_H_
#define PIN_H_

//  ЗАДАЕМ ИСПОЛЬЗУЕМЫЕ ПИНы:
// СЕГМЕНТЫ:
#define SEG_A PC3
#define DDR_A DDRC
#define PORT_A PORTC
#define SEG_B PB0
#define DDR_B DDRB
#define PORT_B PORTB
#define SEG_C PB4
#define DDR_C DDRB
#define PORT_C PORTB
#define SEG_D PC0
#define DDR_D DDRC
#define PORT_D PORTC
#define SEG_E PC1
#define DDR_E DDRC
#define PORT_E PORTC
#define SEG_F PC2
#define DDR_F DDRC
#define PORT_F PORTC
#define SEG_G PB3
#define DDR_G DDRB
#define PORT_G PORTB
#define SEG_H PB5
#define DDR_H DDRB
#define PORT_H PORTB
// РАЗРЯДЫ:
#define RAZ_1 PC4
#define DDR_RAZ1 DDRC
#define PORT_RAZ1 PORTC
#define RAZ_2 PB1
#define DDR_RAZ2 DDRB
#define PORT_RAZ2 PORTB
#define RAZ_3 PD7
#define DDR_RAZ3 DDRD
#define PORT_RAZ3 PORTD
#define RAZ_4 PB2
#define DDR_RAZ4 DDRB
#define PORT_RAZ4 PORTB

//  КНОПКА:
#define BTN PD0
#define DDR_BTN DDRD
#define PORT_BTN PORTD
#define PIN_BTN PIND

//  ЗАЖИГАНИЕ / ВОЛЬТМЕТР:
#define IGN_ON PC5
#define DDR_IGN_ON DDRC
#define PORT_IGN_ON PORTC
#define PIN_IGN_ON PINC

//  ВХОД ТАХОМЕТРА:
#define PIN_TAHO PD2
#define DDR_TAHO DDRD
#define PORT_TAHO PORTD

//-----------------------------------
//  Инициализация PIN:
void init_pin(void);

#endif