2022-12-28 02:24:02 +08:00
|
|
|
/*
|
2023-02-09 12:01:20 +08:00
|
|
|
* Copyright (c) 2006-2023, RT-Thread Development Team
|
2022-12-28 02:24:02 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2022-11-03 WangShun first version
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "ch32v20x.h"
|
|
|
|
#include <rtthread.h>
|
|
|
|
#include <rthw.h>
|
2024-08-24 06:15:09 +08:00
|
|
|
#include "drivers/dev_pin.h"
|
2022-12-28 02:24:02 +08:00
|
|
|
#include <board.h>
|
|
|
|
|
|
|
|
#define LED0 rt_pin_get("PA.0")
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
rt_pin_mode(LED0,PIN_MODE_OUTPUT);
|
|
|
|
rt_kprintf("MCU-CH32V208WBU6\r\n");
|
|
|
|
while(1)
|
|
|
|
{
|
|
|
|
rt_pin_write(LED0, PIN_HIGH);
|
|
|
|
rt_thread_mdelay(500);
|
|
|
|
rt_pin_write(LED0, PIN_LOW);
|
|
|
|
rt_thread_mdelay(500);
|
|
|
|
}
|
|
|
|
}
|