summaryrefslogtreecommitdiff
path: root/bsp/nxp/mcx/mcxa
diff options
context:
space:
mode:
authorYilin Sun <[email protected]>2025-02-19 15:00:40 +0800
committerRbb666 <[email protected]>2025-02-19 22:48:03 +0800
commit8b482aec540c1ff69b33b203ba9c90924a26a761 (patch)
tree58421b4bcf91afd7968485b80cda7ec4c8258e5c /bsp/nxp/mcx/mcxa
parentf7feea17a479879c0eda5228d76aed501a70a8a8 (diff)
bsp: nxp/mcx/mcxa/frdm-mcxa156: Add LED blinking demo.
Add LED blinking demo to align with other BSPs. Signed-off-by: Yilin Sun <[email protected]>
Diffstat (limited to 'bsp/nxp/mcx/mcxa')
-rw-r--r--bsp/nxp/mcx/mcxa/frdm-mcxa156/applications/main.c9
1 files 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 */
}
}