Skip to content

Commit 274e424

Browse files
author
Adrian Negreanu
committed
lpc4322: implement LED_CONNECTED_OUT
Signed-off-by: Adrian Negreanu <adrian.negreanu@nxp.com>
1 parent 72ba384 commit 274e424

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

source/hic_hal/nxp/lpc4322/DAP_config.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ extern BOOL gpio_reset_pin_is_input;
175175
#define PIN_ISPCTRL_IN_BIT 11
176176
#define PIN_ISPCTRL (1<<PIN_ISPCTRL_IN_BIT)
177177

178+
// Connected LED P1_1: GPIO0[8]
179+
#define PORT_LED_CONNECTED 0
180+
#define PIN_LED_CONNECTED_IN_BIT 8
181+
#define PIN_LED_CONNECTED (1<<PIN_LED_CONNECTED_IN_BIT)
182+
178183
// Power Enable P3_1: GPIO5[8]
179184
#define PORT_POWER_EN 5
180185
#define PIN_POWER_EN_BIT 8
@@ -470,6 +475,11 @@ It is recommended to provide the following LEDs for status indication:
470475
*/
471476
__STATIC_INLINE void LED_CONNECTED_OUT(uint32_t bit)
472477
{
478+
if (bit) {
479+
X_SET(LED_CONNECTED);
480+
} else {
481+
X_CLR(LED_CONNECTED);
482+
}
473483
}
474484

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

source/hic_hal/nxp/lpc4322/gpio.c

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

2929
BOOL gpio_reset_pin_is_input = __TRUE;
3030

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

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

0 commit comments

Comments
 (0)