diff --git a/applications/app/BUILD.gn b/applications/app/BUILD.gn index a393944131e185060d73e9fba31197fdae24469a..6625758e7da78047ecf0a63b95f8cbff3634f9bd 100644 --- a/applications/app/BUILD.gn +++ b/applications/app/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Talkweb Co.,ltd. +# Copyright (c) 2021 Talkweb Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/applications/app/TW001_OS_helloworld/BUILD.gn b/applications/app/TW001_OS_helloworld/BUILD.gn index 28d6cec77a453ac05e8cd5116dc8b4906b2902b2..6ce74a81e163d26448df4d0e94538a106e8c4cca 100644 --- a/applications/app/TW001_OS_helloworld/BUILD.gn +++ b/applications/app/TW001_OS_helloworld/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Talkweb Co.,ltd. +# Copyright (c) 2021 Talkweb Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/applications/app/TW002_OS_thread/BUILD.gn b/applications/app/TW002_OS_thread/BUILD.gn index 9b6e8ef3456476599439ae2419f5f14925e0854f..1f33d6158bdd9888f77cb8dadfa4e8c9e2fd14c5 100644 --- a/applications/app/TW002_OS_thread/BUILD.gn +++ b/applications/app/TW002_OS_thread/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Talkweb Co.,ltd. +# Copyright (c) 2021 Talkweb Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/applications/app/TW003_OS_timer/BUILD.gn b/applications/app/TW003_OS_timer/BUILD.gn index 33d5236ad807fc744614fea5a98549322edcd107..36760174b333c787e7a60a018e80739a7d4b3519 100644 --- a/applications/app/TW003_OS_timer/BUILD.gn +++ b/applications/app/TW003_OS_timer/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Talkweb Co.,ltd. +# Copyright (c) 2021 Talkweb Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/applications/app/TW004_OS_event/BUILD.gn b/applications/app/TW004_OS_event/BUILD.gn index a3046e15d1e2a4afb60794ee8ba24e224a3b0a7d..276b91c6655707ca2196435d1faaf9eb835ee179 100644 --- a/applications/app/TW004_OS_event/BUILD.gn +++ b/applications/app/TW004_OS_event/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Talkweb Co.,ltd. +# Copyright (c) 2021 Talkweb Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/applications/app/TW005_OS_mutex/BUILD.gn b/applications/app/TW005_OS_mutex/BUILD.gn index ee3d2c9a5911047b3ad97eb51b6a0c8f97c045d4..a295d0b92eec71fd9ab2e4165274588ac52fb496 100644 --- a/applications/app/TW005_OS_mutex/BUILD.gn +++ b/applications/app/TW005_OS_mutex/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Talkweb Co.,ltd. +# Copyright (c) 2021 Talkweb Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/applications/app/TW006_OS_semp/BUILD.gn b/applications/app/TW006_OS_semp/BUILD.gn index 3263bcb004dc8ce5b6a5b8e7401ac03da7566a8b..7d31320529e75abddcb0cc6aaf95870367e101ba 100644 --- a/applications/app/TW006_OS_semp/BUILD.gn +++ b/applications/app/TW006_OS_semp/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Talkweb Co.,ltd. +# Copyright (c) 2021 Talkweb Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/applications/app/TW007_OS_message/BUILD.gn b/applications/app/TW007_OS_message/BUILD.gn index 8d19c159e498b2aa76c557ae2f0d827fdad60748..5a6805aa7134520217c5e0b855c13936082d07c3 100644 --- a/applications/app/TW007_OS_message/BUILD.gn +++ b/applications/app/TW007_OS_message/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Talkweb Co.,ltd. +# Copyright (c) 2021 Talkweb Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/applications/app/TW202_Module_traffic_light/BUILD.gn b/applications/app/TW202_Module_traffic_light/BUILD.gn index 9358c88f329c57aabf15c8a253d94f3cd38c1e9d..1b3579076cef2403dd43d5d46f4afa71a2dbde6c 100755 --- a/applications/app/TW202_Module_traffic_light/BUILD.gn +++ b/applications/app/TW202_Module_traffic_light/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Talkweb Co.,ltd. +# Copyright (c) 2021 Talkweb Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/applications/app/TW202_Module_traffic_light/traffic_light_example.c b/applications/app/TW202_Module_traffic_light/traffic_light_example.c index a100e409c6d8e2df1d37c6fbb569482ed16965c6..153dfc13f656e0ec3326f322d22532de7cfa6fec 100755 --- a/applications/app/TW202_Module_traffic_light/traffic_light_example.c +++ b/applications/app/TW202_Module_traffic_light/traffic_light_example.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW204_Module_enviroment/BUILD.gn b/applications/app/TW204_Module_enviroment/BUILD.gn index 676ad67a4b49d3b8e1267b7bb4b3e0a89de58b3e..2ce6bcd59f4df292828b13b58b13bf054ac2988b 100644 --- a/applications/app/TW204_Module_enviroment/BUILD.gn +++ b/applications/app/TW204_Module_enviroment/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Talkweb Co.,ltd. +# Copyright (c) 2021 Talkweb Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/applications/app/TW204_Module_enviroment/CGsensor.c b/applications/app/TW204_Module_enviroment/CGsensor.c index 4ad885f7a019aed4b50b51b0d6f36728ee25b5bb..f2aa17b867c572406efbe5e60c573b2f5524472e 100644 --- a/applications/app/TW204_Module_enviroment/CGsensor.c +++ b/applications/app/TW204_Module_enviroment/CGsensor.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW204_Module_enviroment/THsensor.c b/applications/app/TW204_Module_enviroment/THsensor.c index c64a407f5f7f07259e83c45e332200b57a9b0b9c..c0785ba68e1d432167f57d33628067d6de2e4ef4 100644 --- a/applications/app/TW204_Module_enviroment/THsensor.c +++ b/applications/app/TW204_Module_enviroment/THsensor.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW204_Module_enviroment/buzze.c b/applications/app/TW204_Module_enviroment/buzze.c index db73eb789bf5d46959565fbaa7dda42d1eaac67a..98c30ece9dba0e3b77b747b6392d0fbfab5ca894 100644 --- a/applications/app/TW204_Module_enviroment/buzze.c +++ b/applications/app/TW204_Module_enviroment/buzze.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW204_Module_enviroment/buzze.h b/applications/app/TW204_Module_enviroment/buzze.h index b927f77c3dfc012fd55d0856ff4f974fc1d17fb1..56a2c7d340200f6d31c632c2e5cf9c19efaa7796 100644 --- a/applications/app/TW204_Module_enviroment/buzze.h +++ b/applications/app/TW204_Module_enviroment/buzze.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW204_Module_enviroment/sensor.h b/applications/app/TW204_Module_enviroment/sensor.h index 359e9eaa5bac475fbaabbbe33e1777ba40006b9e..c035590d8b956230ac079a5af37cd34c5122794c 100644 --- a/applications/app/TW204_Module_enviroment/sensor.h +++ b/applications/app/TW204_Module_enviroment/sensor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW205_Module_motor/BUILD.gn b/applications/app/TW205_Module_motor/BUILD.gn index 21a2694a10a09c800a513b38e112fe0acc90954d..92e9c3df4db11bfce552c02cfdf793ca4a779a38 100644 --- a/applications/app/TW205_Module_motor/BUILD.gn +++ b/applications/app/TW205_Module_motor/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Talkweb Co.,ltd. +# Copyright (c) 2021 Talkweb Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/applications/app/TW205_Module_motor/include/motor.h b/applications/app/TW205_Module_motor/include/motor.h index be08f8f3cf78011c2e9a8629bd13f449c22220ce..14ce1caac755137fc0db2c4e1f493e56c1609d62 100644 --- a/applications/app/TW205_Module_motor/include/motor.h +++ b/applications/app/TW205_Module_motor/include/motor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW205_Module_motor/motor_example.c b/applications/app/TW205_Module_motor/motor_example.c index 802ec8b99a1944536a6e2f528b9c47592961eb70..cb56fb619e3d3a74560570b7e62e5d102da6a541 100644 --- a/applications/app/TW205_Module_motor/motor_example.c +++ b/applications/app/TW205_Module_motor/motor_example.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW205_Module_motor/src/motor.c b/applications/app/TW205_Module_motor/src/motor.c index ce61099f7e31736ef4ab26058f2dd0a180edc586..8e774764143c58e749d46ae221a7ef9fd8526433 100644 --- a/applications/app/TW205_Module_motor/src/motor.c +++ b/applications/app/TW205_Module_motor/src/motor.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW207_Module_gyro/BUILD.gn b/applications/app/TW207_Module_gyro/BUILD.gn index fcfa57031a39ed1b696e704aa9f52a587f97d757..1e7a223ed7d96eab4bc5ebe54ef4453b78eae8e9 100755 --- a/applications/app/TW207_Module_gyro/BUILD.gn +++ b/applications/app/TW207_Module_gyro/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Talkweb Co.,ltd. +# Copyright (c) 2021 Talkweb Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/applications/app/TW207_Module_gyro/gyro_example.c b/applications/app/TW207_Module_gyro/gyro_example.c index 55d4f2f9615c55a58143ef36cbbbe0a7d97e1632..ac69a7c8ba2c59201d9d73e5422a37440c4fcdaf 100755 --- a/applications/app/TW207_Module_gyro/gyro_example.c +++ b/applications/app/TW207_Module_gyro/gyro_example.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.ltd. + * Copyright (c) 2021 Talkweb Co. Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -53,7 +53,7 @@ static void GryoExampleTask(void) } else { - printf("MPU6050 ReadAcc Gyro_Data.Accel[0] ==%d\t Gyro_Data.Accel[1] ==%d\t Gyro_Data.Accel[2] ==%d\n",Gyro_Data.Accel[0],Gyro_Data.Accel[1],Gyro_Data.Accel[2]); + printf("MPU6050 ReadAcc Gyro_Data.Accel[0] ==%d\t Gyro_Data.Accel[1] ==%d\t Gyro_Data.Accel[2] ==%d\n", Gyro_Data.Accel[0], Gyro_Data.Accel[1], Gyro_Data.Accel[2]); if (X + 100 < Gyro_Data.Accel[0] || X - 100 > Gyro_Data.Accel[0] || Y + 100 < Gyro_Data.Accel[1] || Y - 100 > Gyro_Data.Accel[1] || Z + 100 < Gyro_Data.Accel[2] || Z - 100 > Gyro_Data.Accel[2]) { printf("\r\n*******************led1 off led2 on******************\r\n"); @@ -69,7 +69,7 @@ static void GryoExampleTask(void) X = (int)Gyro_Data.Accel[0]; Y = (int)Gyro_Data.Accel[1]; Z = (int)Gyro_Data.Accel[2]; - printf("MPU6050 ReadAcc X ==%d\t Y ==%d\t Z ==%d\n",X,Y,Z); + printf("MPU6050 ReadAcc X ==%d\t Y ==%d\t Z ==%d\n", X, Y, Z); } usleep(1000000); } @@ -94,4 +94,3 @@ static void GyroExampleEntry(void) } APP_FEATURE_INIT(GyroExampleEntry); - diff --git a/applications/app/TW207_Module_gyro/include/gyro.h b/applications/app/TW207_Module_gyro/include/gyro.h index 2ab4bcb90814c5285ccdbf8b0044e11884260021..1c26d2e09bf309582a0d0c740f37cd14b98ca1dd 100755 --- a/applications/app/TW207_Module_gyro/include/gyro.h +++ b/applications/app/TW207_Module_gyro/include/gyro.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW207_Module_gyro/src/gyro.c b/applications/app/TW207_Module_gyro/src/gyro.c index d3af7d69ad69f001e4442e45b9cd465d31a33b91..c88972a4b6f4042b59d34aa7a41dc4516551a2bc 100755 --- a/applications/app/TW207_Module_gyro/src/gyro.c +++ b/applications/app/TW207_Module_gyro/src/gyro.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.ltd. + * Copyright (c) 2021 Talkweb Co. Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW301_Network_wifista/wifi_connect_demo.c b/applications/app/TW301_Network_wifista/wifi_connect_demo.c index e7ed523ae052adc8a67af5a6739a24c2cbe9b9da..96e08dbf1810560c7d48edfd4f094fb9a0f9a1d2 100644 --- a/applications/app/TW301_Network_wifista/wifi_connect_demo.c +++ b/applications/app/TW301_Network_wifista/wifi_connect_demo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW301_Network_wifista/wifi_connect_demo.h b/applications/app/TW301_Network_wifista/wifi_connect_demo.h index c5ea21fd26f5d0385717c4547970de947c312aaf..6536db776ad7888ef94f5884943a06cb4ed0b266 100644 --- a/applications/app/TW301_Network_wifista/wifi_connect_demo.h +++ b/applications/app/TW301_Network_wifista/wifi_connect_demo.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW302_Network_wifiap/wifi_ap_example.c b/applications/app/TW302_Network_wifiap/wifi_ap_example.c index 950fb38b70c0ff3705b7b0758cc029bd16206d5f..3cf8a01105dedaad38d97819f7b9cea7d7577b82 100644 --- a/applications/app/TW302_Network_wifiap/wifi_ap_example.c +++ b/applications/app/TW302_Network_wifiap/wifi_ap_example.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW302_Network_wifiap/wifi_ap_service.c b/applications/app/TW302_Network_wifiap/wifi_ap_service.c index 88107f54e00f3dc49097d1ab8c3d1a87b7df24cd..f1c1a922ebdd7e094768e3328f764152441abc5d 100644 --- a/applications/app/TW302_Network_wifiap/wifi_ap_service.c +++ b/applications/app/TW302_Network_wifiap/wifi_ap_service.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW302_Network_wifiap/wifi_ap_service.h b/applications/app/TW302_Network_wifiap/wifi_ap_service.h index a38dd2c4fea6c2bd6c89c1b5f2a4ac0c1b1726c9..a4a46e17144ed465c9f5737f6ec9009944f7e38b 100644 --- a/applications/app/TW302_Network_wifiap/wifi_ap_service.h +++ b/applications/app/TW302_Network_wifiap/wifi_ap_service.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW303_Network_mqttclient/BUILD.gn b/applications/app/TW303_Network_mqttclient/BUILD.gn index 05592b62e4308e3213193d131da4cf34304621a5..5d8870460f905221cf7a171515f7630e94d894d5 100644 --- a/applications/app/TW303_Network_mqttclient/BUILD.gn +++ b/applications/app/TW303_Network_mqttclient/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Talkweb Co.,ltd. +# Copyright (c) 2021 Talkweb Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/applications/app/TW303_Network_mqttclient/include/wifi_connect.h b/applications/app/TW303_Network_mqttclient/include/wifi_connect.h index da4da62b9e44169c57c367cbd7d966a0c72fc82c..c6bb2b6d2fd27b68327ad7105404f0ae89fafed6 100644 --- a/applications/app/TW303_Network_mqttclient/include/wifi_connect.h +++ b/applications/app/TW303_Network_mqttclient/include/wifi_connect.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2021 Talkweb Co.,ltd. +* Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW303_Network_mqttclient/src/wifi_connect.c b/applications/app/TW303_Network_mqttclient/src/wifi_connect.c index 3862415c2d8a47dd3612dadadb0c1790f4af37ab..59cb951965a1e917bcb55fa395ef3bbbd8ade5e2 100644 --- a/applications/app/TW303_Network_mqttclient/src/wifi_connect.c +++ b/applications/app/TW303_Network_mqttclient/src/wifi_connect.c @@ -1,12 +1,25 @@ +/* +* Copyright (c) 2021 Talkweb Co., Ltd. +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* 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. +*/ + #include #include #include -// #include "hiview_log.h" #include "ohos_init.h" #include "cmsis_os2.h" - #include "lwip/netif.h" #include "lwip/netifapi.h" #include "lwip/ip4_addr.h" @@ -14,7 +27,6 @@ #include "wifi_device.h" - #define DEF_TIMEOUT 15 #define ONE_SECOND 1 @@ -33,9 +45,8 @@ WifiEvent g_wifiEventHandler = {0}; int sock_fd; int addr_length; -#define STD_TIMEZONE_OFFSET +8 /* 设置中国 */ -const int timeZone = 8; - +#define STD_TIMEZONE_OFFSET +8 /* 设置中国 */ +const int timeZone = 8; static void WiFiInit(void); static void WaitSacnResult(void); @@ -154,14 +165,13 @@ int WifiConnect(const char *ssid, const char *psk) } printf("********************\r\n"); - //插件指定的wifi是否存在 - for(uint8_t i = 0; i < ssid_count; i++) + for (uint8_t i = 0; i < ssid_count; i++) { if (strcmp(ssid, wifi_info[i].ssid) == 0) { int result; - printf("Select:%3d wireless, Waiting...\r\n", i+1); + printf("Select:%3d wireless, Waiting...\r\n", i + 1); //拷贝要连接的热点信息 strcpy(select_ap_config.ssid, wifi_info[i].ssid); strcpy(select_ap_config.preSharedKey, psk); @@ -178,27 +188,25 @@ int WifiConnect(const char *ssid, const char *psk) } } - if(i == ssid_count-1) + if (i == ssid_count - 1) { printf("ERROR: No wifi as expected\r\n"); - while(1) osDelay(100); + while (1) + osDelay(100); } } - - - //启动DHCP + //启动DHCP if (g_lwip_netif) { dhcp_start(g_lwip_netif); printf("begain to dhcp"); } - //等待DHCP - for(;;) + for (;;) { - if(dhcp_is_bound(g_lwip_netif) == ERR_OK) + if (dhcp_is_bound(g_lwip_netif) == ERR_OK) { printf("<-- DHCP state:OK -->\r\n"); @@ -212,10 +220,11 @@ int WifiConnect(const char *ssid, const char *psk) } osDelay(100); - if (wifi_info != NULL) { + if (wifi_info != NULL) + { free(wifi_info); - wifi_info = NULL; - } + wifi_info = NULL; + } return 0; } @@ -275,4 +284,3 @@ static void WaitSacnResult(void) printf("WaitSacnResult:timeout!\n"); } } - diff --git a/applications/app/TW402_APP_oled_u8g2/BUILD.gn b/applications/app/TW402_APP_oled_u8g2/BUILD.gn index cdda17ff713998956970fdf1ed50e8ea2cee65a5..3a4ca2bd0995c26050fe60c1db8df41a31c5e763 100644 --- a/applications/app/TW402_APP_oled_u8g2/BUILD.gn +++ b/applications/app/TW402_APP_oled_u8g2/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Talkweb Co.,ltd. +# Copyright (c) 2021 Talkweb Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/applications/app/TW402_APP_oled_u8g2/include/boot_animation.h b/applications/app/TW402_APP_oled_u8g2/include/boot_animation.h index 6ff3096fc58b89b21d84989b0527610c629db4b1..28dd14db00f41c103060c819aca7bd84138d63c2 100644 --- a/applications/app/TW402_APP_oled_u8g2/include/boot_animation.h +++ b/applications/app/TW402_APP_oled_u8g2/include/boot_animation.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW402_APP_oled_u8g2/include/oled_u8g2.h b/applications/app/TW402_APP_oled_u8g2/include/oled_u8g2.h index 6e19e42062e0491e9ea8802c8f1e1e7910fcf735..dff1a89675d638ed97a35823b549c8e7c0d2087f 100644 --- a/applications/app/TW402_APP_oled_u8g2/include/oled_u8g2.h +++ b/applications/app/TW402_APP_oled_u8g2/include/oled_u8g2.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW402_APP_oled_u8g2/oled_u8g2_example.c b/applications/app/TW402_APP_oled_u8g2/oled_u8g2_example.c index a29c0e44c20165a2e39177a14be5bfb716822e5f..9b7cae1a179953eec1c77df71c1343f67161ab62 100644 --- a/applications/app/TW402_APP_oled_u8g2/oled_u8g2_example.c +++ b/applications/app/TW402_APP_oled_u8g2/oled_u8g2_example.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/applications/app/TW402_APP_oled_u8g2/src/oled_u8g2.c b/applications/app/TW402_APP_oled_u8g2/src/oled_u8g2.c index 19e8b0eb306b09e51248c47860e7c4992712f5a5..23f3182eb5e74a3a2fff74d32c00c3b2159e1343 100644 --- a/applications/app/TW402_APP_oled_u8g2/src/oled_u8g2.c +++ b/applications/app/TW402_APP_oled_u8g2/src/oled_u8g2.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Talkweb Co.,ltd. + * Copyright (c) 2021 Talkweb Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at