Skip to content

Commit e6bbc89

Browse files
Adrian Negreanumbrossard
authored andcommitted
lpc4322 (gpio): implement LED_CONNECTED_OUT
Signed-off-by: Adrian Negreanu <[email protected]>
1 parent 8714f3f commit e6bbc89

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

source/hic_hal/nxp/lpc4322/DAP_config.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,11 @@ It is recommended to provide the following LEDs for status indication:
440440
*/
441441
__STATIC_INLINE void LED_CONNECTED_OUT(uint32_t bit)
442442
{
443+
if (bit) {
444+
X_SET(LED_CONNECTED);
445+
} else {
446+
X_CLR(LED_CONNECTED);
447+
}
443448
}
444449

445450
/** Debug Unit: Set status Target Running LED.

source/hic_hal/nxp/lpc4322/IO_Config.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ COMPILER_ASSERT(DAPLINK_HIC_ID == DAPLINK_HIC_ID_LPC4322);
6767
#define PIN_ISPCTRL_IN_BIT 11
6868
#define PIN_ISPCTRL (1<<PIN_ISPCTRL_IN_BIT)
6969

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+
7075
// Power Enable P3_1: GPIO5[8]
7176
#define PORT_POWER_EN 5
7277
#define PIN_POWER_EN_BIT 8

source/hic_hal/nxp/lpc4322/gpio.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929

3030
bool gpio_reset_pin_is_input = true;
3131

32-
// Connected LED P1_1: GPIO0[8]
33-
#define LED_CONNECTED_PORT 0
34-
#define LED_CONNECTED_BIT 8
3532

3633
// LPC43xx peripheral register bit masks (used by macros)
3734
#define CCU_CLK_CFG_RUN (1UL << 0)

0 commit comments

Comments
 (0)