@@ -42,6 +42,11 @@ COMPILER_ASSERT(DAPLINK_HIC_ID == DAPLINK_HIC_ID_LPC4322);
4242#define PIN_SWDIO_IN_BIT 9
4343#define PIN_SWDIO (1<<PIN_SWDIO_IN_BIT)
4444
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+
4550// SWDIO Output Enable Pin P1_5: GPIO1[8]
4651#define PORT_SWDIO_TXE 1
4752#define PIN_SWDIO_TXE_IN_BIT 8
@@ -57,15 +62,27 @@ COMPILER_ASSERT(DAPLINK_HIC_ID == DAPLINK_HIC_ID_LPC4322);
5762#define PIN_RESET_TXE_IN_BIT 6
5863#define PIN_RESET_TXE (1<<PIN_RESET_TXE_IN_BIT)
5964
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)
6379
6480#define X_SET (str ) LPC_GPIO_PORT->SET[PORT_##str] = PIN_##str
6581#define X_CLR (str ) LPC_GPIO_PORT->CLR[PORT_##str] = PIN_##str
6682#define X_DIR_OUT (str ) LPC_GPIO_PORT->DIR[PORT_##str] |= (PIN_##str)
6783#define X_DIR_IN (str ) LPC_GPIO_PORT->DIR[PORT_##str] &= ~(PIN_##str)
6884#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]
6986
7087
7188#endif
0 commit comments