summaryrefslogtreecommitdiff
path: root/src/pin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pin.h')
-rw-r--r--src/pin.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/pin.h b/src/pin.h
new file mode 100644
index 0000000..2d339e7
--- /dev/null
+++ b/src/pin.h
@@ -0,0 +1,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 \ No newline at end of file