4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-03-02 03:55:28 +08:00
Chasel 94952b18fc
[bsp][mm32f526x] 1.add mm32f526x bsp; (#9940)
[bsp][mm32f526x] 1.add a bsp for mm32f526x;
2025-02-03 23:29:27 +08:00

39 lines
793 B
C

/*
* Copyright (c) 2022-2025, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2025-01-22 chasel first version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include "hal_rcc.h"
#include "hal_gpio.h"
#define LED1_PIN 31
#define LED2_PIN 30
int main(void)
{
/* set LED1 pin mode to output */
rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
/* set LED2 pin mode to output */
rt_pin_mode(LED2_PIN, PIN_MODE_OUTPUT);
while (1) {
rt_pin_write(LED1_PIN, PIN_HIGH);
rt_pin_write(LED2_PIN, PIN_HIGH);
rt_thread_mdelay(500);
rt_pin_write(LED1_PIN, PIN_LOW);
rt_pin_write(LED2_PIN, PIN_LOW);
rt_thread_mdelay(500);
}
return RT_EOK;
}