Просмотр исходного кода

Merge branch 'master' of https://github.com/RT-Thread/rt-thread into nuvoton

Wayne Lin 4 лет назад
Родитель
Сommit
f068908728
100 измененных файлов с 1387 добавлено и 1828 удалено
  1. 1 0
      .gitee/PULL_REQUEST_TEMPLATE.en.md
  2. 1 0
      .gitee/PULL_REQUEST_TEMPLATE.zh-CN.md
  3. 1 0
      .gitee/PULL_REQUEST_TEMPLATE.zh-TW.md
  4. 1 0
      .github/PULL_REQUEST_TEMPLATE.md
  5. 3 4
      .github/workflows/action.yml
  6. 20 0
      .github/workflows/file_check.yml
  7. 3 0
      .gitignore
  8. 12 0
      .ignore_format.yml
  9. 0 3
      Jenkinsfile
  10. 5 9
      bsp/CME_M7/applications/application.c
  11. 2 6
      bsp/CME_M7/drivers/board.c
  12. 3 7
      bsp/CME_M7/drivers/board.h
  13. 719 0
      bsp/Copyright_Notice.md
  14. 2 16
      bsp/allwinner_tina/applications/main.c
  15. 2 16
      bsp/allwinner_tina/drivers/board.c
  16. 2 16
      bsp/allwinner_tina/drivers/board.h
  17. 4 18
      bsp/allwinner_tina/drivers/drv_clock.c
  18. 3 17
      bsp/allwinner_tina/drivers/drv_clock.h
  19. 2 16
      bsp/allwinner_tina/drivers/drv_gpio.c
  20. 3 17
      bsp/allwinner_tina/drivers/drv_gpio.h
  21. 23 37
      bsp/allwinner_tina/drivers/drv_sdio.c
  22. 5 19
      bsp/allwinner_tina/drivers/drv_sdio.h
  23. 3 17
      bsp/allwinner_tina/drivers/drv_uart.c
  24. 2 16
      bsp/allwinner_tina/drivers/drv_uart.h
  25. 2 16
      bsp/allwinner_tina/drivers/spi/drv_spi.c
  26. 2 16
      bsp/allwinner_tina/drivers/spi/drv_spi.h
  27. 3 17
      bsp/allwinner_tina/drivers/spi/drv_spi_flash.c
  28. 2 16
      bsp/allwinner_tina/libcpu/context_gcc.S
  29. 2 16
      bsp/allwinner_tina/libcpu/cpu.c
  30. 2 16
      bsp/allwinner_tina/libcpu/cpuport.c
  31. 2 16
      bsp/allwinner_tina/libcpu/interrupt.c
  32. 2 16
      bsp/allwinner_tina/libcpu/interrupt.h
  33. 2 16
      bsp/allwinner_tina/libcpu/mmu.c
  34. 2 16
      bsp/allwinner_tina/libcpu/mmu.h
  35. 2 16
      bsp/allwinner_tina/libcpu/rt_low_level_init.c
  36. 2 16
      bsp/allwinner_tina/libcpu/stack.c
  37. 2 16
      bsp/allwinner_tina/libcpu/trap.c
  38. 2 6
      bsp/amebaz/applications/main.c
  39. 2 16
      bsp/amebaz/applications/smartconfig_app.c
  40. 5 9
      bsp/amebaz/drivers/board.c
  41. 2 6
      bsp/amebaz/drivers/board.h
  42. 15 29
      bsp/amebaz/drivers/drv_uart.c
  43. 2 16
      bsp/amebaz/drivers/drv_uart.h
  44. 7 21
      bsp/amebaz/drivers/wlan/drv_wifi.c
  45. 3 17
      bsp/amebaz/drivers/wlan/drv_wifi.h
  46. 9 23
      bsp/amebaz/drivers/wlan/drv_wlan.c
  47. 10 24
      bsp/amebaz/drivers/wlan/drv_wlan.h
  48. 2 16
      bsp/amebaz/libraries/smartconfig/inc/smartconfig.h
  49. 2 16
      bsp/apollo2/applications/main.c
  50. 9 23
      bsp/apollo2/board/adc.c
  51. 2 16
      bsp/apollo2/board/adc.h
  52. 2 16
      bsp/apollo2/board/board.c
  53. 2 16
      bsp/apollo2/board/board.h
  54. 3 17
      bsp/apollo2/board/flash.c
  55. 2 16
      bsp/apollo2/board/flash.h
  56. 3 17
      bsp/apollo2/board/gpio.c
  57. 3 17
      bsp/apollo2/board/gpio.h
  58. 7 21
      bsp/apollo2/board/i2c.c
  59. 2 16
      bsp/apollo2/board/i2c.h
  60. 2 16
      bsp/apollo2/board/led.c
  61. 2 16
      bsp/apollo2/board/led.h
  62. 3 17
      bsp/apollo2/board/pdm.c
  63. 2 16
      bsp/apollo2/board/pdm.h
  64. 2 16
      bsp/apollo2/board/pwm.c
  65. 2 16
      bsp/apollo2/board/pwm.h
  66. 9 23
      bsp/apollo2/board/rtc.c
  67. 3 17
      bsp/apollo2/board/rtc.h
  68. 7 21
      bsp/apollo2/board/smbus.c
  69. 2 16
      bsp/apollo2/board/smbus.h
  70. 6 20
      bsp/apollo2/board/spi.c
  71. 3 17
      bsp/apollo2/board/spi.h
  72. 5 19
      bsp/apollo2/board/uart.c
  73. 2 16
      bsp/apollo2/board/uart.h
  74. 4 18
      bsp/asm9260t/applications/application.c
  75. 2 16
      bsp/asm9260t/drivers/board.c
  76. 2 16
      bsp/asm9260t/drivers/board.h
  77. 2 16
      bsp/asm9260t/drivers/led.c
  78. 2 16
      bsp/asm9260t/drivers/led.h
  79. 5 19
      bsp/asm9260t/drivers/usart.c
  80. 3 17
      bsp/asm9260t/platform/gpio.c
  81. 2 16
      bsp/asm9260t/platform/gpio.h
  82. 2 16
      bsp/asm9260t/platform/interrupt.c
  83. 65 79
      bsp/asm9260t/platform/interrupt.h
  84. 2 16
      bsp/asm9260t/platform/reset.c
  85. 2 16
      bsp/asm9260t/platform/rt_low_level_init.c
  86. 3 17
      bsp/asm9260t/platform/rt_low_level_init.h
  87. 201 215
      bsp/asm9260t/platform/system_clock.c
  88. 2 16
      bsp/asm9260t/platform/timer0.c
  89. 2 16
      bsp/asm9260t/platform/timer0.h
  90. 3 17
      bsp/asm9260t/platform/uart.c
  91. 13 27
      bsp/asm9260t/platform/uart.h
  92. 8 23
      bsp/at32/Libraries/AT32_Std_Driver/AT32F4xx_StdPeriph_Driver/inc/at32f4xx_comp.h
  93. 0 11
      bsp/at32/Libraries/AT32_Std_Driver/AT32F4xx_StdPeriph_Driver/inc/misc.h
  94. 7 91
      bsp/at32/Libraries/AT32_Std_Driver/AT32F4xx_StdPeriph_Driver/src/at32f4xx_comp.c
  95. 0 11
      bsp/at32/Libraries/AT32_Std_Driver/CMSIS/AT32/AT32F4xx/src/system_at32f4xx.c
  96. 11 11
      bsp/at32/Libraries/rt_drivers/drv_adc.c
  97. 10 10
      bsp/at32/Libraries/rt_drivers/drv_adc.h
  98. 4 4
      bsp/at32/Libraries/rt_drivers/drv_can.c
  99. 2 2
      bsp/at32/Libraries/rt_drivers/drv_can.h
  100. 33 33
      bsp/at32/Libraries/rt_drivers/drv_eth.c

+ 1 - 0
.gitee/PULL_REQUEST_TEMPLATE.en.md

@@ -27,3 +27,4 @@ As part of this pull request, I've considered the following:
 - [ ] All modifications to BSP are justified and do not affect other components or BSPs.
 - [ ] I've commented appropriately where code is tricky.
 - [ ] Code in this PR is of high quality.
+- [ ] This PR complies with [RT-Thread code specification](../documentation/coding_style_en.txt)

+ 1 - 0
.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md

@@ -27,3 +27,4 @@
 - [ ] 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或
 - [ ] 对难懂代码均提供对应的注释
 - [ ] 本拉取/合并请求代码是高质量的
+- [ ] 本拉取/合并符合[RT-Thread代码规范](../documentation/coding_style_cn.md)

+ 1 - 0
.gitee/PULL_REQUEST_TEMPLATE.zh-TW.md

@@ -27,3 +27,4 @@
 - [ ] 所有變更均有原因及合理的,並且不會影響到其他軟件組件代碼或
 - [ ] 對難懂代碼均提供對應的註釋
 - [ ] 本拉取/合並請求代碼是高質量的
+- [ ] 本拉取/合並符合[RT-Thread代碼規範](../documentation/coding_style_cn.md)

+ 1 - 0
.github/PULL_REQUEST_TEMPLATE.md

@@ -31,3 +31,4 @@ The following content must not be changed in the submitted PR message. Otherwise
 - [ ] 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
 - [ ] 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
 - [ ] 本拉取/合并请求代码是高质量的 Code in this PR is of high quality
+- [ ] 本拉取/合并符合[RT-Thread代码规范](../documentation/coding_style_cn.md) This PR complies with [RT-Thread code specification](../documentation/coding_style_en.txt) 

+ 3 - 4
.github/workflows/action.yml

@@ -78,6 +78,7 @@ jobs:
          - {RTT_BSP: "stm32/stm32f103-onenet-nbiot", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "stm32/stm32f103-yf-ufun", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "stm32/stm32f107-uc-eval", RTT_TOOL_CHAIN: "sourcery-arm"}
+         - {RTT_BSP: "stm32/stm32f207-st-nucleo", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "stm32/stm32f401-st-nucleo", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "stm32/stm32f405-smdz-breadfruit", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "stm32/stm32f407-atk-explorer", RTT_TOOL_CHAIN: "sourcery-arm"}
@@ -96,7 +97,7 @@ jobs:
          - {RTT_BSP: "stm32/stm32f469-st-disco", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "stm32/stm32f746-st-disco", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "stm32/stm32f767-atk-apollo", RTT_TOOL_CHAIN: "sourcery-arm"}
-         - {RTT_BSP: "stm32/stm32f767-fire-challenger", RTT_TOOL_CHAIN: "sourcery-arm"}
+         - {RTT_BSP: "stm32/stm32f767-fire-challenger-v1", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "stm32/stm32f767-st-nucleo", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "stm32/stm32g070-st-nucleo", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "stm32/stm32g071-st-nucleo", RTT_TOOL_CHAIN: "sourcery-arm"}
@@ -104,6 +105,7 @@ jobs:
          - {RTT_BSP: "stm32/stm32h743-atk-apollo", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "stm32/stm32h743-st-nucleo", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "stm32/stm32h747-st-discovery", RTT_TOOL_CHAIN: "sourcery-arm"}
+         - {RTT_BSP: "stm32/stm32h750-artpi-h750", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "stm32/stm32l4r9-st-eval", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "stm32/stm32l010-st-nucleo", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "stm32/stm32l053-st-nucleo", RTT_TOOL_CHAIN: "sourcery-arm"}
@@ -118,14 +120,11 @@ jobs:
          - {RTT_BSP: "stm32/stm32mp157a-st-discovery", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "stm32/stm32mp157a-st-ev1", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "stm32/stm32wb55-st-nucleo", RTT_TOOL_CHAIN: "sourcery-arm"}
-         - {RTT_BSP: "stm32f20x", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "swm320", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "swm320-lq100", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "beaglebone", RTT_TOOL_CHAIN: "sourcery-arm"}
-         - {RTT_BSP: "zynq7000", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "zynqmp-r5-axu4ev", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "frdm-k64f", RTT_TOOL_CHAIN: "sourcery-arm"}
-         - {RTT_BSP: "fh8620", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "xplorer4330/M4", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "at32/at32f403a-start", RTT_TOOL_CHAIN: "sourcery-arm"}
          - {RTT_BSP: "at32/at32f407-start", RTT_TOOL_CHAIN: "sourcery-arm"}

+ 20 - 0
.github/workflows/file_check.yml

@@ -0,0 +1,20 @@
+name: Check File Format and License
+
+on: [pull_request]
+
+jobs:
+  scancode_job:
+    runs-on: ubuntu-latest
+    name: Scan code format and license
+    steps:
+      - uses: actions/checkout@v2
+      - name: Set up Python
+        uses: actions/setup-python@master
+        with:
+          python-version: 3.8
+      
+      - name: Check Format and License
+        shell: bash
+        run: |
+          pip install click chardet PyYaml
+          python tools/file_check.py check 'https://github.com/RT-Thread/rt-thread' 'master'

+ 3 - 0
.gitignore

@@ -35,3 +35,6 @@ ncscope.*
 #ctag files
 tags
 
+.idea
+CMakeLists.txt
+cmake-build-debug

+ 12 - 0
.ignore_format.yml

@@ -0,0 +1,12 @@
+# files format check exclude path, please follow the instructions below to modify;
+# If you need to exclude an entire folder, add the folder path in dir_path;
+# If you need to exclude a file, add the path to the file in file_path.
+
+file_path:
+- bsp/allwinner_tina/libcpu/cpu.c
+
+dir_path:
+- tools
+- components/net/lwip-1.4.1
+- components/net/lwip-2.0.2
+- components/net/lwip-2.1.2

+ 0 - 3
Jenkinsfile

@@ -29,7 +29,6 @@ pipeline {
                         // ['gd32e230k-start', 'sourcery-arm'], /* CI compile not support */
                         ['gd32303e-eval', 'sourcery-arm'],
                         // ['gd32450z-eval', 'sourcery-arm'], /* CI link not support */
-                        ['gkipc', 'sourcery-arm'],
                         ['imx6sx/cortex-a9', 'sourcery-arm'],
                         // ['imxrt/imxrt1052-atk-commander', 'sourcery-arm'], /* CI compile not support */
                         // ['imxrt/imxrt1052-fire-pro', 'sourcery-arm'], /* CI compile not support */
@@ -107,9 +106,7 @@ pipeline {
                         ['stm32f20x', 'sourcery-arm'],
                         ['swm320-lq100', 'sourcery-arm'],
                         ['beaglebone', 'sourcery-arm'],
-                        ['zynq7000', 'sourcery-arm'],
                         ['frdm-k64f', 'sourcery-arm'],
-                        ['fh8620', 'sourcery-arm'],
                         ['xplorer4330/M4', 'sourcery-arm'],
                         // ['at32/at32f403a-start', 'sourcery-arm'],/* CI link not support */
                         // ['at32/at32f407-start', 'sourcery-arm']/* CI compile C99 not support */

+ 5 - 9
bsp/CME_M7/applications/application.c

@@ -1,11 +1,7 @@
 /*
- * File      : application.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006-2014, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rt-thread.org/license/LICENSE
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -32,10 +28,10 @@ int rt_application_init()
 
     tid = rt_thread_create("init",
         rt_init_thread_entry,
-		RT_NULL,
+        RT_NULL,
         2048,
-		RT_THREAD_PRIORITY_MAX/3,
-		20);
+        RT_THREAD_PRIORITY_MAX/3,
+        20);
 
     if (tid != RT_NULL)
         rt_thread_startup(tid);

+ 2 - 6
bsp/CME_M7/drivers/board.c

@@ -1,11 +1,7 @@
 /*
- * File      : board.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2009-2014, RT-Thread Develop Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rt-thread.org/license/LICENSE
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 3 - 7
bsp/CME_M7/drivers/board.h

@@ -1,11 +1,7 @@
 /*
- * File      : board.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2009-2014, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rt-thread.org/license/LICENSE
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -18,7 +14,7 @@
 #include "cmem7_includes.h"
 //#include "cmem7_retarget.h"
 
-#define SRAM_SIZE         64	// KB
+#define SRAM_SIZE         64    // KB
 #define SRAM_END          (0x20000000 + SRAM_SIZE * 1024)
 
 //#define RT_USING_UART0

+ 719 - 0
bsp/Copyright_Notice.md

@@ -0,0 +1,719 @@
+# 版权声明 Copyright Notice
+
+RT-Thread 是一套开源、开放的操作系统平台,自 3.1.1 版本开始以 Apache License v2.0 许可协议发布。
+
+芯片厂商外设函数库或者厂商固件,按厂商的许可进行授权,并以原有许可协议发布。
+
+RT-Thread is an open source operating system, which is released under Apache License V2.0 since version 3.1.1.
+
+The peripheral library or firmware library of the chip manufacturer is authorized according to the manufacturer's license, and these files are released according to the original license agreement.
+
+## BSP's License and Coyright:
+
+### apollo2
+
+License:  bsd-new
+
+Copyright: Copyright (c) 2017, Ambiq Micro
+
+Path:
+
+- bsp/apollo2/libraries
+
+### at32
+
+License: st-mcd-2.0
+
+Copyright: (c) COPYRIGHT 2018 ArteryTek
+
+Path:
+
+- bsp/at32/at32f407-start/board/msp
+
+------
+
+License: bsd-new
+
+Copyright: Copyright (c) 2010-2015 ARM Limited
+
+Path:
+
+- bsp/at32/Libraries/AT32_Std_Driver/CMSIS
+
+### avr32uc3b0
+
+License: bsd-new
+
+Copyright: Copyright (c) 2009 Atmel Corporation
+
+Path:
+
+- bsp/avr32uc3b0/SOFTWARE_FRAMEWORK
+
+### CME_M7
+
+License: st-mcd-2.0
+
+Copyright: (c) COPYRIGHT 2013 Capital-micro
+
+Path:
+
+- bsp/CME_M7/CMSIS/CME_M7
+- bsp/CME_M7/StdPeriph_Driver
+
+------
+
+License: bsd-new
+
+Copyright: Copyright (c) 2009 - 2013 ARM LIMITED
+
+Path:
+
+- bsp/CME_M7/CMSIS/CMSIS
+
+### efm32
+
+License: zlib
+
+Copyright: (C) Copyright 2012 Energy Micro AS, http://www.energymicro.com
+
+Path:
+
+- bsp/efm32/EFM32_Gxxx_DK
+- bsp/efm32/EFM32GG_DK3750
+- bsp/efm32/graphics
+- bsp/efm32/Libraries/Device/EnergyMicro
+- bsp/efm32/Libraries/emlib
+
+------
+
+License: arm-cortex-mx
+
+Copyright: Copyright (c) 2009-2012 ARM Limited
+
+Path:
+
+- bsp/efm32/Libraries/CMSIS/Include
+
+### essemi
+
+License: 未注明
+
+Copyright: Copyright (c) 2018 Shanghai Eastsoft Microelectronics Co., Ltd.
+
+Path:
+
+- bsp/essemi/es32f0271/libraries/CMSIS/Device
+- bsp/essemi/es32f0271/libraries/ES32F027x_MD_StdPeriph_Driver
+- bsp/essemi/es32f0271/libraries/usblib
+- bsp/essemi/es32f0334/libraries/ES32F033x_ALD_StdPeriph_Driver
+- bsp/essemi/es32f0654/libraries/ES32F065x_ALD_StdPeriph_Driver
+- bsp/essemi/es32f369x/libraries/ES32F36xx_ALD_StdPeriph_Driver
+- bsp/essemi/es8p508x/libraries/CMSIS
+- bsp/essemi/es8p508x/libraries/Library
+
+------
+
+License: bsd-new
+
+Copyright: Copyright (c) 2013 ARM LIMITED
+
+Path:
+
+- bsp/essemi/es32f0271/libraries/CMSIS/RTOS
+- bsp/essemi/es32f0334/libraries/CMSIS/Include
+- bsp/essemi/es32f0654/libraries/CMSIS/Include
+- bsp/essemi/es8p508x/libraries/CMSIS
+
+### frdm-k64f
+
+License: bsd-new
+
+Copyright: Copyright (c) 2015, Freescale Semiconductor, Inc.
+
+Path:
+
+- bsp/frdm-k64f/board
+- bsp/frdm-k64f/device
+
+### gd32
+
+bsp 列表:
+- gd32103c-eval
+- gd32303e-eval
+- gd32450z-eval
+- gd32e230k-start
+- gd32vf103v-eval
+
+------
+
+License: 未注明
+
+Copyright: Copyright (c) 2017 GigaDevice
+
+Path:
+
+- bsp/gd32450z-eval/Libraries/GD32F4xx_standard_peripheral
+- bsp/gd32450z-eval/Libraries/GD32F4xx_usb_driver
+
+------
+
+License: bsd-new
+
+Copyright: Copyright (c) 2018, GigaDevice Semiconductor Inc.
+
+Path:
+
+- bsp/gd32e230k-start/Libraries/CMSIS/GD
+- bsp/gd32e230k-start/Libraries/GD32E230_standard_peripheral
+- bsp/gd32vf103v-eval/board/gd32vf103_libopt.h
+- bsp/gd32vf103v-eval/libraries/GD32VF103_standard_peripheral
+
+------
+
+License: bsd-new
+
+Copyright: Copyright (c) 2012 ARM LIMITED
+
+Path:
+
+- bsp/gd32103c-eval/Libraries/CMSIS/core_cm3.h
+- bsp/gd32303e-eval/Libraries/CMSIS/core
+- bsp/gd32303e-eval/Libraries/CMSIS/GD/GD32F30x/Include
+- bsp/gd32450z-eval/Libraries/CMSIS/core
+- bsp/gd32e230k-start/Libraries/CMSIS/GD/GD32E230/Include/system
+
+------
+
+License: arm-cortex-mx
+
+Copyright: Copyright (c) 2009-2012 ARM Limited
+
+Path:
+
+- bsp/gd32103c-eval/Libraries/CMSIS/core
+- bsp/gd32303e-eval/Libraries/CMSIS/core
+
+### hc32f4a0
+
+License: bsd-new
+
+Copyright: Copyright (c) 2020, Huada Semiconductor Co., Ltd.
+
+Path:
+
+- bsp/hc32f4a0/Libraries/CMSIS
+- bsp/hc32f4a0/Libraries/HC32F4A0_StdPeriph_Driver
+
+### imx6sx
+
+License:  other-permissive
+
+Copyright: Copyright (c) 2012, Freescale Semiconductor, Inc.
+
+Path:
+
+- bsp/imx6sx/cortex-a9/board
+
+------
+
+License: bsd-new、robert-hubley、other-permissive、proprietary-license
+
+Copyright: Copyright (c) 2012, Freescale Semiconductor, Inc.
+
+Path:
+
+- bsp/imx6sx/iMX6_Platform_SDK
+
+### imx6ul
+
+License: bsd-new、proprietary-license、robert-hubley
+
+Copyright: Copyright (c) 2012, Freescale Semiconductor, Inc.
+
+Path:
+
+- bsp/imx6ul/platform
+
+### imxrt
+
+License: clear-bsd
+
+Copyright: Copyright 2016 - 2017 NXP
+
+Path:
+
+- bsp/imxrt/imxrt1052-nxp-evk/xip
+
+------
+
+License: bsd-new
+
+Copyright: Copyright 2016 - 2017 NXP
+
+Path:
+
+- bsp/imxrt/imxrt1064-nxp-evk/board/MCUX_Config/clock_config.c
+- bsp/imxrt/imxrt1064-nxp-evk/xip
+- bsp/imxrt/libraries/drivers/drv_sdram.c
+- bsp/imxrt/libraries/drivers/usb
+- bsp/imxrt/libraries/MIMXRT1050/MIMXRT1052
+- bsp/imxrt/libraries/MIMXRT1064/MIMXRT1064
+
+### lm
+
+bsp 列表:
+
+- lm3s9b9x
+- lm3s8962
+- lm4f232
+
+------
+
+License: unknown-license-reference 或 proprietary-license
+
+Copyright: Copyright (c) 2005-2011 Texas Instruments Incorporated
+
+Path:
+
+- bsp/lm3s8962/Libraries
+- bsp/lm3s9b9x/Libraries
+- bsp/lm4f232/Libraries
+
+###  lpcxxx
+
+bsp 列表:
+
+- lpc408x
+- lpc54114-lite
+- lpc54608-LPCXpresso
+- lpc55sxx
+
+------
+
+License: arm-cortex-mx
+
+Copyright: Copyright (c) 2009 ARM Limited
+
+Path:
+
+- bsp/lpc176x/CMSIS/CM3
+- bsp/lpc178x/CMSIS/CM3
+- bsp/lpc408x/Libraries/CMSIS
+
+------
+
+License: nxp-warranty-disclaimer
+
+Copyright: Copyright (c) 2011, NXP Semiconductor
+
+Path:
+
+- bsp/lpc178x/CMSIS/CM3
+- bsp/lpc178x/drivers
+- bsp/lpc408x/Libraries/Device/NXP/LPC407x_8x_177x_8x
+- bsp/lpc43xx/Libraries/Device/NXP/LPC43xx
+
+------
+
+License: bsd-new
+
+Copyright: Copyright (c) 2009 - 2013 ARM Limited
+
+Path:
+
+- bsp/lpc176x/CMSIS/CMSI
+- bsp/lpc43xx/Libraries/CMSIS
+- bsp/lpc5410x/Libraries/CMSIS
+- bsp/lpc54608-LPCXpresso/SDK_2.2_LPCXpresso54608 (Copyright 2016-2017 NXP)
+- bsp/lpc55sxx/Libraries/LPC55S6X (Copyright 2016-2018 NXP)
+
+------
+
+License: nxp-microcontroller-proprietary
+
+Copyright: Copyright (c) 2011, NXP Semiconductor
+
+Path:
+
+- bsp/lpc408x/Libraries/Drivers
+- bsp/lpc5410x/Libraries
+- bsp/lpc824/Libraries
+
+------
+
+License: clear-bsd
+
+Copyright: Copyright 2016-2018 NXP
+
+Path:
+
+- bsp/lpc54114-lite/Libraries/devices/LPC54114
+
+------
+
+License: zlib
+
+Copyright: Copyright (c) 2013-2014 ARM Ltd.
+
+Path:
+
+- bsp/lpc54608-LPCXpresso/SDK_2.2_LPCXpresso54608
+
+### maxim
+
+License: bsd-new
+
+Copyright: Copyright (c) 2016 Maxim Integrated Products, Inc.
+
+Path:
+
+- bsp/maxim/libraries/MAX32660PeriphDriver/CMSIS/Core
+
+------
+
+License: x11-xconsortium
+
+Copyright: Copyright (c) 2016 Maxim Integrated Products, Inc.
+
+Path:
+
+- bsp/maxim/libraries/MAX32660PeriphDriver
+
+### mb9bf
+
+bsp 列表:
+
+- mb9bf500r
+- mb9bf506r
+- mb9bf568r
+- mb9bf618s
+
+------
+
+License: arm-cortex-mx
+
+Copyright: Copyright (c) 2009-2010 ARM Limited
+
+Path:
+
+- bsp/mb9bf500r/CMSIS/core_xx
+- bsp/mb9bf506r/CMSIS/core_xx
+- bsp/mb9bf506r/libraries/CMSIS
+- bsp/mb9bf568r/CMSIS/Include/core_xx
+
+------
+
+License: free-unknown
+
+Copyright: (c) Fujitsu Semiconductor Europe GmbH
+
+Path:
+
+- bsp/mb9bf500r/CMSIS
+- sp/mb9bf506r/libraries/Device
+- bsp/mb9bf618s/CMSIS/DeviceSupport
+
+------
+
+License: warranty-disclaimer
+
+Copyright: Copyright (c) 2013 Spansion LLC.
+
+Path:
+
+- bsp/mb9bf568r/CMSIS/DeviceSupport
+
+------
+
+License: bsd-new
+
+Copyright: Copyright (c) 2009 - 2013 ARM LIMITED
+
+Path:
+
+- bsp/mb9bf618s/CMSIS/Include
+
+### mm32
+
+bsp 列表:
+
+- mm32l07x
+- mm32l3xx
+
+------
+
+License: bsd-new
+
+Copyright: Copyright (c) 2009 - 2013 ARM LIMITED
+
+Path:
+
+- bsp/mm32l07x/Libraries/CMSIS
+- bsp/mm32l3xx/Libraries/CMSIS/IAR_CORE
+
+------
+
+License: st-mcd-2.0
+
+Copyright: (c) COPYRIGHT 2017 MindMotion
+
+Path:
+
+- bsp/mm32l07x/Libraries/MM32L0xx
+- bsp/mm32l3xx/Libraries/MM32L3xx
+
+### nrf
+
+bsp 列表:
+
+- nrf5x
+- nrf51822
+
+------
+
+License: bsd-new
+
+Copyright: Copyright (c) 2009 - 2013 ARM LIMITED
+
+Path:
+
+- bsp/nrf5x/libraries/cmsis
+- bsp/nrf51822/Libraries/CMSIS
+- bsp/nrf51822/Libraries/nrf51822 (Copyright (c) 2013, Nordic Semiconductor ASA)
+
+### nuvoton
+
+License: bsd-new
+
+Copyright: Copyright (c) 2014 - 2015 Bosch Sensortec GmbH
+
+Path:
+
+- bsp/nuvoton/libraries/nu_packages/BMX055/libraries/BMG160_driver
+- bsp/nuvoton/libraries/nu_packages/BMX055/libraries/BMM050_driver
+
+------
+
+License: warranty-disclaimer
+
+Copyright: Copyright (c) 2015 - 2016 Bosch Sensortec GmbH
+
+Path:
+
+- bsp/nuvoton/libraries/nu_packages/BMX055/libraries/BMA2x2_driver
+
+------
+
+License: x11-xconsortium
+
+Copyright: Copyright (c) 2019 Maxim Integrated Products, Inc.
+
+Path:
+
+- bsp/nuvoton/libraries/nu_packages/MAX31875/libraries
+
+### raspberry-pi
+
+License: mit
+
+Copyright: Copyright (c) 2018 bzt
+
+Path:
+
+- bsp/raspberry-pi/raspi3-64/applications/test
+
+### raspberry-pico
+
+License: bsd-new、mit
+
+Copyright: Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
+
+Path: bsp/raspberry-pico/libraries/pico-sdk
+
+### rm48x50
+
+License: 未注明
+
+Copyright: (c) Texas Instruments 2009-2013
+
+Path:
+
+- bsp/rm48x50/HALCoGen
+
+### rv32m1_vega
+
+License: bsd-new
+
+Copyright: Copyright 2016-2017 NXP
+
+Path:
+
+- bsp/rv32m1_vega/ri5cy/board
+- bsp/rv32m1_vega/rv32m1_sdk_riscv
+
+### rx
+
+License: 未注明
+
+Copyright: Copyright, 2011. Renesas Electronics Corporation and Renesas Solutions Corporation
+
+Path: 
+
+- bsp/rx/RPDL
+
+### sam7x
+
+License: bsd-atmel
+
+Copyright: Copyright (c) 2006, Atmel Corporation
+
+Copyright: Copyright: Copyright (c) 2006, Atmel Corporation
+
+Path:
+
+- bsp/sam7x/drivers
+
+### samd21
+
+License: bsd-new
+
+Copyright: Copyright (c) 2014-2015 Atmel Corporation
+
+Path:
+
+- bsp/samd21/asflib_config
+- bsp/samd21/sam_d2x_asflib
+
+### simulator
+
+License: bsd-new、bsd-original-uc
+
+Copyright: Copyright (c) 2006 Paolo Abeni (Italy)、Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 The Regents of the University of California
+
+Path:
+
+- bsp/simulator/pcap
+
+------
+
+License: zlib
+
+Copyright: Copyright (c) 1997-2017 Sam Lantinga <slouken@libsdl.org>
+
+Path:
+
+- bsp/simulator/SDL2-2.0.7
+
+### smartfusion2
+
+License: arm-cortex-mx
+
+Copyright: Copyright (c) 2009 ARM Limited
+
+Path:
+
+- bsp/smartfusion2/CMSIS/core
+
+### stm32
+
+License: bsd-new
+
+Copyright:
+
+Path:
+
+- bsp/stm32/libraries/STM32xxxx_HAL
+- bsp/stm32/libraries/templates
+- bsp/stm32/stm32_bsp_name/board/CubeMX_Config
+
+------
+
+License: mit
+
+Copyright: COPYRIGHT 2011 STMicroelectronics
+
+Path:
+
+- bsp/stm32/libraries (exclude bsp/stm32/libraries/HAL_Drivers)
+
+### SYNWIT
+
+bsp 列表:
+
+- swm320
+- swm320-lq100
+
+------
+
+License: st-mcd-2.0
+
+Copyright: COPYRIGHT 2012 Synwit Technology
+
+Path:
+
+- bsp/swm320/libraries/CMSIS/DeviceSupport
+- bsp/swm320-lq100/Libraries/SWM320_StdPeriph_Driver
+
+------
+
+License: bsd-new
+
+Copyright:  Copyright (c) 2009 - 2014 ARM LIMITED
+
+Path:
+
+- bsp/swm320/libraries/CMSIS
+- bsp/swm320-lq100/Libraries/CMSIS/CoreSupport
+
+### tm4c
+
+License: unknown-license-reference(bsd-new)
+
+Copyright: Copyright (c) 2012-2017 Texas Instruments Incorporated
+
+Path:
+
+- bsp/tm4c123bsp/libraries
+- bsp/tm4c129x/libraries
+
+### tms320f28379d
+
+License: bsd-new
+
+Copyright: Copyright (c) 2013-2018 Texas Instruments Incorporated - http://www.ti.com
+
+Path:
+
+- bsp/tms320f28379d/libraries
+
+### xplorer4330
+
+License: bsd-new
+
+Copyright: Copyright (c) 2009 - 2013 ARM LIMITED
+
+Path:
+
+- bsp/xplorer4330/Libraries/CMSIS/Include
+
+------
+
+License: nxp-warranty-disclaimer
+
+Copyright: Copyright (c) 2011, NXP Semiconductor
+
+Path:
+
+- bsp/xplorer4330/Libraries/Device/NXP/LPC43xx
+
+### zynqmp-r5-axu4ev
+
+License: mit
+
+Copyright: Copyright (c) 2014 - 2020 Xilinx, Inc.
+
+Path:
+
+- bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver
+

+ 2 - 16
bsp/allwinner_tina/applications/main.c

@@ -1,21 +1,7 @@
 /*
- * File      : main.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/allwinner_tina/drivers/board.c

@@ -1,21 +1,7 @@
 /*
- * File      : board.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/allwinner_tina/drivers/board.h

@@ -1,21 +1,7 @@
 /*
- * File      : board.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 4 - 18
bsp/allwinner_tina/drivers/drv_clock.c

@@ -1,21 +1,7 @@
 /*
- * File      : drv_clock.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -541,7 +527,7 @@ rt_err_t mmc_set_clk(enum mmc_clk_id clk_id, int hz)
         *mmc_clk &= ~(0x1 << 31);
         return RT_EOK;
     }
-    
+
     if (hz <= 24000000)
     {
         pll = (0x0 << 24);
@@ -593,7 +579,7 @@ rt_err_t mmc_set_clk(enum mmc_clk_id clk_id, int hz)
         oclk_dly = 1;
         sclk_dly = 4;
     }
-    
+
     *mmc_clk = (0x1 << 31) | pll | (sclk_dly << 20) | \
            (n << 16) | (oclk_dly << 8) | (div - 1);
 

+ 3 - 17
bsp/allwinner_tina/drivers/drv_clock.h

@@ -1,21 +1,7 @@
 /*
- * File      : drv_clock.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -252,4 +238,4 @@ rt_err_t dram_gate_clk_enable(enum dram_gate dram_gate);
 rt_err_t dram_gate_clk_disable(enum dram_gate dram_gate);
 
 rt_err_t mmc_set_clk(enum mmc_clk_id clk_id, int hz);
-#endif
+#endif

+ 2 - 16
bsp/allwinner_tina/drivers/drv_gpio.c

@@ -1,21 +1,7 @@
 /*
- * File      : drv_gpio.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 3 - 17
bsp/allwinner_tina/drivers/drv_gpio.h

@@ -1,21 +1,7 @@
 /*
- * File      : drv_gpio.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -241,4 +227,4 @@ void gpio_set_debounce(enum gpio_port port, rt_uint8_t prescaler);
 void gpio_set_irq_callback(enum gpio_port port, enum gpio_pin pin, void (*irq_cb)(void *), void *irq_arg);
 int rt_hw_gpio_init(void);
 
-#endif /* __DRV_GPIO_H__ */
+#endif /* __DRV_GPIO_H__ */

+ 23 - 37
bsp/allwinner_tina/drivers/drv_sdio.c

@@ -1,21 +1,7 @@
 /*
- * File      : drv_sdio.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -34,10 +20,10 @@
 
 
 #define DBG_TAG  "MMC"
-// #define DBG_LVL DBG_LOG    
-// #define DBG_LVL DBG_INFO   
+// #define DBG_LVL DBG_LOG
+// #define DBG_LVL DBG_INFO
 #define DBG_LVL DBG_WARNING
-// #define DBG_LVL DBG_ERROR  
+// #define DBG_LVL DBG_ERROR
 #include <rtdbg.h>
 
 #ifdef RT_USING_SDIO
@@ -47,12 +33,12 @@
 struct mmc_xfe_des
 {
     rt_uint32_t size;    /* block size  */
-	rt_uint32_t num;     /* block num   */
-	rt_uint8_t *buff;    /* buff addr   */
-	rt_uint32_t flag;    /* write or read or stream */
-#define MMC_DATA_WRITE	(1 << 0)
-#define MMC_DATA_READ	(1 << 1)
-#define MMC_DATA_STREAM	(1 << 2)
+    rt_uint32_t num;     /* block num   */
+    rt_uint8_t *buff;    /* buff addr   */
+    rt_uint32_t flag;    /* write or read or stream */
+#define MMC_DATA_WRITE  (1 << 0)
+#define MMC_DATA_READ   (1 << 1)
+#define MMC_DATA_STREAM (1 << 2)
 };
 
 struct mmc_flag
@@ -71,7 +57,7 @@ struct sdio_drv
     tina_mmc_t mmc_des;
     rt_uint8_t *mmc_buf;
     rt_uint8_t usedma;
-    
+
 };
 
 #ifdef CONFIG_MMC_USE_DMA
@@ -136,7 +122,7 @@ static int mmc_update_clk(tina_mmc_t mmc)
     mmc->risr_reg = mmc->risr_reg;
     return RT_EOK;
 }
-    
+
 static rt_err_t mmc_trans_data_by_dma(tina_mmc_t mmc, struct mmc_xfe_des *xfe)
 {
     ALIGN(32) static struct mmc_des_v4p1 pdes[128];  // mast ALIGN(32)
@@ -145,7 +131,7 @@ static rt_err_t mmc_trans_data_by_dma(tina_mmc_t mmc, struct mmc_xfe_des *xfe)
     unsigned length = xfe->size * xfe->num;
     unsigned buff_frag_num = length >> SDXC_DES_NUM_SHIFT;
     unsigned remain = length & (SDXC_DES_BUFFER_MAX_LEN - 1);
-    
+
     if (remain)
     {
         buff_frag_num ++;
@@ -156,7 +142,7 @@ static rt_err_t mmc_trans_data_by_dma(tina_mmc_t mmc, struct mmc_xfe_des *xfe)
     }
     memset(pdes, 0, sizeof(pdes));
     mmu_clean_dcache((rt_uint32_t)(xfe->buff), length);
-    for (i = 0, des_idx = 0; i < buff_frag_num; i++, des_idx++) 
+    for (i = 0, des_idx = 0; i < buff_frag_num; i++, des_idx++)
     {
         // memset((void*)&pdes[des_idx], 0, sizeof(struct mmc_v4p1));
         pdes[des_idx].des_chain = 1;
@@ -182,8 +168,8 @@ static rt_err_t mmc_trans_data_by_dma(tina_mmc_t mmc, struct mmc_xfe_des *xfe)
             pdes[des_idx].last_des = 1;
             pdes[des_idx].end_of_ring = 1;
             pdes[des_idx].buf_addr_ptr2 = 0;
-        } 
-        else 
+        }
+        else
         {
             pdes[des_idx].buf_addr_ptr2 = (unsigned long)&pdes[des_idx+1];
         }
@@ -217,7 +203,7 @@ static rt_err_t mmc_trans_data_by_dma(tina_mmc_t mmc, struct mmc_xfe_des *xfe)
     mmc->dmac_reg = (1 << 1) | (1 << 7);        /* idma on              */
     rval = mmc->idie_reg & (~3);
     if (xfe->flag == MMC_DATA_WRITE)
-        rval |= (1 << 0);        
+        rval |= (1 << 0);
     else
         rval |= (1 << 1);
     mmc->idie_reg = rval;
@@ -236,7 +222,7 @@ static rt_err_t mmc_trans_data_by_cpu(tina_mmc_t mmc, struct mmc_xfe_des *xfe)
 
     if (xfe->flag == MMC_DATA_WRITE)
     {
-        for (i = 0; i < (byte_cnt >> 2); i++) 
+        for (i = 0; i < (byte_cnt >> 2); i++)
         {
             while(--timeout && (mmc->star_reg & (1 << 3)));
 
@@ -251,7 +237,7 @@ static rt_err_t mmc_trans_data_by_cpu(tina_mmc_t mmc, struct mmc_xfe_des *xfe)
     }
     else
     {
-        for (i = 0; i < (byte_cnt >> 2); i++) 
+        for (i = 0; i < (byte_cnt >> 2); i++)
         {
             while(--timeout && (mmc->star_reg & (1 << 2)));
 
@@ -290,7 +276,7 @@ static rt_err_t mmc_config_clock(tina_mmc_t mmc, int clk)
     {
         mmc_set_clk(SDMMC1, clk);
     }
-    
+
     /* Re-enable card clock */
     rval = mmc->ckcr_reg;
     rval |=  (0x1 << 16); //(3 << 16);
@@ -383,7 +369,7 @@ static int mmc_send_cmd(struct rt_mmcsd_host *host, struct rt_mmcsd_cmd *cmd)
         cmdval |= (1 << 7);
     if ((resp_type(cmd) != RESP_R3) && (resp_type(cmd) != RESP_R4))
         cmdval |= (1 << 8);
-    
+
     if (data)
     {
         cmdval |= (1 << 9) | (1 << 13);
@@ -606,7 +592,7 @@ static void sdio_request_send(struct rt_mmcsd_host *host, struct rt_mmcsd_req *r
 
     memset(&sdio->flag, 0, sizeof(struct mmc_flag));
     mmc_send_cmd(host, req->cmd);
-    
+
     return;
 }
 

+ 5 - 19
bsp/allwinner_tina/drivers/drv_sdio.h

@@ -1,21 +1,7 @@
 /*
- * File      : drv_sdio.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -133,8 +119,8 @@ REG[31]  : Load cmd
 #define SDXC_UPDATE_CLOCK_CMD    BIT(21)
 #define SDXC_LOAD_CMD            BIT(31)
 
-/* 
-    SD status reg 
+/*
+    SD status reg
 REG[0]   : FIFO_RX_LEVEL
 REG[1]   : FIFO_TX_LEVEL
 REG[2]   : FIFO_EMPTY
@@ -143,7 +129,7 @@ REG[4-7] : FSM_STA
 REG[8]   : CARD_PRESENT
 REG[9]   : CARD_BUSY
 REG[10]  : FSM_BUSY
-REG[11-16]: RESP_IDX 
+REG[11-16]: RESP_IDX
 REG[17-21]: FIFO_LEVEL
 REG[31]   : DMA_REQ
 */

+ 3 - 17
bsp/allwinner_tina/drivers/drv_uart.c

@@ -1,21 +1,7 @@
 /*
- * File      : drv_uart.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -324,4 +310,4 @@ void uart_irq_handler(int irqno, void *param)
 
 }
 
-#endif
+#endif

+ 2 - 16
bsp/allwinner_tina/drivers/drv_uart.h

@@ -1,21 +1,7 @@
 /*
- * File      : drv_uart.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/allwinner_tina/drivers/spi/drv_spi.c

@@ -1,21 +1,7 @@
 /*
- * File      : drv_spi.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/allwinner_tina/drivers/spi/drv_spi.h

@@ -1,21 +1,7 @@
 /*
- * File      : drv_spi.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 3 - 17
bsp/allwinner_tina/drivers/spi/drv_spi_flash.c

@@ -1,21 +1,7 @@
 /*
- * File      : drv_spi_flash.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -65,4 +51,4 @@ INIT_PREV_EXPORT(rt_hw_spi_flash_with_sfud_init);
 
 #endif
 
-#endif
+#endif

+ 2 - 16
bsp/allwinner_tina/libcpu/context_gcc.S

@@ -1,21 +1,7 @@
 ;/*
-; * File      : context_iar.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006, RT-Thread Development Team
+; * Copyright (c) 2006-2021, RT-Thread Development Team
 ; *
-; *  This program is free software; you can redistribute it and/or modify
-; *  it under the terms of the GNU General Public License as published by
-; *  the Free Software Foundation; either version 2 of the License, or
-; *  (at your option) any later version.
-; *
-; *  This program is distributed in the hope that it will be useful,
-; *  but WITHOUT ANY WARRANTY; without even the implied warranty of
-; *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; *  GNU General Public License for more details.
-; *
-; *  You should have received a copy of the GNU General Public License along
-; *  with this program; if not, write to the Free Software Foundation, Inc.,
-; *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+; * SPDX-License-Identifier: Apache-2.0
 ; *
 ; * Change Logs:
 ; * Date           Author       Notes

+ 2 - 16
bsp/allwinner_tina/libcpu/cpu.c

@@ -1,21 +1,7 @@
 /*
- * File      : cpu.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/allwinner_tina/libcpu/cpuport.c

@@ -1,21 +1,7 @@
 /*
- * File      : cpuport.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/allwinner_tina/libcpu/interrupt.c

@@ -1,21 +1,7 @@
 /*
- * File      : interrupt.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/allwinner_tina/libcpu/interrupt.h

@@ -1,21 +1,7 @@
 /*
- * File      : interrupt.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/allwinner_tina/libcpu/mmu.c

@@ -1,21 +1,7 @@
 /*
- * File      : mmu.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/allwinner_tina/libcpu/mmu.h

@@ -1,21 +1,7 @@
 /*
- * File      : mmu.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/allwinner_tina/libcpu/rt_low_level_init.c

@@ -1,21 +1,7 @@
 /*
- * File      : rt_low_level_init.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/allwinner_tina/libcpu/stack.c

@@ -1,21 +1,7 @@
 /*
- * File      : stack.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/allwinner_tina/libcpu/trap.c

@@ -1,21 +1,7 @@
 /*
- * File      : trap.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 6
bsp/amebaz/applications/main.c

@@ -1,11 +1,7 @@
 /*
- * File      : startup.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006, RT-Thread Develop Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://openlab.rt-thread.com/license/LICENSE
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/amebaz/applications/smartconfig_app.c

@@ -1,21 +1,7 @@
 /*
- * File      : smartconfig_demo.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 5 - 9
bsp/amebaz/drivers/board.c

@@ -1,11 +1,7 @@
 /*
- * File      : board.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2009 RT-Thread Develop Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rt-thread.org/license/LICENSE
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -44,7 +40,7 @@ void __wrap_rtl_printf(const char *fmt, ...)
      * length. */
     length = rt_vsnprintf(rt_log_buf, sizeof(rt_log_buf) - 1, fmt, args);
     if (length > RT_CONSOLEBUF_SIZE - 1)
-        length = RT_CONSOLEBUF_SIZE - 1;    
+        length = RT_CONSOLEBUF_SIZE - 1;
     rt_kprintf("%s", rt_log_buf);
     va_end(args);
 }
@@ -89,11 +85,11 @@ void rt_hw_board_init(void)
 #ifdef RT_USING_HEAP
         rt_system_heap_init((void*)HEAP_BEGIN, (void*)HEAP_END);
 #endif
-    
+
 #ifdef RT_USING_COMPONENTS_INIT
     rt_components_board_init();
 #endif
-    
+
 #ifdef RT_USING_CONSOLE
     rt_hw_uart_init();
     rt_console_set_device(RT_CONSOLE_DEVICE_NAME);

+ 2 - 6
bsp/amebaz/drivers/board.h

@@ -1,11 +1,7 @@
 /*
- * File      : board.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2009, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rt-thread.org/license/LICENSE
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 15 - 29
bsp/amebaz/drivers/drv_uart.c

@@ -1,21 +1,7 @@
 /*
- * File      : drv_uart.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -125,7 +111,7 @@ static int ameba_uart_getc (struct rt_serial_device *serial)
 {
     struct device_uart* uart = serial->parent.user_data;
 
-	if(!serial_readable(&uart->serial))
+    if(!serial_readable(&uart->serial))
         return -1;
 
     /* Receive Data Available */
@@ -140,13 +126,13 @@ static rt_size_t ameba_uart_dma_transmit (struct rt_serial_device *serial, rt_ui
 static void ameba_uart_irq(uint32_t id, SerialIrq event)
 {
     struct rt_serial_device *serial = (struct rt_serial_device *)id;
-	if(event == RxIrq)
+    if(event == RxIrq)
     {
         rt_hw_serial_isr(serial, RT_SERIAL_EVENT_RX_IND);
-	}
-	else if(event == TxIrq)
+    }
+    else if(event == TxIrq)
     {
-	}
+    }
 }
 
 static rt_err_t dbg_configure(struct rt_serial_device *serial, struct serial_configure *cfg);
@@ -155,7 +141,7 @@ static int dbg_putc(struct rt_serial_device *serial, char c);
 static int dbg_getc(struct rt_serial_device *serial);
 
 static struct rt_serial_device ameba_dbg_serial;
-const struct rt_uart_ops _ambed_dbg_ops = 
+const struct rt_uart_ops _ambed_dbg_ops =
 {
     dbg_configure,
     dbg_control,
@@ -177,7 +163,7 @@ void dbg_uart_irq_handler(void * data)
     DiagSetIsrEnReg(0);
 
     rt_hw_serial_isr(&ameba_dbg_serial, RT_SERIAL_EVENT_RX_IND);
-    
+
     DiagSetIsrEnReg(IrqEn);
 }
 
@@ -192,9 +178,9 @@ static rt_err_t dbg_control(struct rt_serial_device *serial, int cmd, void *arg)
 
     case RT_DEVICE_CTRL_SET_INT:
         /* install interrupt */
-    	DIAG_UartReInit((IRQ_FUN) dbg_uart_irq_handler);
+        DIAG_UartReInit((IRQ_FUN) dbg_uart_irq_handler);
         /* Enable the UART Interrupt */
-    	NVIC_SetPriority(UART_LOG_IRQ, 10); /* this is rom_code_patch */
+        NVIC_SetPriority(UART_LOG_IRQ, 10); /* this is rom_code_patch */
         break;
     }
 
@@ -214,12 +200,12 @@ static int dbg_getc(struct rt_serial_device *serial)
 
     if(!UART_Readable(UART2_DEV))
         return -1;
-    
+
     c = DiagGetChar(_FALSE);
 
     return c;
 }
- 
+
 /*
  * UART Initiation
  */
@@ -231,7 +217,7 @@ int rt_hw_uart_init(void)
 #ifdef BSP_USING_UART0
     {
         struct device_uart      *uart;
-        
+
         serial  = &serial0;
         uart    = &uart0;
 
@@ -256,7 +242,7 @@ int rt_hw_uart_init(void)
 
         serial->ops = &_ambed_dbg_ops;
         serial->config = config;
-        
+
         rt_hw_serial_register(serial,
                               RT_CONSOLE_DEVICE_NAME,
                               RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX,

+ 2 - 16
bsp/amebaz/drivers/drv_uart.h

@@ -1,21 +1,7 @@
 /*
- * File      : drv_uart.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 7 - 21
bsp/amebaz/drivers/wlan/drv_wifi.c

@@ -1,21 +1,7 @@
 /*
- * File      : drv_wifi.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -115,7 +101,7 @@ void netif_pre_sleep_processing(void)
 }
 
 unsigned char *rltk_wlan_get_ip(int idx)
-{   
+{
     struct ameba_wifi *wifi;
 
     wifi = rthw_wifi_get_dev(idx);
@@ -130,7 +116,7 @@ unsigned char *rltk_wlan_get_ip(int idx)
 
 int netif_is_valid_IP(int idx, unsigned char *ip_dest)
 {
-    LOG_D("F:%s L:%d is run ip: %d:%d:%d:%d", __FUNCTION__, __LINE__, 
+    LOG_D("F:%s L:%d is run ip: %d:%d:%d:%d", __FUNCTION__, __LINE__,
         ip_dest[0], ip_dest[1], ip_dest[2], ip_dest[3]);
     return 1;
 }
@@ -376,9 +362,9 @@ static rt_err_t rthw_wlan_join                 (struct rt_wlan_device *wlan, str
             ssid = &sta_info->ssid.val[0];
         if (sta_info->key.len > 0)
             key = &sta_info->key.val[0];
-            LOG_D("bssid connect bssid: %02x:%02x:%02x:%02x:%02x:%02x ssid:%s ssid_len:%d key:%s key_len%d", 
+            LOG_D("bssid connect bssid: %02x:%02x:%02x:%02x:%02x:%02x ssid:%s ssid_len:%d key:%s key_len%d",
             sta_info->bssid[0],sta_info->bssid[1],sta_info->bssid[2],sta_info->bssid[3],sta_info->bssid[4],sta_info->bssid[5],
-            ssid, 
+            ssid,
             sta_info->ssid.len,
             key,
             sta_info->key.len
@@ -608,7 +594,7 @@ exit:
     return RT_EOK;
 }
 
-static const struct rt_wlan_dev_ops ops = 
+static const struct rt_wlan_dev_ops ops =
 {
     .wlan_init             =     rthw_wlan_init           ,
     .wlan_mode             =     rthw_wlan_mode           ,

+ 3 - 17
bsp/amebaz/drivers/wlan/drv_wifi.h

@@ -1,27 +1,13 @@
 /*
- * File      : drv_wifi.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
  * 2017-5-30      Bernard      the first version
  */
- 
+
 #ifndef __DRV_WIFI_H__
 #define __DRV_WIFI_H__
 

+ 9 - 23
bsp/amebaz/drivers/wlan/drv_wlan.c

@@ -1,21 +1,7 @@
 /*
- * File      : drv_wlan.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -151,20 +137,20 @@ int rthw_wifi_ap_start(char *ssid, char *password, int channel)
         return -1;
     }
 
-    while(1) 
+    while(1)
     {
         char essid[33];
         if(wext_get_ssid(name, (unsigned char *) essid) > 0)
         {
-            if(strcmp((const char *) essid, (const char *)ssid) == 0) 
+            if(strcmp((const char *) essid, (const char *)ssid) == 0)
             {
                 rt_kprintf("%s started\n", ssid);
                 break;
             }
         }
-        if(timeout == 0) 
+        if(timeout == 0)
         {
-            rt_kprintf("Start AP timeout\n");   
+            rt_kprintf("Start AP timeout\n");
             return -1;
         }
         rt_thread_delay(1 * RT_TICK_PER_SECOND);
@@ -183,7 +169,7 @@ static int rthw_wifi_disconnect(char *name)
     if (name == RT_NULL)
         return -1;
 
-    if (wext_get_ssid(name, (unsigned char *) essid) < 0) 
+    if (wext_get_ssid(name, (unsigned char *) essid) < 0)
     {
         rt_kprintf("\nWIFI disconnected!\n");
         return -1;
@@ -203,7 +189,7 @@ static int rthw_wifi_disconnect(char *name)
             break;
         }
 
-        if(timeout == 0) 
+        if(timeout == 0)
         {
             rt_kprintf("ERROR: Deassoc timeout!\n");
             return -1;
@@ -259,7 +245,7 @@ int rthw_wifi_ap_disconnect(void)
 
 int rthw_wifi_rssi_get(void)
 {
-    int rssi = 0;   
+    int rssi = 0;
     wifi_get_rssi(&rssi);
     return rssi;
 }

+ 10 - 24
bsp/amebaz/drivers/wlan/drv_wlan.h

@@ -1,21 +1,7 @@
 /*
- * File      : drv_wlan.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -25,14 +11,14 @@
 #ifndef __DRV_WLAN_H__
 #define __DRV_WLAN_H__
 
-typedef enum 
+typedef enum
 {
-	RTHW_MODE_NONE = 0,
-	RTHW_MODE_STA,
-	RTHW_MODE_AP,
-	RTHW_MODE_STA_AP,
-	RTHW_MODE_PROMISC,
-	RTHW_MODE_P2P
+    RTHW_MODE_NONE = 0,
+    RTHW_MODE_STA,
+    RTHW_MODE_AP,
+    RTHW_MODE_STA_AP,
+    RTHW_MODE_PROMISC,
+    RTHW_MODE_P2P
 }rthw_mode_t;
 
 #define SHARED_ENABLED  0x00008000
@@ -66,7 +52,7 @@ typedef enum {
 typedef enum {
     RTHW_WIFI_EVENT_CONNECT = 0,
     RTHW_WIFI_EVENT_DISCONNECT = 1,
-    RTHW_WIFI_EVENT_FOURWAY_HANDSHAKE_DONE = 2,	
+    RTHW_WIFI_EVENT_FOURWAY_HANDSHAKE_DONE = 2,
     RTHW_WIFI_EVENT_SCAN_RESULT_REPORT = 3,
     RTHW_WIFI_EVENT_SCAN_DONE = 4,
     RTHW_WIFI_EVENT_RECONNECTION_FAIL = 5,

+ 2 - 16
bsp/amebaz/libraries/smartconfig/inc/smartconfig.h

@@ -1,21 +1,7 @@
 /*
- * File      : smartconfig.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/apollo2/applications/main.c

@@ -1,21 +1,7 @@
 /*
- * File      : main.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 9 - 23
bsp/apollo2/board/adc.c

@@ -1,21 +1,7 @@
 /*
- * File      : adc.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -32,15 +18,15 @@
 struct rt_messagequeue adcbat_mq;
 
 #define BATTERY_GPIO            35                        /* Battery */
-#define BATTERY_ADC_PIN         AM_HAL_PIN_35_ADCSE7 
-#define BATTERY_ADC_CHANNEL     AM_HAL_ADC_SLOT_CHSEL_SE7 /* BATTERY ADC采集通道 */
-#define BATTERY_ADC_CHANNELNUM  7                         /* BATTERY ADC采集通道号 */
+#define BATTERY_ADC_PIN         AM_HAL_PIN_35_ADCSE7
+#define BATTERY_ADC_CHANNEL     AM_HAL_ADC_SLOT_CHSEL_SE7 /* BATTERY ADC閲囬泦閫氶亾 */
+#define BATTERY_ADC_CHANNELNUM  7                         /* BATTERY ADC閲囬泦閫氶亾鍙� */
 
-#define ADC_CTIMER_NUM          3                         /* ADC使用定时器 */
+#define ADC_CTIMER_NUM          3                         /* ADC浣跨敤瀹氭椂鍣� */
 #define ADC_CTIMER_COUNT        (2048/512 - 1)
 
-#define ADC_CHANNEL_NUM         1                         /* ADC采集通道个数 */
-#define ADC_SAMPLE_NUM          8                         /* ADC采样个数 */
+#define ADC_CHANNEL_NUM         1                         /* ADC閲囬泦閫氶亾涓�暟 */
+#define ADC_SAMPLE_NUM          8                         /* ADC閲囨牱涓�暟 */
 
 rt_uint8_t bat_adc_cnt = 0;
 static rt_uint8_t am_adcbat_buffer_pool[256];
@@ -52,7 +38,7 @@ rt_uint8_t am_adc_data_get(rt_uint8_t channel, rt_int16_t *buff, rt_uint16_t siz
 
     if (channel == BATTERY_ADC_CHANNELNUM)
     {
-        /* wait adc message forever */	
+        /* wait adc message forever */
         rt_mq_recv(&adcbat_mq, adc_bufftemp, 32, RT_WAITING_FOREVER);
     }
 

+ 2 - 16
bsp/apollo2/board/adc.h

@@ -1,21 +1,7 @@
 /*
- * File      : adc.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/apollo2/board/board.c

@@ -1,21 +1,7 @@
 /*
- * File      : board.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/apollo2/board/board.h

@@ -1,21 +1,7 @@
 /*
- * File      : board.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 3 - 17
bsp/apollo2/board/flash.c

@@ -1,21 +1,7 @@
 /*
- * File      : flash.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -77,7 +63,7 @@ static rt_err_t rt_flash_control(rt_device_t dev, int cmd, void *args)
                 ui32CurrentPage =  AM_HAL_FLASH_ADDR2PAGE(erase->addrstart);
                 ui32CurrentBlock = AM_HAL_FLASH_ADDR2INST(erase->addrstart);
 
-                am_hal_flash_page_erase(AM_HAL_FLASH_PROGRAM_KEY, ui32CurrentBlock, ui32CurrentPage); //µ¥ÉÈÇø²Á³ýÃüÁî
+                am_hal_flash_page_erase(AM_HAL_FLASH_PROGRAM_KEY, ui32CurrentBlock, ui32CurrentPage); //�扇区擦除命令
                 erase->addrstart += 8192;
             }
         }

+ 2 - 16
bsp/apollo2/board/flash.h

@@ -1,21 +1,7 @@
 /*
- * File      : flash.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 3 - 17
bsp/apollo2/board/gpio.c

@@ -1,21 +1,7 @@
 /*
- * File      : gpio.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -70,7 +56,7 @@ void am_pin_write(rt_device_t dev, rt_base_t pin, rt_base_t value)
     else if (value == PIN_HIGH)
     {
         am_hal_gpio_out_bit_set(pin);
-    }    
+    }
 }
 
 int am_pin_read(rt_device_t dev, rt_base_t pin)

+ 3 - 17
bsp/apollo2/board/gpio.h

@@ -1,27 +1,13 @@
 /*
- * File      : gpio.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
  * 2017-09-16     Haley        the first version
  */
- 
+
 #ifndef __GPIO_H
 #define __GPIO_H
 

+ 7 - 21
bsp/apollo2/board/i2c.c

@@ -1,21 +1,7 @@
 /*
- * File      :_i2c.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -133,7 +119,7 @@ static const struct rt_i2c_bus_device_ops am_i2c_ops =
 };
 
 #ifdef RT_USING_I2C0
-static struct am_i2c_bus am_i2c_bus_0 = 
+static struct am_i2c_bus am_i2c_bus_0 =
 {
     {0},
     AM_I2C0_IOM_INST
@@ -141,7 +127,7 @@ static struct am_i2c_bus am_i2c_bus_0 =
 #endif
 
 #ifdef RT_USING_I2C1
-static struct am_i2c_bus am_i2c_bus_1 = 
+static struct am_i2c_bus am_i2c_bus_1 =
 {
     {1},
     AM_I2C1_IOM_INST
@@ -149,7 +135,7 @@ static struct am_i2c_bus am_i2c_bus_1 =
 #endif
 
 #ifdef RT_USING_I2C2
-static struct am_i2c_bus am_i2c_bus_2 = 
+static struct am_i2c_bus am_i2c_bus_2 =
 {
     {2},
     AM_I2C2_IOM_INST
@@ -157,7 +143,7 @@ static struct am_i2c_bus am_i2c_bus_2 =
 #endif
 
 #ifdef RT_USING_I2C3
-static struct am_i2c_bus am_i2c_bus_3 = 
+static struct am_i2c_bus am_i2c_bus_3 =
 {
     {3},
     AM_I2C3_IOM_INST
@@ -165,7 +151,7 @@ static struct am_i2c_bus am_i2c_bus_3 =
 #endif
 
 #ifdef RT_USING_I2C4
-static struct am_i2c_bus am_i2c_bus_4 = 
+static struct am_i2c_bus am_i2c_bus_4 =
 {
     {4},
     AM_I2C4_IOM_INST

+ 2 - 16
bsp/apollo2/board/i2c.h

@@ -1,21 +1,7 @@
 /*
- * File      : i2c.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/apollo2/board/led.c

@@ -1,21 +1,7 @@
 /*
- * File      :_led.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/apollo2/board/led.h

@@ -1,21 +1,7 @@
 /*
- * File      : led.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 3 - 17
bsp/apollo2/board/pdm.c

@@ -1,21 +1,7 @@
 /*
- * File      :_pdm.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -66,7 +52,7 @@ rt_uint8_t am_pdm_data_get(rt_uint8_t *buff, rt_uint16_t size)
 {
     rt_uint8_t pdm_rbufftemp[340];
 
-    /* wait pdm message forever */	
+    /* wait pdm message forever */
     rt_mq_recv(&pdm_mq, pdm_rbufftemp, 340, RT_WAITING_FOREVER);
 
     /* copy the data */

+ 2 - 16
bsp/apollo2/board/pdm.h

@@ -1,21 +1,7 @@
 /*
- * File      : pdm.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/apollo2/board/pwm.c

@@ -1,21 +1,7 @@
 /*
- * File      :_pwm.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/apollo2/board/pwm.h

@@ -1,21 +1,7 @@
 /*
- * File      : pwm.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 9 - 23
bsp/apollo2/board/rtc.c

@@ -1,21 +1,7 @@
 /*
- * File      :_rtc.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -116,7 +102,7 @@ int rt_hw_rtc_init(void)
     /* Select LFRC for RTC clock source */
     am_hal_rtc_osc_select(AM_HAL_RTC_OSC_LFRC);
 #endif
-  
+
 #if RTC_CLK_SRC == XT
     /* Enable the XT for the RTC */
     am_hal_clkgen_osc_start(AM_HAL_CLKGEN_OSC_XT);
@@ -129,12 +115,12 @@ int rt_hw_rtc_init(void)
     am_hal_rtc_osc_enable();
 
     /* register rtc device */
-    rtc.type	= RT_Device_Class_RTC;
-    rtc.init 	= RT_NULL;
-    rtc.open 	= rt_rtc_open;
-    rtc.close	= RT_NULL;
-    rtc.read 	= rt_rtc_read;
-    rtc.write	= RT_NULL;
+    rtc.type    = RT_Device_Class_RTC;
+    rtc.init    = RT_NULL;
+    rtc.open    = rt_rtc_open;
+    rtc.close   = RT_NULL;
+    rtc.read    = rt_rtc_read;
+    rtc.write   = RT_NULL;
     rtc.control = rt_rtc_control;
 
     /* no private */

+ 3 - 17
bsp/apollo2/board/rtc.h

@@ -1,27 +1,13 @@
 /*
- * File      : rtc.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
  * 2017-09-14     Haley        the first version
  */
- 
+
 #ifndef __RTC_H
 #define __RTC_H
 

+ 7 - 21
bsp/apollo2/board/smbus.c

@@ -1,21 +1,7 @@
 /*
- * File      : smbus.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -42,8 +28,8 @@
 #define mSDA_OUT()        am_hal_gpio_pin_config(SMBUS_GPIO_SDA, AM_HAL_GPIO_OUTPUT)                      /* Set SDA as Output */
 #define mSCL_OUT()        am_hal_gpio_pin_config(SMBUS_GPIO_SCL, AM_HAL_GPIO_OUTPUT)                      /* Set SCL as Output */
 
-#define ACK	      0
-#define	NACK      1
+#define ACK       0
+#define NACK      1
 
 /* SCL keep time */
 static void keep_delay(void)
@@ -60,7 +46,7 @@ static void few_delay(void)
 }
 
 static rt_uint8_t am_smbus_send_bit(rt_uint8_t send_bit)
-{       
+{
     mSDA_OUT();
     few_delay();
 
@@ -128,7 +114,7 @@ static void am_smbus_stop_bit(void)
 
 static rt_uint8_t am_smbus_tx_byte(rt_uint8_t tx_byte)
 {
-    int	i;
+    int i;
     rt_uint8_t ack_bit;
     rt_uint8_t bit_out;
 
@@ -176,7 +162,7 @@ rt_uint8_t am_smbus_tx_then_tx(rt_uint8_t SlaveAddress, rt_uint8_t command, rt_u
     int i;
 
     am_smbus_start_bit();                      /* Start condition */
-		
+
     if(am_smbus_tx_byte(SlaveAddress))         /* Send SlaveAddress and write */
         return 1;
 

+ 2 - 16
bsp/apollo2/board/smbus.h

@@ -1,21 +1,7 @@
 /*
- * File      : smbus.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 6 - 20
bsp/apollo2/board/spi.c

@@ -1,21 +1,7 @@
 /*
- * File      : spi.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -180,7 +166,7 @@ static rt_uint32_t xfer(struct rt_spi_device *device, struct rt_spi_message* mes
         am_hal_gpio_out_bit_clear(am_spi_cs->chip_select);
     }
 
-    // ¶ÁÊý¾Ý
+    // 读数�
     if (recv_ptr != RT_NULL)
     {
         while (u32BytesRemaining)
@@ -213,7 +199,7 @@ static rt_uint32_t xfer(struct rt_spi_device *device, struct rt_spi_message* mes
         }
     }
 
-    // дÊý¾Ý
+    // 写数�
     else
     {
         while (u32BytesRemaining)
@@ -225,7 +211,7 @@ static rt_uint32_t xfer(struct rt_spi_device *device, struct rt_spi_message* mes
                 u32TransferSize = 64;
                 am_hal_iom_spi_write(am_spi_bus->u32Module, am_spi_cs->chip_select,
                                     (uint32_t *)send_ptr, u32TransferSize, AM_HAL_IOM_RAW);
-        
+
             }
             else
             {
@@ -257,7 +243,7 @@ static const struct rt_spi_ops am_spi_ops =
 };
 
 #ifdef RT_USING_SPI0
-static struct am_spi_bus am_spi_bus_0 = 
+static struct am_spi_bus am_spi_bus_0 =
 {
     {0},
     AM_SPI0_IOM_INST

+ 3 - 17
bsp/apollo2/board/spi.h

@@ -1,21 +1,7 @@
 /*
- * File      : spi.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -27,7 +13,7 @@
 
 #include <rtthread.h>
 
-/* ƬѡÐźŽṹÉùÃ÷ */
+/* 片选信�结构声明 */
 struct am_spi_cs
 {
     rt_uint32_t chip_select;

+ 5 - 19
bsp/apollo2/board/uart.c

@@ -1,21 +1,7 @@
 /*
- * File      : uart.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -164,11 +150,11 @@ static rt_err_t am_configure(struct rt_serial_device *serial, struct serial_conf
     else if (cfg->stop_bits == STOP_BITS_2)
         uart_cfg.bTwoStopBits = true;
 
-    if (cfg->parity == PARITY_NONE)    
+    if (cfg->parity == PARITY_NONE)
         uart_cfg.ui32Parity = AM_HAL_UART_PARITY_NONE;
-    else if (cfg->parity == PARITY_ODD)    
+    else if (cfg->parity == PARITY_ODD)
         uart_cfg.ui32Parity = AM_HAL_UART_PARITY_ODD;
-    else if (cfg->parity == PARITY_EVEN)    
+    else if (cfg->parity == PARITY_EVEN)
         uart_cfg.ui32Parity = AM_HAL_UART_PARITY_EVEN;
 
     uart_cfg.ui32FlowCtrl = AM_HAL_UART_FLOW_CTRL_NONE;

+ 2 - 16
bsp/apollo2/board/uart.h

@@ -1,21 +1,7 @@
 /*
- * File      : uart.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 4 - 18
bsp/asm9260t/applications/application.c

@@ -1,25 +1,11 @@
 /*
- * File      : application.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006-2015, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
- * Date           Author		Notes
- * 2011-01-13     weety		 first version
+ * Date           Author        Notes
+ * 2011-01-13     weety      first version
  * 2015-04-27     ArdaFu     Port bsp from at91sam9260 to asm9260t
  */
 

+ 2 - 16
bsp/asm9260t/drivers/board.c

@@ -1,21 +1,7 @@
 /*
- * File      : board.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2009 RT-Thread Develop Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/asm9260t/drivers/board.h

@@ -1,21 +1,7 @@
 /*
- * File      : board.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006, RT-Thread Develop Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/asm9260t/drivers/led.c

@@ -1,21 +1,7 @@
 /*
- * File      : led.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006-2015, RT-Thread Develop Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/asm9260t/drivers/led.h

@@ -1,21 +1,7 @@
 /*
- * File      : led.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 5 - 19
bsp/asm9260t/drivers/usart.c

@@ -1,21 +1,7 @@
 /*
- * File      : usart.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006-2015, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -72,12 +58,12 @@ static rt_err_t asm_usart_configure(struct rt_serial_device *serial,
     RT_ASSERT(serial != RT_NULL);
     RT_ASSERT(cfg != RT_NULL);
     uart = (asm_uart_t *)serial->parent.user_data;
-    
+
     Hw_UartDisable(uart->port);
 
     Hw_UartReset(uart->port);
-    
-    Hw_UartConfig(uart->port, cfg->baud_rate, cfg->data_bits, 
+
+    Hw_UartConfig(uart->port, cfg->baud_rate, cfg->data_bits,
                   cfg->stop_bits, cfg->parity);
 
     Hw_UartEnable(uart->port);

+ 3 - 17
bsp/asm9260t/platform/gpio.c

@@ -1,27 +1,13 @@
 /*
- * File      : interrupt.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
  * 2015-04-14     ArdaFu      first version
  */
- 
+
 #include "asm9260t.h"
 #include "rtthread.h"
 

+ 2 - 16
bsp/asm9260t/platform/gpio.h

@@ -1,21 +1,7 @@
 /*
- * File      : interrupt.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/asm9260t/platform/interrupt.c

@@ -1,21 +1,7 @@
 /*
- * File      : interrupt.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006-2015, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 65 - 79
bsp/asm9260t/platform/interrupt.h

@@ -1,21 +1,7 @@
 /*
- * File      : interrupt.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -29,69 +15,69 @@
 
 
 // IRQ Source
-#define INT_ARM_COMMRX                    0 
-#define INT_ARM_COMMTX                    1 
-#define INT_RTC                           2 
-#define INT_GPIO0                         3 
-#define INT_GPIO1                         4 
-#define INT_GPIO2                         5 
-#define INT_GPIO3                         6 
-#define INT_GPIO4_IIS1                    7 
-#define INT_USB0                          8 
-#define INT_USB1                          9 
-#define INT_USB0_DMA                      10  
-#define INT_USB1_DMA                      11  
-#define INT_MAC                           12  
-#define INT_MAC_PMT                       13  
-#define INT_NAND                          14  
-#define INT_UART0                         15  
-#define INT_UART1                         16  
-#define INT_UART2                         17  
-#define INT_UART3                         18  
-#define INT_UART4                         19  
-#define INT_UART5                         20  
-#define INT_UART6                         21  
-#define INT_UART7                         22  
-#define INT_UART8                         23  
-#define INT_UART9                         24  
-#define INT_I2S0                          25  
-#define INT_I2C0                          26  
-#define INT_I2C1                          27  
-#define INT_CAMIF                         28  
-#define INT_TIMER0                        29  
-#define INT_TIMER1                        30  
-#define INT_TIMER2                        31  
-#define INT_TIMER3                        32  
-#define INT_ADC0                          33  
-#define INT_DAC0                          34  
-#define INT_USB0_RESUME_HOSTDISCONNECT    35    
-#define INT_USB0_VBUSVALID                36    
-#define INT_USB1_RESUME_HOSTDISCONNECT    37    
-#define INT_USB1_VBUSVALID                38    
-#define INT_DMA0_CH0                      39  
-#define INT_DMA0_CH1                      40  
-#define INT_DMA0_CH2                      41  
-#define INT_DMA0_CH3                      42  
-#define INT_DMA0_CH4                      43  
-#define INT_DMA0_CH5                      44  
-#define INT_DMA0_CH6                      45  
-#define INT_DMA0_CH7                      46  
-#define INT_DMA1_CH0                      47  
-#define INT_DMA1_CH1                      48  
-#define INT_DMA1_CH2                      49  
-#define INT_DMA1_CH3                      50  
-#define INT_DMA1_CH4                      51  
-#define INT_DMA1_CH5                      52  
-#define INT_DMA1_CH6                      53  
-#define INT_DMA1_CH7                      54  
-#define INT_WATCHDOG                      55  
-#define INT_CAN0                          56  
-#define INT_CAN1                          57  
-#define INT_QEI                           58  
-#define INT_MCPWM                         59  
-#define INT_SPI0                          60  
-#define INT_SPI1                          61  
-#define INT_QUADSPI0                      62  
+#define INT_ARM_COMMRX                    0
+#define INT_ARM_COMMTX                    1
+#define INT_RTC                           2
+#define INT_GPIO0                         3
+#define INT_GPIO1                         4
+#define INT_GPIO2                         5
+#define INT_GPIO3                         6
+#define INT_GPIO4_IIS1                    7
+#define INT_USB0                          8
+#define INT_USB1                          9
+#define INT_USB0_DMA                      10
+#define INT_USB1_DMA                      11
+#define INT_MAC                           12
+#define INT_MAC_PMT                       13
+#define INT_NAND                          14
+#define INT_UART0                         15
+#define INT_UART1                         16
+#define INT_UART2                         17
+#define INT_UART3                         18
+#define INT_UART4                         19
+#define INT_UART5                         20
+#define INT_UART6                         21
+#define INT_UART7                         22
+#define INT_UART8                         23
+#define INT_UART9                         24
+#define INT_I2S0                          25
+#define INT_I2C0                          26
+#define INT_I2C1                          27
+#define INT_CAMIF                         28
+#define INT_TIMER0                        29
+#define INT_TIMER1                        30
+#define INT_TIMER2                        31
+#define INT_TIMER3                        32
+#define INT_ADC0                          33
+#define INT_DAC0                          34
+#define INT_USB0_RESUME_HOSTDISCONNECT    35
+#define INT_USB0_VBUSVALID                36
+#define INT_USB1_RESUME_HOSTDISCONNECT    37
+#define INT_USB1_VBUSVALID                38
+#define INT_DMA0_CH0                      39
+#define INT_DMA0_CH1                      40
+#define INT_DMA0_CH2                      41
+#define INT_DMA0_CH3                      42
+#define INT_DMA0_CH4                      43
+#define INT_DMA0_CH5                      44
+#define INT_DMA0_CH6                      45
+#define INT_DMA0_CH7                      46
+#define INT_DMA1_CH0                      47
+#define INT_DMA1_CH1                      48
+#define INT_DMA1_CH2                      49
+#define INT_DMA1_CH3                      50
+#define INT_DMA1_CH4                      51
+#define INT_DMA1_CH5                      52
+#define INT_DMA1_CH6                      53
+#define INT_DMA1_CH7                      54
+#define INT_WATCHDOG                      55
+#define INT_CAN0                          56
+#define INT_CAN1                          57
+#define INT_QEI                           58
+#define INT_MCPWM                         59
+#define INT_SPI0                          60
+#define INT_SPI1                          61
+#define INT_QUADSPI0                      62
 #define INT_SSP0                          63
 
 #endif

+ 2 - 16
bsp/asm9260t/platform/reset.c

@@ -1,21 +1,7 @@
 /*
- * File      : reset.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006-2015, RT-Thread Develop Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/asm9260t/platform/rt_low_level_init.c

@@ -1,21 +1,7 @@
 /*
- * File      : rt_low_level_init.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 3 - 17
bsp/asm9260t/platform/rt_low_level_init.h

@@ -1,21 +1,7 @@
 /*
- * File      : rt_low_level_init.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -23,7 +9,7 @@
  */
 #ifndef __RT_LOW_LEVEL_INIT_H__
 #define __RT_LOW_LEVEL_INIT_H__
- 
+
 /*-------- Stack size of CPU modes -------------------------------------------*/
 #define UND_STK_SIZE 512
 #define SVC_STK_SIZE 4096

+ 201 - 215
bsp/asm9260t/platform/system_clock.c

@@ -1,21 +1,7 @@
 /*
- * File      : clock.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -28,269 +14,269 @@
 static rt_list_t clocks;
 
 struct clk {
-	char name[32];
-	rt_uint32_t rate_hz;
-	struct clk *parent;
-	rt_list_t  node;
+    char name[32];
+    rt_uint32_t rate_hz;
+    struct clk *parent;
+    rt_list_t  node;
 };
 
 static struct clk clk32k = {
-	"clk32k",
-	AT91_SLOW_CLOCK,
-	RT_NULL,
-	{RT_NULL, RT_NULL},
+    "clk32k",
+    AT91_SLOW_CLOCK,
+    RT_NULL,
+    {RT_NULL, RT_NULL},
 };
 
 static struct clk main_clk = {
-	"main",
-	0,
-	RT_NULL,
-	{RT_NULL, RT_NULL},
+    "main",
+    0,
+    RT_NULL,
+    {RT_NULL, RT_NULL},
 };
 
 static struct clk plla = {
-	"plla",
-	0,
-	RT_NULL,
-	{RT_NULL, RT_NULL},
+    "plla",
+    0,
+    RT_NULL,
+    {RT_NULL, RT_NULL},
 };
 
 static struct clk mck = {
-	"mck",
-	0,
-	RT_NULL,
-	{RT_NULL, RT_NULL},
+    "mck",
+    0,
+    RT_NULL,
+    {RT_NULL, RT_NULL},
 };
 
 static struct clk uhpck = {
-	"uhpck",
-	0,
-	RT_NULL,
-	{RT_NULL, RT_NULL},
+    "uhpck",
+    0,
+    RT_NULL,
+    {RT_NULL, RT_NULL},
 };
 
 static struct clk pllb = {
-	"pllb",
-	0,
-	&main_clk,
-	{RT_NULL, RT_NULL},
+    "pllb",
+    0,
+    &main_clk,
+    {RT_NULL, RT_NULL},
 };
 
 static struct clk udpck = {
-	"udpck",
-	0,
-	&pllb,
-	{RT_NULL, RT_NULL},
+    "udpck",
+    0,
+    &pllb,
+    {RT_NULL, RT_NULL},
 };
 
 static struct clk *const standard_pmc_clocks[] = {
-	// four primary clocks 
-	&clk32k,
-	&main_clk,
-	&plla,
+    // four primary clocks
+    &clk32k,
+    &main_clk,
+    &plla,
 
-	// MCK 
-	&mck
+    // MCK
+    &mck
 };
 
 // clocks cannot be de-registered no refcounting necessary
 struct clk *clk_get(const char *id)
 {
-	struct clk *clk;
-	rt_list_t *list;
-	
-	for (list = (&clocks)->next; list != &clocks; list = list->next)
-	{
-		clk = (struct clk *)rt_list_entry(list, struct clk, node);
-		if (rt_strcmp(id, clk->name) == 0)
-			return clk;
-	}
-
-	return RT_NULL;
+    struct clk *clk;
+    rt_list_t *list;
+
+    for (list = (&clocks)->next; list != &clocks; list = list->next)
+    {
+        clk = (struct clk *)rt_list_entry(list, struct clk, node);
+        if (rt_strcmp(id, clk->name) == 0)
+            return clk;
+    }
+
+    return RT_NULL;
 }
 
 rt_uint32_t clk_get_rate(struct clk *clk)
 {
-	rt_uint32_t	rate;
-
-	for (;;) {
-		rate = clk->rate_hz;
-		if (rate || !clk->parent)
-			break;
-		clk = clk->parent;
-	}
-	return rate;
+    rt_uint32_t rate;
+
+    for (;;) {
+        rate = clk->rate_hz;
+        if (rate || !clk->parent)
+            break;
+        clk = clk->parent;
+    }
+    return rate;
 }
 
 static rt_uint32_t at91_pll_rate(struct clk *pll, rt_uint32_t freq, rt_uint32_t reg)
 {
-	unsigned mul, div;
+    unsigned mul, div;
 
-	div = reg & 0xff;
-	mul = (reg >> 16) & 0x7ff;
-	if (div && mul) {
-		freq /= div;
-		freq *= mul + 1;
-	} else
-		freq = 0;
+    div = reg & 0xff;
+    mul = (reg >> 16) & 0x7ff;
+    if (div && mul) {
+        freq /= div;
+        freq *= mul + 1;
+    } else
+        freq = 0;
 
-	return freq;
+    return freq;
 }
 
 static unsigned at91_pll_calc(unsigned main_freq, unsigned out_freq)
 {
-	unsigned i, div = 0, mul = 0, diff = 1 << 30;
-	unsigned ret = (out_freq > 155000000) ? 0xbe00 : 0x3e00;
-
-	//PLL output max 240 MHz (or 180 MHz per errata)
-	if (out_freq > 240000000)
-		goto fail;
-
-	for (i = 1; i < 256; i++) {
-		int diff1;
-		unsigned input, mul1;
-
-		//
-		// PLL input between 1MHz and 32MHz per spec, but lower
-		// frequences seem necessary in some cases so allow 100K.
-		// Warning: some newer products need 2MHz min.
-		//
-		input = main_freq / i;
-		if (input < 100000)
-			continue;
-		if (input > 32000000)
-			continue;
-
-		mul1 = out_freq / input;
-		if (mul1 > 2048)
-			continue;
-		if (mul1 < 2)
-			goto fail;
-
-		diff1 = out_freq - input * mul1;
-		if (diff1 < 0)
-			diff1 = -diff1;
-		if (diff > diff1) {
-			diff = diff1;
-			div = i;
-			mul = mul1;
-			if (diff == 0)
-				break;
-		}
-	}
-	if (i == 256 && diff > (out_freq >> 5))
-		goto fail;
-	return ret | ((mul - 1) << 16) | div;
+    unsigned i, div = 0, mul = 0, diff = 1 << 30;
+    unsigned ret = (out_freq > 155000000) ? 0xbe00 : 0x3e00;
+
+    //PLL output max 240 MHz (or 180 MHz per errata)
+    if (out_freq > 240000000)
+        goto fail;
+
+    for (i = 1; i < 256; i++) {
+        int diff1;
+        unsigned input, mul1;
+
+        //
+        // PLL input between 1MHz and 32MHz per spec, but lower
+        // frequences seem necessary in some cases so allow 100K.
+        // Warning: some newer products need 2MHz min.
+        //
+        input = main_freq / i;
+        if (input < 100000)
+            continue;
+        if (input > 32000000)
+            continue;
+
+        mul1 = out_freq / input;
+        if (mul1 > 2048)
+            continue;
+        if (mul1 < 2)
+            goto fail;
+
+        diff1 = out_freq - input * mul1;
+        if (diff1 < 0)
+            diff1 = -diff1;
+        if (diff > diff1) {
+            diff = diff1;
+            div = i;
+            mul = mul1;
+            if (diff == 0)
+                break;
+        }
+    }
+    if (i == 256 && diff > (out_freq >> 5))
+        goto fail;
+    return ret | ((mul - 1) << 16) | div;
 fail:
-	return 0;
+    return 0;
 }
 
 static rt_uint32_t at91_usb_rate(struct clk *pll, rt_uint32_t freq, rt_uint32_t reg)
 {
-	if (pll == &pllb && (reg & AT91_PMC_USB96M))
-		return freq / 2;
-	else
-		return freq;
+    if (pll == &pllb && (reg & AT91_PMC_USB96M))
+        return freq / 2;
+    else
+        return freq;
 }
 
 
 // PLLB generated USB full speed clock init
 static void at91_pllb_usbfs_clock_init(rt_uint32_t main_clock)
 {
-	rt_uint32_t at91_pllb_usb_init;
-	//
-	// USB clock init:  choose 48 MHz PLLB value,
-	// disable 48MHz clock during usb peripheral suspend.
-	//
-	// REVISIT:  assumes MCK doesn't derive from PLLB!
-	//
-	uhpck.parent = &pllb;
-
-	at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) | AT91_PMC_USB96M;
-	pllb.rate_hz = at91_pll_rate(&pllb, main_clock, at91_pllb_usb_init);
-	
-	at91_sys_write(AT91_CKGR_PLLBR, 0);
-
-	udpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init);
-	uhpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init);
+    rt_uint32_t at91_pllb_usb_init;
+    //
+    // USB clock init:  choose 48 MHz PLLB value,
+    // disable 48MHz clock during usb peripheral suspend.
+    //
+    // REVISIT:  assumes MCK doesn't derive from PLLB!
+    //
+    uhpck.parent = &pllb;
+
+    at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) | AT91_PMC_USB96M;
+    pllb.rate_hz = at91_pll_rate(&pllb, main_clock, at91_pllb_usb_init);
+
+    at91_sys_write(AT91_CKGR_PLLBR, 0);
+
+    udpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init);
+    uhpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init);
 }
 
 static struct clk *at91_css_to_clk(unsigned long css)
 {
-	switch (css) {
-		case AT91_PMC_CSS_SLOW:
-			return &clk32k;
-		case AT91_PMC_CSS_MAIN:
-			return &main_clk;
-		case AT91_PMC_CSS_PLLA:
-			return &plla;
-		case AT91_PMC_CSS_PLLB:
-			return &pllb;
-	}
-
-	return RT_NULL;
+    switch (css) {
+        case AT91_PMC_CSS_SLOW:
+            return &clk32k;
+        case AT91_PMC_CSS_MAIN:
+            return &main_clk;
+        case AT91_PMC_CSS_PLLA:
+            return &plla;
+        case AT91_PMC_CSS_PLLB:
+            return &pllb;
+    }
+
+    return RT_NULL;
 }
 
 #define false 0
 #define true  1
 int at91_clock_init(rt_uint32_t main_clock)
 {
-	unsigned tmp, freq, mckr;
-	int i;
-	int pll_overclock = false;
-
-	//
-	// When the bootloader initialized the main oscillator correctly,
-	// there's no problem using the cycle counter.  But if it didn't,
-	// or when using oscillator bypass mode, we must be told the speed
-	 // of the main clock.
-	//
-	if (!main_clock) {
-		do {
-			tmp = at91_sys_read(AT91_CKGR_MCFR);
-		} while (!(tmp & AT91_PMC_MAINRDY));
-		main_clock = (tmp & AT91_PMC_MAINF) * (AT91_SLOW_CLOCK / 16);
-	}
-	main_clk.rate_hz = main_clock;
-
-	// report if PLLA is more than mildly overclocked 
-	plla.rate_hz = at91_pll_rate(&plla, main_clock, at91_sys_read(AT91_CKGR_PLLAR));
-	if (plla.rate_hz > 209000000)
-		pll_overclock = true;
-	if (pll_overclock)
-		;//rt_kprintf("Clocks: PLLA overclocked, %ld MHz\n", plla.rate_hz / 1000000);
-
-	at91_pllb_usbfs_clock_init(main_clock);
-
-	//
-	 // MCK and CPU derive from one of those primary clocks.
-	 // For now, assume this parentage won't change.
-	 //
-	mckr = at91_sys_read(AT91_PMC_MCKR);
-	mck.parent = at91_css_to_clk(mckr & AT91_PMC_CSS);
-	freq = mck.parent->rate_hz;
-	freq /= (1 << ((mckr & AT91_PMC_PRES) >> 2));				// prescale 
-	
-	mck.rate_hz = freq / (1 << ((mckr & AT91_PMC_MDIV) >> 8));      // mdiv 
-
-	// Register the PMC's standard clocks 
-	rt_list_init(&clocks);
-	for (i = 0; i < ARRAY_SIZE(standard_pmc_clocks); i++)
-		rt_list_insert_after(&clocks, &standard_pmc_clocks[i]->node);
-
-	rt_list_insert_after(&clocks, &pllb.node);
-	rt_list_insert_after(&clocks, &uhpck.node);
-	rt_list_insert_after(&clocks, &udpck.node);
-
-	// MCK and CPU clock are "always on" 
-	//clk_enable(&mck);
-
-	//rt_kprintf("Clocks: CPU %u MHz, master %u MHz, main %u.%03u MHz\n",
-	//	freq / 1000000, (unsigned) mck.rate_hz / 1000000,
-	//	(unsigned) main_clock / 1000000,
-	//	((unsigned) main_clock % 1000000) / 1000); //cause blocked
-
-	return 0;
+    unsigned tmp, freq, mckr;
+    int i;
+    int pll_overclock = false;
+
+    //
+    // When the bootloader initialized the main oscillator correctly,
+    // there's no problem using the cycle counter.  But if it didn't,
+    // or when using oscillator bypass mode, we must be told the speed
+     // of the main clock.
+    //
+    if (!main_clock) {
+        do {
+            tmp = at91_sys_read(AT91_CKGR_MCFR);
+        } while (!(tmp & AT91_PMC_MAINRDY));
+        main_clock = (tmp & AT91_PMC_MAINF) * (AT91_SLOW_CLOCK / 16);
+    }
+    main_clk.rate_hz = main_clock;
+
+    // report if PLLA is more than mildly overclocked
+    plla.rate_hz = at91_pll_rate(&plla, main_clock, at91_sys_read(AT91_CKGR_PLLAR));
+    if (plla.rate_hz > 209000000)
+        pll_overclock = true;
+    if (pll_overclock)
+        ;//rt_kprintf("Clocks: PLLA overclocked, %ld MHz\n", plla.rate_hz / 1000000);
+
+    at91_pllb_usbfs_clock_init(main_clock);
+
+    //
+     // MCK and CPU derive from one of those primary clocks.
+     // For now, assume this parentage won't change.
+     //
+    mckr = at91_sys_read(AT91_PMC_MCKR);
+    mck.parent = at91_css_to_clk(mckr & AT91_PMC_CSS);
+    freq = mck.parent->rate_hz;
+    freq /= (1 << ((mckr & AT91_PMC_PRES) >> 2));               // prescale
+
+    mck.rate_hz = freq / (1 << ((mckr & AT91_PMC_MDIV) >> 8));      // mdiv
+
+    // Register the PMC's standard clocks
+    rt_list_init(&clocks);
+    for (i = 0; i < ARRAY_SIZE(standard_pmc_clocks); i++)
+        rt_list_insert_after(&clocks, &standard_pmc_clocks[i]->node);
+
+    rt_list_insert_after(&clocks, &pllb.node);
+    rt_list_insert_after(&clocks, &uhpck.node);
+    rt_list_insert_after(&clocks, &udpck.node);
+
+    // MCK and CPU clock are "always on"
+    //clk_enable(&mck);
+
+    //rt_kprintf("Clocks: CPU %u MHz, master %u MHz, main %u.%03u MHz\n",
+    //  freq / 1000000, (unsigned) mck.rate_hz / 1000000,
+    //  (unsigned) main_clock / 1000000,
+    //  ((unsigned) main_clock % 1000000) / 1000); //cause blocked
+
+    return 0;
 }
 */
 
@@ -298,6 +284,6 @@ int at91_clock_init(rt_uint32_t main_clock)
 
 void rt_hw_clock_init(void)
 {
-	//at91_clock_init(18432000);
+    //at91_clock_init(18432000);
 }
 

+ 2 - 16
bsp/asm9260t/platform/timer0.c

@@ -1,21 +1,7 @@
 /*
- * File      : timer0.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006-2015, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 2 - 16
bsp/asm9260t/platform/timer0.h

@@ -1,21 +1,7 @@
 /*
- * File      : timer0.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006-2015, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes

+ 3 - 17
bsp/asm9260t/platform/uart.c

@@ -1,27 +1,13 @@
 /*
- * File      : interrupt.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
  * 2015-04-14     ArdaFu      first version
  */
- 
+
 #include "asm9260t.h"
 #include "rtthread.h"
 #include "uart.h"

+ 13 - 27
bsp/asm9260t/platform/uart.h

@@ -1,21 +1,7 @@
 /*
- * File      : interrupt.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -50,16 +36,16 @@ typedef struct
     volatile rt_uint32_t ISO7816STATUS[4];
 } HW_USART_TypeDef;
 
-#define USART0	((HW_USART_TypeDef *)UART0_BASE)
-#define USART1	((HW_USART_TypeDef *)UART1_BASE)
-#define USART2	((HW_USART_TypeDef *)UART2_BASE)
-#define USART3	((HW_USART_TypeDef *)UART3_BASE)
-#define USART4	((HW_USART_TypeDef *)UART4_BASE)
-#define USART5	((HW_USART_TypeDef *)UART5_BASE)
-#define USART6	((HW_USART_TypeDef *)UART6_BASE)
-#define USART7	((HW_USART_TypeDef *)UART7_BASE)
-#define USART8	((HW_USART_TypeDef *)UART8_BASE)
-#define USART9	((HW_USART_TypeDef *)UART9_BASE)
+#define USART0  ((HW_USART_TypeDef *)UART0_BASE)
+#define USART1  ((HW_USART_TypeDef *)UART1_BASE)
+#define USART2  ((HW_USART_TypeDef *)UART2_BASE)
+#define USART3  ((HW_USART_TypeDef *)UART3_BASE)
+#define USART4  ((HW_USART_TypeDef *)UART4_BASE)
+#define USART5  ((HW_USART_TypeDef *)UART5_BASE)
+#define USART6  ((HW_USART_TypeDef *)UART6_BASE)
+#define USART7  ((HW_USART_TypeDef *)UART7_BASE)
+#define USART8  ((HW_USART_TypeDef *)UART8_BASE)
+#define USART9  ((HW_USART_TypeDef *)UART9_BASE)
 
 
 #define ASM_UART_INTR_RXIS   (1UL << 4)
@@ -105,7 +91,7 @@ typedef struct
 extern void Hw_UartDisable(HW_USART_TypeDef* uartBase);
 extern void Hw_UartEnable(HW_USART_TypeDef* uartBase);
 extern void Hw_UartReset(HW_USART_TypeDef* uartBase);
-extern void Hw_UartConfig(HW_USART_TypeDef* uartBase, int baudRate, 
+extern void Hw_UartConfig(HW_USART_TypeDef* uartBase, int baudRate,
                           int dataBits, int stopBits, int parity);
 extern void Hw_UartInit(int index);
 #endif

+ 8 - 23
bsp/at32/Libraries/AT32_Std_Driver/AT32F4xx_StdPeriph_Driver/inc/at32f4xx_comp.h

@@ -1,27 +1,12 @@
 /**
-  ******************************************************************************
-  * @file    at32f4xx_comp.h
-  * @author  Artery
-  * @version V1.0.1
-  * @date    20-April-2012
-  * @brief   This file contains all the functions prototypes for the COMP firmware 
-  *          library.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT 2012 Artery</center></h2>
-  *
-  * Licensed under Artery Liberty SW License Agreement V2, (the "License");
-  * You may not use this file except in compliance with the License.
-  *
-  * Unless required by applicable law or agreed to in writing, software 
-  * distributed under the License is distributed on an "AS IS" BASIS, 
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  *
-  ******************************************************************************
-  */
+ **************************************************************************
+ * File Name    : at32f4xx_comp.h
+ * Description  : at32f4xx COMP header file
+ * Date         : 2018-10-08
+ * Version      : V1.0.5
+ **************************************************************************
+ */
+
 
 /* Define to prevent recursive inclusion -------------------------------------*/
 #ifndef __AT32F4XX_COMP_H

+ 0 - 11
bsp/at32/Libraries/AT32_Std_Driver/AT32F4xx_StdPeriph_Driver/inc/misc.h

@@ -1,15 +1,4 @@
 /*
- **************************************************************************
- * Copyright (C) 2016 by ARTERY Technology Co., Ltd. All Rights Reserved.
- **************************************************************************
- * THIS SOURCE FILE IS DISTRIBUTED IN THE HOPE THAT CAN REDUCE EFFORTS AND
- * TIME, BUT WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
  **************************************************************************
  * File Name    : misc.h
  * Description  : at32f4xx MISC header file

+ 7 - 91
bsp/at32/Libraries/AT32_Std_Driver/AT32F4xx_StdPeriph_Driver/src/at32f4xx_comp.c

@@ -1,95 +1,11 @@
 /**
-  ******************************************************************************
-  * @file    at32f4xx_comp.c
-  * @author  Artery
-  * @version V1.0.1
-  * @date    20-April-2012
-  * @brief   This file provides firmware functions to manage the following 
-  *          functionalities of the comparators (COMP1 and COMP2) peripheral: 
-  *           + Comparators configuration
-  *           + Window mode control
-  *
-  *  @verbatim
-  *
- ===============================================================================
-                     ##### How to use this driver #####
- ===============================================================================
-    [..]           
-   
-         The device integrates two analog comparators COMP1 and COMP2:
-         (+) The non inverting input is set to PA1 for COMP1 and to PA3
-             for COMP2.
-  
-         (+) The inverting input can be selected among: DAC_OUT1, 
-             1/4 VREFINT, 1/2 VERFINT, 3/4 VREFINT, VREFINT,
-             I/O (PA0 for COMP1 and PA2 for COMP2)
-  
-         (+) The COMP output is internally is available using COMP_GetOutputState()
-             and can be set on GPIO pins: PA0, PA6, PA11 for COMP1
-             and PA2, PA7, PA12 for COMP2
-  
-         (+) The COMP output can be redirected to embedded timers (TIM1, TIM2
-             and TIM3)
-  
-         (+) The two comparators COMP1 and COMP2 can be combined in window
-             mode and only COMP1 non inverting (PA1) can be used as non-
-             inverting input.
-  
-         (+) The two comparators COMP1 and COMP2 have interrupt capability 
-             with wake-up from Sleep and Stop modes (through the EXTI controller).
-             COMP1 and COMP2 outputs are internally connected to EXTI Line 21
-             and EXTI Line 22 respectively.
-                   
-
-                     ##### How to configure the comparator #####
- ===============================================================================
-    [..] 
-           This driver provides functions to configure and program the Comparators 
-           of all AT32F4xx devices.
-             
-    [..]   To use the comparator, perform the following steps:
-  
-         (#) Enable the SYSCFG APB clock to get write access to comparator
-             register using RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
-  
-         (#) Configure the comparator input in analog mode using GPIO_Init()
-  
-         (#) Configure the comparator output in alternate function mode
-             using GPIO_Init() and use GPIO_PinAFConfig() function to map the
-             comparator output to the GPIO pin
-  
-         (#) Configure the comparator using COMP_Init() function:
-                 (++)  Select the inverting input
-                 (++)  Select the output polarity  
-                 (++)  Select the output redirection
-                 (++)  Select the hysteresis level
-                 (++)  Select the power mode
-    
-         (#) Enable the comparator using COMP_Cmd() function
-  
-         (#) If required enable the COMP interrupt by configuring and enabling
-             EXTI line in Interrupt mode and selecting the desired sensitivity
-             level using EXTI_Init() function. After that enable the comparator
-             interrupt vector using NVIC_Init() function.
-  
-     @endverbatim
-  *    
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT 2012 Artery</center></h2>
-  *
-  * Licensed under Artery Liberty SW License Agreement V2, (the "License");
-  * You may not use this file except in compliance with the License.
-  *
-  * Unless required by applicable law or agreed to in writing, software 
-  * distributed under the License is distributed on an "AS IS" BASIS, 
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  *
-  ******************************************************************************
-  */
+ **************************************************************************
+ * File Name    : at32f4xx_comp.c
+ * Description  : at32f4xx COMP source file
+ * Date         : 2018-02-26
+ * Version      : V1.0.4
+ **************************************************************************
+ */
 
 /* Includes ------------------------------------------------------------------*/
 #include "at32f4xx_comp.h"

+ 0 - 11
bsp/at32/Libraries/AT32_Std_Driver/CMSIS/AT32/AT32F4xx/src/system_at32f4xx.c

@@ -6,17 +6,6 @@
   * @date    2019-05-27
   * @brief   CMSIS Cortex-M4 system source file
   ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, ARTERYTEK SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2018 ArteryTek</center></h2>
-  ******************************************************************************
   */ 
 
 /** @addtogroup CMSIS

+ 11 - 11
bsp/at32/Libraries/rt_drivers/drv_adc.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -17,7 +17,7 @@
 #include <drv_log.h>
 
 struct at32_adc
-{  
+{
     struct rt_adc_device at32_adc_device;
     ADC_Type *ADC_Handler;
     char *name;
@@ -109,9 +109,9 @@ static rt_err_t at32_adc_enabled(struct rt_adc_device *device, rt_uint32_t chann
     ADC_InitType ADC_InitStructure;
     RT_ASSERT(device != RT_NULL);
     at32_adc_handler = device->parent.user_data;
-  
+
     at32_msp_adc_init(at32_adc_handler);
-  
+
     /* ADCx configuration ------------------------------------------------------*/
     ADC_StructInit(&ADC_InitStructure);
     ADC_InitStructure.ADC_Mode              = ADC_Mode_Independent;
@@ -121,14 +121,14 @@ static rt_err_t at32_adc_enabled(struct rt_adc_device *device, rt_uint32_t chann
     ADC_InitStructure.ADC_DataAlign         = ADC_DataAlign_Right;
     ADC_InitStructure.ADC_NumOfChannel      = 1;
     ADC_Init(at32_adc_handler, &ADC_InitStructure);
-  
-    /* ADCx regular channels configuration */ 
-    ADC_RegularChannelConfig(at32_adc_handler, at32_adc_get_channel(channel), 1, ADC_SampleTime_28_5); 
-    
+
+    /* ADCx regular channels configuration */
+    ADC_RegularChannelConfig(at32_adc_handler, at32_adc_get_channel(channel), 1, ADC_SampleTime_28_5);
+
     /* Enable ADCx */
     ADC_Ctrl(at32_adc_handler, ENABLE);
-  
-    /* Enable ADCx reset calibration register */   
+
+    /* Enable ADCx reset calibration register */
     ADC_RstCalibration(at32_adc_handler);
     /* Check the end of ADCx reset calibration register */
     while(ADC_GetResetCalibrationStatus(at32_adc_handler));
@@ -161,7 +161,7 @@ static rt_err_t at32_get_adc_value(struct rt_adc_device *device, rt_uint32_t cha
 
     at32_adc_handler = device->parent.user_data;
 
-    /* Start ADCx Software Conversion */ 
+    /* Start ADCx Software Conversion */
     ADC_SoftwareStartConvCtrl(at32_adc_handler, ENABLE);
 
     /* Wait for the ADC to convert */

+ 10 - 10
bsp/at32/Libraries/rt_drivers/drv_adc.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -19,32 +19,32 @@ extern "C" {
 #endif
 
 #if defined(BSP_USING_ADC1) || defined(BSP_USING_ADC2) || defined(BSP_USING_ADC3)
-  
+
 #ifndef ADC1_CONFIG
 #define ADC1_CONFIG                 \
     {                              \
        .ADC_Handler = ADC1,        \
        .name        = "adc1",      \
-    }  
+    }
 #endif /* ADC1_CONFIG */
-    
+
 #ifndef ADC2_CONFIG
 #define ADC2_CONFIG                \
     {                              \
        .ADC_Handler = ADC2,        \
        .name        = "adc2",      \
-    }  
+    }
 #endif /* ADC2_CONFIG */
-    
+
 #ifndef ADC3_CONFIG
 #define ADC3_CONFIG                \
     {                              \
        .ADC_Handler = ADC3,        \
        .name        = "adc3",      \
-    }  
-#endif /* ADC3_CONFIG */    
-    
-#endif  
+    }
+#endif /* ADC3_CONFIG */
+
+#endif
 
 
 #ifdef __cplusplus

+ 4 - 4
bsp/at32/Libraries/rt_drivers/drv_can.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -311,8 +311,8 @@ static rt_err_t _can_control(struct rt_can_device *can, int cmd, void *arg)
             {
                 can_instance->CanConfig.FilterConfig.CAN_FilterNumber = filter_cfg->items[i].hdr & (0x1fU);
                 can_instance->CanConfig.FilterConfig.CAN_FilterIdHigh = (filter_cfg->items[i].id >> 13) & 0xFFFF;
-                can_instance->CanConfig.FilterConfig.CAN_FilterIdLow = ((filter_cfg->items[i].id << 3) | 
-                                                    (filter_cfg->items[i].ide << 2) | 
+                can_instance->CanConfig.FilterConfig.CAN_FilterIdLow = ((filter_cfg->items[i].id << 3) |
+                                                    (filter_cfg->items[i].ide << 2) |
                                                     (filter_cfg->items[i].rtr << 1)) & 0xFFFF;
                 can_instance->CanConfig.FilterConfig.CAN_FilterMskIdHigh = (filter_cfg->items[i].mask >> 16) & 0xFFFF;
                 can_instance->CanConfig.FilterConfig.CAN_FilterMskIdLow = filter_cfg->items[i].mask & 0xFFFF;
@@ -499,7 +499,7 @@ static int _can_recvmsg(struct rt_can_device *can, void *buf, rt_uint32_t fifo)
     else
         pmsg->ide = RxMessage.ExtId;
     pmsg->rtr = RxMessage.RTR;
-    
+
     return RT_EOK;
 }
 

+ 2 - 2
bsp/at32/Libraries/rt_drivers/drv_can.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -22,7 +22,7 @@ extern "C" {
 #define CAN_TX_MAILBOX0             (0x00000001U)  /*!< Tx Mailbox 0  */
 #define CAN_TX_MAILBOX1             (0x00000002U)  /*!< Tx Mailbox 1  */
 #define CAN_TX_MAILBOX2             (0x00000004U)  /*!< Tx Mailbox 2  */
-  
+
 struct at32_baud_rate_tab
 {
     rt_uint32_t baud_rate;

+ 33 - 33
bsp/at32/Libraries/rt_drivers/drv_eth.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -28,8 +28,8 @@
 //#define DRV_DEBUG
 #define LOG_TAG             "drv.emac"
 
-#define ETH_RXBUFNB        	4
-#define ETH_TXBUFNB        	2
+#define ETH_RXBUFNB         4
+#define ETH_TXBUFNB         2
 
 #define LINK_THREAD_STACK_SIZE   256
 #define LINK_THREAD_PREORITY     21
@@ -131,14 +131,14 @@ void NVIC_Configuration(void)
     NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0);
 
     /* 2 bit for pre-emption priority, 2 bits for subpriority */
-    NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); 
+    NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
 
     /* Enable the Ethernet global Interrupt */
     NVIC_InitStructure.NVIC_IRQChannel = ETH_IRQn;
     NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
     NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
     NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
-    NVIC_Init(&NVIC_InitStructure);  
+    NVIC_Init(&NVIC_InitStructure);
 }
 
 /**
@@ -173,7 +173,7 @@ void GPIO_Configuration(void)
     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
     GPIO_Init(GPIOC, &GPIO_InitStructure);
 
-	/*MII Mode GPIO configuration*/
+    /*MII Mode GPIO configuration*/
 #ifdef MII_MODE
 /**********************MII Tx Pin Define****************************/
     /*
@@ -193,7 +193,7 @@ void GPIO_Configuration(void)
     GPIO_InitStructure.GPIO_MaxSpeed = GPIO_MaxSpeed_50MHz;
     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
     GPIO_Init(GPIOC, &GPIO_InitStructure);
-	/**********************MII Rx Pin Define****************************/
+    /**********************MII Rx Pin Define****************************/
 #if MII_RX_REMAP  /*IO PIN remaped*/
     /*
     ETH_MII_RX_DV-->PD8
@@ -208,7 +208,7 @@ void GPIO_Configuration(void)
     */
     GPIO_InitStructure.GPIO_Pins = GPIO_Pins_8 | GPIO_Pins_9 | GPIO_Pins_10 | GPIO_Pins_11 | GPIO_Pins_12;
     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
-    GPIO_Init(GPIOD, &GPIO_InitStructure); 
+    GPIO_Init(GPIOD, &GPIO_InitStructure);
 
     GPIO_InitStructure.GPIO_Pins = GPIO_Pins_0 | GPIO_Pins_1 | GPIO_Pins_3;
     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
@@ -233,11 +233,11 @@ void GPIO_Configuration(void)
     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
     GPIO_Init(GPIOA, &GPIO_InitStructure);
 
-    GPIO_InitStructure.GPIO_Pins = GPIO_Pins_4 | GPIO_Pins_5;   
+    GPIO_InitStructure.GPIO_Pins = GPIO_Pins_4 | GPIO_Pins_5;
     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
     GPIO_Init(GPIOC, &GPIO_InitStructure);
 
-    GPIO_InitStructure.GPIO_Pins = GPIO_Pins_0 | GPIO_Pins_1 | GPIO_Pins_10;  
+    GPIO_InitStructure.GPIO_Pins = GPIO_Pins_0 | GPIO_Pins_1 | GPIO_Pins_10;
     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
     GPIO_Init(GPIOB, &GPIO_InitStructure);
 
@@ -255,8 +255,8 @@ void GPIO_Configuration(void)
     GPIO_InitStructure.GPIO_MaxSpeed = GPIO_MaxSpeed_50MHz;
     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
     GPIO_Init(GPIOB, &GPIO_InitStructure);
-	
-	/**********************RMII Rx Pin Define****************************/
+
+    /**********************RMII Rx Pin Define****************************/
 #if MII_RX_REMAP  /*IO PIN remaped*/
     /*
     ETH_RMII_RX_DV-->PD8
@@ -266,7 +266,7 @@ void GPIO_Configuration(void)
     */
     GPIO_InitStructure.GPIO_Pins = GPIO_Pins_8 | GPIO_Pins_9 | GPIO_Pins_10;
     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
-    GPIO_Init(GPIOD, &GPIO_InitStructure); 
+    GPIO_Init(GPIOD, &GPIO_InitStructure);
 
     GPIO_InitStructure.GPIO_Pins =  GPIO_Pins_1;
     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
@@ -282,7 +282,7 @@ void GPIO_Configuration(void)
     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
     GPIO_Init(GPIOA, &GPIO_InitStructure);
 
-    GPIO_InitStructure.GPIO_Pins = GPIO_Pins_4 | GPIO_Pins_5;   
+    GPIO_InitStructure.GPIO_Pins = GPIO_Pins_4 | GPIO_Pins_5;
     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
     GPIO_Init(GPIOC, &GPIO_InitStructure);
 
@@ -314,7 +314,7 @@ static rt_err_t rt_at32_eth_init(rt_device_t dev)
 
     RCC_AHBPeriphClockCmd(RCC_AHBPERIPH_ETHMAC | RCC_AHBPERIPH_ETHMACTX |
                           RCC_AHBPERIPH_ETHMACRX, ENABLE);
-    
+
     /* MII/RMII Media interface selection ------------------------------------------*/
 #ifdef MII_MODE /* Mode MII with AT32F407-EVAL  */
     GPIO_ETH_MediaInterfaceConfig(GPIO_ETH_MediaInterface_MII);
@@ -361,31 +361,31 @@ static rt_err_t rt_at32_eth_init(rt_device_t dev)
     ETH_InitStructure.ETH_ChecksumOffload = ETH_ChecksumOffload_Enable;
 #endif
 
-    /*------------------------   DMA   -----------------------------------*/  
+    /*------------------------   DMA   -----------------------------------*/
 
-    /* When we use the Checksum offload feature, we need to enable the Store and Forward mode: 
-    the store and forward guarantee that a whole frame is stored in the FIFO, so the MAC can insert/verify the checksum, 
+    /* When we use the Checksum offload feature, we need to enable the Store and Forward mode:
+    the store and forward guarantee that a whole frame is stored in the FIFO, so the MAC can insert/verify the checksum,
     if the checksum is OK the DMA can handle the frame otherwise the frame is dropped */
-    ETH_InitStructure.ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Enable;//ETH_DropTCPIPChecksumErrorFrame_Enable; 
-    ETH_InitStructure.ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable;         
-    ETH_InitStructure.ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable;     
-
-    ETH_InitStructure.ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable;       
-    ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable;   
-    ETH_InitStructure.ETH_SecondFrameOperate = ETH_SecondFrameOperate_Enable;                                                          
-    ETH_InitStructure.ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable;      
-    ETH_InitStructure.ETH_FixedBurst = ETH_FixedBurst_Enable;                
-    ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat;          
-    ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat;                                                                 
+    ETH_InitStructure.ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Enable;//ETH_DropTCPIPChecksumErrorFrame_Enable;
+    ETH_InitStructure.ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable;
+    ETH_InitStructure.ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable;
+
+    ETH_InitStructure.ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable;
+    ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable;
+    ETH_InitStructure.ETH_SecondFrameOperate = ETH_SecondFrameOperate_Enable;
+    ETH_InitStructure.ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable;
+    ETH_InitStructure.ETH_FixedBurst = ETH_FixedBurst_Enable;
+    ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat;
+    ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat;
     ETH_InitStructure.ETH_DMAArbitration = ETH_DMAArbitration_RoundRobin_RxTx_2_1;
 
     /* Configure Ethernet, check error */
     if(ETH_Init(&ETH_InitStructure, PHY_ADDRESS) == ((uint32_t)0)) {
         return RT_ERROR;
-    }    
+    }
 
     /* Enable DMA Receive interrupt (need to enable in this case Normal interrupt) */
-    ETH_DMAITConfig(ETH_DMA_INT_NIS | ETH_DMA_INT_R, ENABLE);  
+    ETH_DMAITConfig(ETH_DMA_INT_NIS | ETH_DMA_INT_R, ENABLE);
 
     /* Initialize Tx Descriptors list: Chain Mode */
     ETH_DMATxDescChainInit(DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB);
@@ -396,7 +396,7 @@ static rt_err_t rt_at32_eth_init(rt_device_t dev)
     ETH_MACAddressConfig(ETH_MAC_Address0, (u8*)&at32_eth_device.dev_addr[0]);
 
     /* Enable ETH transmition and recetion */
-    ETH_Start();    
+    ETH_Start();
 
     return RT_EOK;
 }
@@ -581,7 +581,7 @@ struct pbuf *rt_at32_eth_rx(rt_device_t dev)
             {
                 rt_uint32_t i;
                 rt_uint8_t *ptr = (rt_uint8_t*)(DMARxDescToGet->Buffer1Addr);
-                
+
                 AT32_ETH_PRINTF("rx_dump, len:%d\r\n", p->tot_len);
                 for(i=0; i<p->tot_len; i++)
                 {

Некоторые файлы не были показаны из-за большого количества измененных файлов