@@ -42,6 +42,11 @@ COMPILER_ASSERT(DAPLINK_HIC_ID == DAPLINK_HIC_ID_LPC4322);
42
42
#define PIN_SWDIO_IN_BIT 9
43
43
#define PIN_SWDIO (1<<PIN_SWDIO_IN_BIT)
44
44
45
+ // SWO Pin P1_14: GPIO1[7]
46
+ #define PORT_SWO 1
47
+ #define PIN_SWO_IN_BIT 7
48
+ #define PIN_SWO (1<<PIN_SWO_IN_BIT)
49
+
45
50
// SWDIO Output Enable Pin P1_5: GPIO1[8]
46
51
#define PORT_SWDIO_TXE 1
47
52
#define PIN_SWDIO_TXE_IN_BIT 8
@@ -57,15 +62,27 @@ COMPILER_ASSERT(DAPLINK_HIC_ID == DAPLINK_HIC_ID_LPC4322);
57
62
#define PIN_RESET_TXE_IN_BIT 6
58
63
#define PIN_RESET_TXE (1<<PIN_RESET_TXE_IN_BIT)
59
64
60
- // ISP Control Pin P2_11: GPIO1[11]
61
- #define ISPCTRL_PORT 1
62
- #define ISPCTRL_BIT 11
65
+ // ISP Control Pin P2_11: GPIO1[11]
66
+ #define PORT_ISPCTRL 1
67
+ #define PIN_ISPCTRL_IN_BIT 11
68
+ #define PIN_ISPCTRL (1<<PIN_ISPCTRL_IN_BIT)
69
+
70
+ // Connected LED P1_1: GPIO0[8]
71
+ #define PORT_LED_CONNECTED 0
72
+ #define PIN_LED_CONNECTED_IN_BIT 8
73
+ #define PIN_LED_CONNECTED (1<<PIN_LED_CONNECTED_IN_BIT)
74
+
75
+ // Power Enable P3_1: GPIO5[8]
76
+ #define PORT_POWER_EN 5
77
+ #define PIN_POWER_EN_BIT 8
78
+ #define PIN_POWER_EN (1<<PIN_POWER_EN_BIT)
63
79
64
80
#define X_SET (str ) LPC_GPIO_PORT->SET[PORT_##str] = PIN_##str
65
81
#define X_CLR (str ) LPC_GPIO_PORT->CLR[PORT_##str] = PIN_##str
66
82
#define X_DIR_OUT (str ) LPC_GPIO_PORT->DIR[PORT_##str] |= (PIN_##str)
67
83
#define X_DIR_IN (str ) LPC_GPIO_PORT->DIR[PORT_##str] &= ~(PIN_##str)
68
84
#define X_BYTE (str ) LPC_GPIO_PORT->B[(PORT_##str << 5) + PIN_##str##_IN_BIT]
85
+ #define X_WORD (str ) LPC_GPIO_PORT->W[(PORT_##str << 5) + PIN_##str##_IN_BIT]
69
86
70
87
71
88
#endif
0 commit comments