4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-21 20:05:21 +08:00

bsp: nxp/mcx/mcxa/frdm-mcxa156: Add LED blinking demo.

Add LED blinking demo to align with other BSPs.

Signed-off-by: Yilin Sun <imi415@imi.moe>
This commit is contained in:
Yilin Sun 2025-02-19 15:00:40 +08:00 committed by Rbb666
parent f7feea17a4
commit 8b482aec54

View File

@ -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 */
}
}