From 8b482aec540c1ff69b33b203ba9c90924a26a761 Mon Sep 17 00:00:00 2001 From: Yilin Sun Date: Wed, 19 Feb 2025 15:00:40 +0800 Subject: [PATCH] bsp: nxp/mcx/mcxa/frdm-mcxa156: Add LED blinking demo. Add LED blinking demo to align with other BSPs. Signed-off-by: Yilin Sun --- bsp/nxp/mcx/mcxa/frdm-mcxa156/applications/main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bsp/nxp/mcx/mcxa/frdm-mcxa156/applications/main.c b/bsp/nxp/mcx/mcxa/frdm-mcxa156/applications/main.c index d229d56b1c..a387a24eaf 100644 --- a/bsp/nxp/mcx/mcxa/frdm-mcxa156/applications/main.c +++ b/bsp/nxp/mcx/mcxa/frdm-mcxa156/applications/main.c @@ -29,10 +29,15 @@ int main(void) rt_kprintf("using gcc, version: %d.%d\n", __GNUC__, __GNUC_MINOR__); #endif + rt_kprintf("MCXA156 HelloWorld\r\n"); + rt_pin_mode(LED_PIN, PIN_MODE_OUTPUT); /* Set GPIO as Output */ + while (1) { - rt_thread_mdelay(1000); /* Delay 1S */ - rt_kprintf("MCXA156 HelloWorld\r\n"); + rt_pin_write(LED_PIN, PIN_HIGH); /* Set GPIO output 1 */ + rt_thread_mdelay(500); /* Delay 500mS */ + rt_pin_write(LED_PIN, PIN_LOW); /* Set GPIO output 0 */ + rt_thread_mdelay(500); /* Delay 500mS */ } }