mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-16 16:43:30 +08:00
06fdc108b4
* first commit, keil test pass * feat : n32g452xx direct structure base at32 1. 重新整理目录结构 * feat : 基于AT32,将各驱动移植整改待验证 1. 部分驱动已经整改,但未验证 2. 根据AT32整改目录结构 * feat : add README document 1. 完善配置文件 2. 添加说明文档 * feat : 验证添加的驱动 1. UART 1-3 验证通过 2. ADC 1-2 CH 6-9 验证通过 3. TIM 6-7 验证通过 * feat : complete readme document * feat : format code 1. ref https://github.com/mysterywolf/formatting * feat : 完成PWM驱动移植与自测 1. 添加PWM测试代码 2. 修正PWM驱动周期与脉冲错误问题 * feat : 删除多余代码与多余的文件,修正注释与函数命名 * feat : fix tim channel comment * feat : 完成DEMO测试例子 1. 完成MAIN函数中的LED测试例子 2. 完善README文档 3. 更新添加许可文件 * feat : 根据BSP提交自查完善固件 1. 添加.ignore_format.yml文件 2. 修正main.c的注释 * feat : add last line in .ignore_format.yml * feat : delet file_path in .ignore_format.yml * fix: gPIO/ADC driver 1. add ADC temperature&vref channel. 2.add GPIO IPD/OD configration * fix: 解决告警 1. 解决告警(rt_drv_pwm.c: warning: implicit declaration of function 'atoi') * feat: add scons --dist function * fix: 解决MDK5无法编译问题 * perf: delete invalid code Co-authored-by: linyuanbo_breo_server <linyuanbo@breo.com.cn>
32 lines
637 B
C
32 lines
637 B
C
/*
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
* Change Logs:
|
|
* Date Author Notes
|
|
* 2015-07-29 Arda.Fu first implementation
|
|
*/
|
|
#include <stdint.h>
|
|
#include <rtthread.h>
|
|
#include <rtdevice.h>
|
|
|
|
/* defined the LED1 pin: PB5 */
|
|
#define LED1_PIN 57
|
|
|
|
int main(void)
|
|
{
|
|
uint32_t Speed = 200;
|
|
/* set LED1 pin mode to output */
|
|
rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
|
|
|
|
while (1)
|
|
{
|
|
rt_pin_write(LED1_PIN, PIN_LOW);
|
|
rt_thread_mdelay(Speed);
|
|
rt_pin_write(LED1_PIN, PIN_HIGH);
|
|
rt_thread_mdelay(Speed);
|
|
}
|
|
}
|
|
|