summaryrefslogtreecommitdiff
path: root/src/pin.h
diff options
context:
space:
mode:
authorvlapa <vlapa@ya.ru>2026-06-13 18:04:36 +0300
committervlapa <vlapa@ya.ru>2026-06-13 18:04:36 +0300
commitf9367668a761010752cf9aeb4a87e21bcb47df5b (patch)
tree4acfb9e6d7425ddcd6236b949de722b166b7380c /src/pin.h
Firstmain
Diffstat (limited to 'src/pin.h')
-rw-r--r--src/pin.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/pin.h b/src/pin.h
new file mode 100644
index 0000000..d8a17ee
--- /dev/null
+++ b/src/pin.h
@@ -0,0 +1,51 @@
+#ifndef PIN_H_
+#define PIN_H_
+
+// ЗАДАЕМ ИСПОЛЬЗУЕМЫЕ ПИНы:
+// СЕГМЕНТЫ:
+#define SEG_A PB7
+#define DDR_A DDRB
+#define PORT_A PORTB
+#define SEG_B PB6
+#define DDR_B DDRB
+#define PORT_B PORTB
+#define SEG_C PB5
+#define DDR_C DDRB
+#define PORT_C PORTB
+#define SEG_D PB4
+#define DDR_D DDRB
+#define PORT_D PORTB
+#define SEG_E PB3
+#define DDR_E DDRB
+#define PORT_E PORTB
+#define SEG_F PB2
+#define DDR_F DDRB
+#define PORT_F PORTB
+#define SEG_G PB1
+#define DDR_G DDRB
+#define PORT_G PORTB
+#define SEG_H PB0
+#define DDR_H DDRB
+#define PORT_H PORTB
+// РАЗРЯДЫ:
+#define RAZ_1 PD2
+#define DDR_RAZ1 DDRD
+#define PORT_RAZ1 PORTD
+#define RAZ_2 PD3
+#define DDR_RAZ2 DDRD
+#define PORT_RAZ2 PORTD
+#define RAZ_3 PD4
+#define DDR_RAZ3 DDRD
+#define PORT_RAZ3 PORTD
+#define RAZ_4 PD5
+#define DDR_RAZ4 DDRD
+#define PORT_RAZ4 PORTD
+#define RAZ_5 PD6
+#define DDR_RAZ5 DDRD
+#define PORT_RAZ5 PORTD
+
+//-----------------------------------
+// Инициализация PIN:
+void init_pin(void);
+
+#endif \ No newline at end of file