-
Notifications
You must be signed in to change notification settings - Fork 0
/
DIO_Cfg.h
95 lines (81 loc) · 3.24 KB
/
DIO_Cfg.h
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
* DIO_Cfg.h
*
* Created on: Nov 22, 2023
* Author: Shehab Eldin Saber
*/
#ifndef INCLUDE_MCAL_DIO_CFG_H_
#define INCLUDE_MCAL_DIO_CFG_H_
#define DIO_CFG_OUTPUT 1
#define DIO_CFG_INPUT 0
#define DIO_CFG_HIGH 1
#define DIO_CFG_LOW 0
#define DIO_CFG_PULLUP 1
#define DIO_CFG_FLOATING 0
#define PORTA_PIN0_DIRECTION DIO_CFG_INPUT
#define PORTA_PIN1_DIRECTION DIO_CFG_INPUT
#define PORTA_PIN2_DIRECTION DIO_CFG_INPUT
#define PORTA_PIN3_DIRECTION DIO_CFG_INPUT
#define PORTA_PIN4_DIRECTION DIO_CFG_INPUT
#define PORTA_PIN5_DIRECTION DIO_CFG_INPUT
#define PORTA_PIN6_DIRECTION DIO_CFG_INPUT
#define PORTA_PIN7_DIRECTION DIO_CFG_INPUT
#define PORTB_PIN0_DIRECTION DIO_CFG_INPUT
#define PORTB_PIN1_DIRECTION DIO_CFG_INPUT
#define PORTB_PIN2_DIRECTION DIO_CFG_INPUT
#define PORTB_PIN3_DIRECTION DIO_CFG_INPUT
#define PORTB_PIN4_DIRECTION DIO_CFG_INPUT
#define PORTB_PIN5_DIRECTION DIO_CFG_INPUT
#define PORTB_PIN6_DIRECTION DIO_CFG_INPUT
#define PORTB_PIN7_DIRECTION DIO_CFG_INPUT
#define PORTC_PIN0_DIRECTION DIO_CFG_INPUT
#define PORTC_PIN1_DIRECTION DIO_CFG_INPUT
#define PORTC_PIN2_DIRECTION DIO_CFG_INPUT
#define PORTC_PIN3_DIRECTION DIO_CFG_INPUT
#define PORTC_PIN4_DIRECTION DIO_CFG_INPUT
#define PORTC_PIN5_DIRECTION DIO_CFG_INPUT
#define PORTC_PIN6_DIRECTION DIO_CFG_INPUT
#define PORTC_PIN7_DIRECTION DIO_CFG_INPUT
#define PORTD_PIN0_DIRECTION DIO_CFG_OUTPUT
#define PORTD_PIN1_DIRECTION DIO_CFG_OUTPUT
#define PORTD_PIN2_DIRECTION DIO_CFG_OUTPUT
#define PORTD_PIN3_DIRECTION DIO_CFG_OUTPUT
#define PORTD_PIN4_DIRECTION DIO_CFG_OUTPUT
#define PORTD_PIN5_DIRECTION DIO_CFG_OUTPUT
#define PORTD_PIN6_DIRECTION DIO_CFG_OUTPUT
#define PORTD_PIN7_DIRECTION DIO_CFG_OUTPUT
/*Direction OUTPUT : -DIO_CFG_HIGH - DIO_CFG_LOW */
/*Direction INPUT : -DIO_CFG_PULLUP - DIO_CFG_FLOATING */
#define PORTA_PIN0_VALUE DIO_CFG_LOW
#define PORTA_PIN1_VALUE DIO_CFG_LOW
#define PORTA_PIN2_VALUE DIO_CFG_LOW
#define PORTA_PIN3_VALUE DIO_CFG_LOW
#define PORTA_PIN4_VALUE DIO_CFG_LOW
#define PORTA_PIN5_VALUE DIO_CFG_LOW
#define PORTA_PIN6_VALUE DIO_CFG_LOW
#define PORTA_PIN7_VALUE DIO_CFG_LOW
#define PORTB_PIN0_VALUE DIO_CFG_FLOATING
#define PORTB_PIN1_VALUE DIO_CFG_FLOATING
#define PORTB_PIN2_VALUE DIO_CFG_FLOATING
#define PORTB_PIN3_VALUE DIO_CFG_FLOATING
#define PORTB_PIN4_VALUE DIO_CFG_FLOATING
#define PORTB_PIN5_VALUE DIO_CFG_FLOATING
#define PORTB_PIN6_VALUE DIO_CFG_FLOATING
#define PORTB_PIN7_VALUE DIO_CFG_FLOATING
#define PORTC_PIN0_VALUE DIO_CFG_FLOATING
#define PORTC_PIN1_VALUE DIO_CFG_FLOATING
#define PORTC_PIN2_VALUE DIO_CFG_FLOATING
#define PORTC_PIN3_VALUE DIO_CFG_FLOATING
#define PORTC_PIN4_VALUE DIO_CFG_FLOATING
#define PORTC_PIN5_VALUE DIO_CFG_FLOATING
#define PORTC_PIN6_VALUE DIO_CFG_FLOATING
#define PORTC_PIN7_VALUE DIO_CFG_FLOATING
#define PORTD_PIN0_VALUE DIO_CFG_HIGH
#define PORTD_PIN1_VALUE DIO_CFG_HIGH
#define PORTD_PIN2_VALUE DIO_CFG_HIGH
#define PORTD_PIN3_VALUE DIO_CFG_HIGH
#define PORTD_PIN4_VALUE DIO_CFG_HIGH
#define PORTD_PIN5_VALUE DIO_CFG_HIGH
#define PORTD_PIN6_VALUE DIO_CFG_HIGH
#define PORTD_PIN7_VALUE DIO_CFG_HIGH
#endif /* INCLUDE_MCAL_DIO_CFG_H_ */