Selaa lähdekoodia

【完善】micropython 示例程序

SummerGift 6 vuotta sitten
vanhempi
sitoutus
fcbb5e5600

+ 9 - 9
examples/basic/_thread.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 import _thread
 import utime as time

+ 9 - 9
examples/basic/array.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 import array
 

+ 9 - 9
examples/basic/random.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 import random
 

+ 9 - 9
examples/basic/rtthread.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 import rtthread
 

+ 9 - 9
examples/basic/sys.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 import sys
 

+ 9 - 9
examples/basic/ucollections.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 from ucollections import namedtuple
 

+ 9 - 9
examples/basic/uos.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 import uos
 

+ 9 - 9
examples/basic/utime.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 import utime
 

+ 9 - 9
examples/network/network_wlan_ap.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 import network
 

+ 9 - 9
examples/network/network_wlan_sta.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 import network
 

+ 9 - 9
examples/network/tcp_client.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 import usocket
 

+ 9 - 9
examples/network/tcp_server.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 import usocket
 

+ 9 - 9
examples/w601_iot_board/adc.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 from machine import ADC     # 从 machine 导入 ADC 类
 

+ 9 - 9
examples/w601_iot_board/i2c.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 from machine import Pin, I2C
 

+ 9 - 9
examples/w601_iot_board/lcd.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 from machine import LCD     # 从 machine 导入 LCD 类
 

+ 9 - 9
examples/w601_iot_board/pin.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 from machine import Pin
 

+ 9 - 9
examples/w601_iot_board/pwm.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 from machine import PWM     # 从 machine 导入 PWM 类
 

+ 9 - 9
examples/w601_iot_board/rtc.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 from machine import RTC
 

+ 9 - 9
examples/w601_iot_board/spi.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 from machine import Pin, SPI
 

+ 9 - 9
examples/w601_iot_board/uart.py

@@ -1,12 +1,12 @@
-/*
- * Copyright (c) 2006-2019, RT-Thread Development Team
- *
- * SPDX-License-Identifier: MIT License
- *
- * Change Logs:
- * Date           Author       Notes
- * 2019-06-13     SummerGift   first version
- */
+# 
+# Copyright (c) 2006-2019, RT-Thread Development Team
+# 
+# SPDX-License-Identifier: MIT License
+# 
+# Change Logs:
+# Date           Author       Notes
+# 2019-06-13     SummerGift   first version
+#
 
 from machine import UART