Explorar o código

feat : 完成DEMO测试例子

1. 完成MAIN函数中的LED测试例子
2. 完善README文档
3. 更新添加许可文件
linyuanbo_breo_server %!s(int64=4) %!d(string=hai) anos
pai
achega
cee60d220f

+ 19 - 0
bsp/Copyright_Notice.md

@@ -717,3 +717,22 @@ Path:
 
 - bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver
 
+### n32
+
+License: 未注明
+
+Copyright: Copyright (c) 2019, Nations Technologies Inc.
+
+Path:
+
+- bsp/n32g452xx/n32g452xx-mini-system/board/msp
+
+------
+
+License: bsd-new
+
+Copyright: Copyright (c) 2010-2015 ARM Limited
+
+Path:
+
+- bsp/n32g452xx/Libraries/N32_Std_Driver/CMSIS

+ 2 - 10
bsp/n32g452xx/n32g452xx-mini-system/README.md

@@ -35,17 +35,9 @@ N32G452 MINI-SYSTEM 板级包支持MDK5开发环境和GCC编译器,以下是
 | --------- | -------- | :------------------------: |
 | UART      | 支持(已移植,已测试)     | USART1/2/3                 |
 | GPIO      | 支持(已移植,已测试)     | PA0...PF7                  |
-| IIC       | 支持(已移植,待测试)     | GPIO-I2C                   |
-| SPI       | 支持(已移植,待测试)     | SPI1/2                     |
 | ADC       | 支持(已移植,已测试)     | ADC1/2                     |
-| PWM       | 支持(已移植,测试)     | TMR1/2                     |
+| PWM       | 支持(已移植,已测试)     | TMR1/2                     |
 | HWTIMER   | 支持(已移植,已测试)     | TMR6/7                     |
-| SDIO      | 支持(已移植,待测试)     | SDIO1                      |
-| CAN       | 支持(已移植,待测试)     | CAN1/2                     |
-| WDT       | 支持(已移植,待测试)     |                            |
-| RTC       | 支持(已移植,待测试)     |                            |
-| FLASH     | 支持(已移植,待测试)     |                            |
-| ETH       | 支持(已移植,待测试)     |                            |
 
 ### IO在板级支持包中的映射情况
 
@@ -100,7 +92,7 @@ N32G452 MINI-SYSTEM 板级包支持MDK5开发环境和GCC编译器,以下是
 
 #### 运行结果
 
-下载程序成功之后,系统会自动运行,观察开发板上 LED 的运行效果,LED2/3/4 会周期性闪烁。
+下载程序成功之后,系统会自动运行,观察开发板上 LED 的运行效果,LED1 会周期性闪烁。
 
 连接开发板对应串口到 PC , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,在串口上可以看到 RT-Thread 的输出信息:
 

+ 14 - 6
bsp/n32g452xx/n32g452xx-mini-system/applications/main.c

@@ -8,15 +8,23 @@
  * 2015-07-29     Arda.Fu      first implementation
  */
 #include <rtthread.h>
+#include <rtdevice.h>
+
+/* defined the LED1 pin: PA8 */
+#define LED1_PIN    57
 
 int main(void)
 {
-    /* user app entry */
+    uint32_t Speed = 200;
+    /* set LED1 pin mode to output */
+    rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
 
-    return 0;
+    while (1)
+    {
+        rt_pin_write(LED1_PIN, PIN_LOW);
+        rt_thread_mdelay(Speed);
+        rt_pin_write(LED1_PIN, PIN_HIGH);
+        rt_thread_mdelay(Speed);
+    }
 }
 
-
-
-
-