Compare commits

...

221 Commits

Author SHA1 Message Date
chunyexixiaoyu 3a4c019f2b 更新驱动 3 months ago
chunyexixiaoyu 858594e5b2 修改 LCD 屏幕驱动 增加像素点上面显示字符串 9 months ago
chunyexixiaoyu 388f897989 这个值可能更好 9 months ago
chunyexixiaoyu 7cbfa2a44b #define BSP_LCD_CLK_FREQ 6000000 屏幕spi 频率得以匹配 9 months ago
chunyexixiaoyu 37e5643861 口罩识别样例 按照螺丝双螺母的情况仿照编写 9 months ago
xuedongliang aa27dea6e9 update knowing framework and ov2640 dirver from Tian_Chunyu 10 months ago
xuedongliang dc811358fe move readme.md to nuttx path and fix bug for HCHO_TB600B_WQ_HCHO1OS 10 months ago
xuedongliang b927abfd64 feat support lcd driver for aiit-arm32-board 10 months ago
chunyexixiaoyu 8fc1462141 Ubiquitous/RT_Thread/: eliminate the Kconfig warning in ov2640 driver 10 months ago
wgzAIIT 7df26b9ce3 move readme.md to nuttx path and fix bug for HCHO_TB600B_WQ_HCHO1OS 10 months ago
chunyexixiaoyu 600d615765 Ubiquitous/RT_Thread/:update stm32f407 lcd driver, support show string. 10 months ago
Liu_Weichao 63ec04cf6e fix xiuos/transform.h code standard problem 11 months ago
chunyexixiaoyu bf17ef10cb APP_Framework/Applications/: make mnist application running on the stm32f407 board,model data is saved in the flash,note the following points 11 months ago
Liu_Weichao 3a84b9942b fix lcd display error 11 months ago
Liu_Weichao 2c12cac790 Merge branch 'prepare_for_master' of https://git.trustie.net/xuos/xiuos into aiit_arm_drivers 11 months ago
xuedongliang d5ff9259a0 resubmit the lvgl code 11 months ago
Wang_Weigen 65a3861ea7 resubmit the lvgl code 11 months ago
chunyexixiaoyu 0dee89982a Ubiquitous/RT_Thread/:update the ov2640 driver 11 months ago
chunyexixiaoyu 1c5047f47a Ubiquitous/RT_Thread/:change the default orientation of the MCU-ATK screen 11 months ago
Liu_Weichao 9223e8214e Merge branch 'prepare_for_master' of https://git.trustie.net/xuos/xiuos into aiit_arm_drivers 11 months ago
xuedongliang a5066f8a36 1、add lvgl for xiuos;2、add semc and extern sram test for ok-1052;3、add fpu status set 11 months ago
Wang_Weigen bc1d8f574b sync upstream 11 months ago
Liu_Weichao 546edab7f0 feat support lcd driver for aiit-arm32-board 11 months ago
xuedongliang 27657d6219 fixed opcua demo bug and show mac address 11 months ago
xuedongliang 0172522463 1、add ADC driver for aiit-arm32-board,but there is no extra IO for adc analog input; 2、add ADC driver for stm32f407-st-discovery board 11 months ago
Liu_Weichao 109ad93e9e feat support DMA for aiit-arm32-board and stm32f407-st-discovery uart function 11 months ago
Wang_Weigen d56a5315dd modify the extern sram size as 32MBytes 11 months ago
wlyu 169c3c3c5d fixed socket bug and optimize with lwip flag and other codes 11 months ago
Wang_Weigen c88dc282fc add semc and extern sram test for ok-1052 11 months ago
chunyexixiaoyu bc87a72f5d Ubiquitous/RT_Thread/:add LCD driver in stm32f407_core borad,and find a bug that the FSMC_NE4 gpio had been not configured. 11 months ago
wlyu c0de7ca44c fixed the bug of lwip IRQ and optimize TCP and OPCUA demo 11 months ago
Wang_Weigen 27a40042f4 add fpu test 11 months ago
Wang_Weigen 3ca98f520d repair the compiler error of lvgl 11 months ago
Wang_Weigen aa63e53cbc sync upstream branch 11 months ago
Wang_Weigen c6458f1f1d add lvgl for xiuos 11 months ago
Liu_Weichao bac136c51d feat support DAC driver for aiit-arm32-board and stm32f407-st-discovery 11 months ago
wlyu bb0425d1b2 fixed the bug of UaGetInfo 11 months ago
wlyu 51de336db1 remove debug log and optimizing codes 11 months ago
wlyu 6972a14f6d fixed opcua demo exception and added mac address with showip command 11 months ago
Liu_Weichao d789b66ed2 Merge branch 'prepare_for_master' of https://git.trustie.net/xuos/xiuos into aiit_arm_drivers 11 months ago
Liu_Weichao 2e8383397b feat support ADC driver for aiit-arm32-board and stm32f407-st-discovery 11 months ago
xuedongliang 3a35bee743 support LWIP and demo from Wang_Linyu Liu_Kai Yang Peihao Wang_Weigen 11 months ago
wlyu b6bec0c2b6 fixed the bug that updating ip address and TCP recv fault 11 months ago
wlyu a49eeaf548 optimize lwip test 11 months ago
wlyu e2e127bb0e added socket send and recv for udp and tcp 11 months ago
wlyu 877ef9e221 1. fixed IRQ interrupt 11 months ago
xuedongliang 4179e4910b add hcho1os、iaq10、as830 sensor and tvoc10 sensor support Nuttx from Wang_guozhu 11 months ago
wgzAIIT 6bfbbc18f2 add hcho1os sensor support Nuttx 11 months ago
wgzAIIT c08d854d4b add as830 sensor and tvoc10 sensor support Nuttx 11 months ago
wlyu ddb889623d change lwip_demo to resoures directory and mkdir socket_demo on connection_app 11 months ago
wlyu acd53026b0 fixed the exception of close socket and added dhcp and dns demo 11 months ago
wlyu a0337a42e3 change demo command and support DHCP demo 11 months ago
wlyu d1d4632292 1. fixed ping exception 11 months ago
wgzAIIT 1f252e418f add iaq10 sensor support Nuttx 11 months ago
Wang_Weigen 37c247f4d7 add lvgl 11 months ago
chunyexixiaoyu 3c291f075f APP_Framework/Framework/:delete the unuseful cmsis flies in tensorflow-lite 11 months ago
chunyexixiaoyu 9904709d70 Ubiquitous/RT_Thread: update the README file 11 months ago
chunyexixiaoyu 7f24c672dd APP_Framework/Framework: cmsis nn used in tflite was replaced with in knowing cmsis_5 dir 11 months ago
chunyexixiaoyu 1bd8927c5d Eliminate the warning "./../../../APP_Framework/Framework/knowing/Kconfig:13:warning: ignoring unsupported character '" 11 months ago
wlyu d1625c7d84 fixed opcua_demo compilation error 11 months ago
wlyu 37cbb51afa Merge branch 'prepare_for_master' of https://git.trustie.net/xuos/xiuos into 1220 11 months ago
xuedongliang 711bd5bd15 add hs300x and ps5308 sensor support Nuttx on stm32f407-discovery from Wang_guozhu 11 months ago
chunyexixiaoyu a3db2480a1 it's verified 11 months ago
wlyu 7c0b7367d1 optimize LWIP demo and OPCua demo 11 months ago
wgzAIIT b342734aad APP_Framework support Nuttx on aiit-arm32-board 11 months ago
wlyu 372c097688 Merge branch '1220' of https://code.gitlink.org.cn/wlyu/xiuos into 1220 11 months ago
wlyu 62dcbef383 optimize lwip demo and ok1052-c directories 11 months ago
wlyu a672abce6f optimize lwip demo and ok1052-c directories 11 months ago
wgzAIIT bd31aad3ef add d124 and zg09 sensor support Nuttx on stm32f407-discovery 11 months ago
wgzAIIT 97eccb0b36 Update Make.defs 11 months ago
wgzAIIT 491264e3fc Update Make.defs 11 months ago
wgzAIIT fb7a0478e5 Update ps5308.c 11 months ago
wgzAIIT d59acc2e03 add hs300x and ps5308 sensor support Nuttx on stm32f407-discovery 11 months ago
chunyexixiaoyu 17be211288 Merge branch 'wang_dev' into test_pre 12 months ago
wlyu 8fa0d977a0 Merge branch '1220' of https://code.gitlink.org.cn/wlyu/xiuos into 1220 12 months ago
wlyu aa43d46953 fixed pull conflict and socket ping test bug 12 months ago
wlyu 2af68252cb fixed pull conflict 12 months ago
wlyu ebb1321b7c update ping debug commands 12 months ago
wlyu f98689fc30 change udp test command 12 months ago
wlyu 8992dce241 fixed menu and complilation error 12 months ago
xuedongliang 7ecf1af00f 1、add Framework/connection/industrial_ethernet DIR; 2、add Framework/connection/industrial_fieldbus DIR; 3、add Framework/connection/industrial_wlan DIR from Liu Weichao 12 months ago
wlyu 5799b31942 fixed menu and complilation error 12 months ago
wlyu c20c9c20d2 support OPCUA and LWIP 12 months ago
chunyexixiaoyu b6bd1de959 APP_Framework/Applications/:eliminate the warning 12 months ago
Liu_Weichao 60442e489a feat Framework/connection/industrial_xxx DIR 12 months ago
chunyexixiaoyu be4da6f37d Ubiquitous/RT_Thread/:change the path name 12 months ago
wlyu b4730f3f87 support OPCUA and LWIP 12 months ago
Wang_Weigen 36f2ebbf95 add fpu status set 12 months ago
chunyexixiaoyu 12c9220487 the kmodel load function has been verified 12 months ago
xuedongliang cb8c68659c 1. add sensor as830 of ch4; 2、repair a bug of requiring password in letter shell 12 months ago
yangtuo250 62df72af5b fix(knowing framework/yolov2 region layer): free region layer thresholds 12 months ago
yangtuo250 c782dd26c4 feat(knowing app): remove json config from menuconfig, adding to detect_app arg 12 months ago
yangtuo250 efb28105e8 fix(knowing framework): fix unproperly named k210 detect procedure, specified yolov2 12 months ago
yangtuo250 4640055ab6 fix(knowing app/yolov2): AI address error while sensor output and net input height mismatch 12 months ago
Wang_Weigen db225df433 add 'TB600B_WQ_HCHO1OS' sensor of hcho to sensor framework 12 months ago
Wang_Weigen 19edea21d7 add 'TB600B_TVOC10' sensor of tvoc to sensor framework 12 months ago
Wang_Weigen 856edb7ec6 add sensor 'TB600B_IAQ10' to sensor framework 12 months ago
yangtuo250 203184e18c fix(bsp/k210): resolve conflict of 235dcb761c path changed 12 months ago
yangtuo250 c07c918150 refactor(knowing app): add common k210 yolov2 detection procedure 1 year ago
yangtuo250 d368db9e76 refactor(knowing apps): yolov2 json parser 1 year ago
chunyexixiaoyu 235dcb761c Ubiquitous/RT_Thread/:change the path name 12 months ago
Wang_Weigen 4a8ac7c02b repair ch4 test 12 months ago
chunyexixiaoyu de27c59e51 Ubiquitous/RT_Thread/: update file system 12 months ago
chunyexixiaoyu d71c5fcd2f Ubiquitous/RT_Thread/:add romfs file system ,including SD and FLASH directory 12 months ago
Wang_Weigen e366c8817c repair a bug of inputting password of shell 12 months ago
Wang_Weigen f2ba792380 sync upstream branch and add 'as830' sensor of ch4 12 months ago
xuedongliang cc6c459e7b fix APP_Framework bugs,include sensor framework and Applications 12 months ago
Liu_Weichao e9e9080ae0 delete useless DIR connection_app/ and app_test/ 1 year ago
Liu_Weichao ead80da91f fix that i2c device of sensor framework cannot set i2c address 1 year ago
xuedongliang c9db5635b0 add framework configuration select from Wang_Weigen 1 year ago
xuedongliang 3397a5245b Add the cortex-m0 support for XiUOS & Fix bugs on M3 and serial device from ysm 1 year ago
Wang_Weigen 85cbc7717e add framework configuration select 1 year ago
Kiritoy 58060874d6 rebase prepare_for_master branch 1 year ago
Kiritoy a080d98470 Restore the file directory structure 1 year ago
Kiritoy 4aacf28974 add cortex-m0 support and fix some bugs 1 year ago
xuedongliang 1dfb44a706 1、fix third_party_usb data format bugs; 2、feat riscv64 usb mount file system function. 1 year ago
xuedongliang 3306194902 add gd32vf103_rvstar board for xiuos 1 year ago
Wang_Weigen fa1637ffbd sync upstream 1 year ago
Liu_Weichao c1036ec9a2 Merge branch 'wang_weigen_master' of https://git.trustie.net/xuos/xiuos into xiuos_connection 1 year ago
Liu_Weichao a7baf1e7ed fix third_party_usb/usbhost data format bugs 1 year ago
xuedongliang 4405b85eae add XiUOS/stm32f103-nano board feature,support uart1 and shell function 1 year ago
Wang_Weigen b76b1506cd modify board name in readme 1 year ago
Wang_Weigen b1e7057b17 add bin file flash way of gd32vf103_rvstar in READ.md 1 year ago
chunyexixiaoyu 6816dc023a update .gitmodules file 1 year ago
Wang_Weigen 644f2bbf37 add gd32vf103 'README.md' 1 year ago
Wang_Weigen 19bd5a4705 repair the uart input of gd32fv103_rvstar 1 year ago
chunyexixiaoyu d99d4e8f52 APP_Framework/Applications/:eliminate some warnings about menuconfig in linux 1 year ago
Wang_Weigen b1264ad3c9 Merge branch 'wang_weigen_master' of https://git.trustie.net/xuos/xiuos into develop 1 year ago
Wang_Weigen 607b8ca017 transplant development board of gd32vf103_rvstar 1 year ago
Liu_Weichao a21ca4af2a fix XiUOS/stm32f103-nano board README.md error 1 year ago
Liu_Weichao a51473d791 Merge branch 'wang_weigen_master' of https://git.trustie.net/xuos/xiuos into xiuos_connection 1 year ago
Liu_Weichao 20b852eb38 add XiUOS/stm32f103-nano board support, feat shell and docs stack-heap-optimize advice 1 year ago
chunyexixiaoyu 60ce72b37a Ubiquitous/RT_Thread/bsp/:fix the problem that the iic parameters were changed when menuconfig 1 year ago
xuedongliang 20bc1e6e8b cortex-m4-emulator support 1 year ago
Liu_Weichao c78ab5242c Merge branch 'wang_weigen_master' of https://git.trustie.net/xuos/xiuos into xiuos_connection 1 year ago
Liu_Weichao a42f20ab3c add XiUOS/stm32f103-nano board support, task create function has some bugs 1 year ago
bj 668796ee18 技术文档与视频 1 year ago
xuedongliang 2356e42955 update knowing framework and ov2640 driver from Tian Chunyu 1 year ago
xuedongliang 3653ac690d it is OK 1 year ago
chunyexixiaoyu c30ba15c6f Merge branch 'wang_dev' of https://git.trustie.net/chunyexixiaoyu/xiuos into wang_dev 1 year ago
chunyexixiaoyu 0379084f40 Ubiquitous/RT_Thread/:update ov2640 drivers to adapt the hardware,IIC two wires(SCL SDA) switched due to due to hardware design. 1 year ago
chunyexixiaoyu e70244d75e Add cmsis- nn for ARM board , it has been verified on stm32f407-atk-board 1 year ago
Wang_Weigen 4fc79c211a add a tip 1 year ago
Wang_Weigen ac69e135ca repair a bug of restart main after ota 1 year ago
WentaoWong 49caa6e533 APP_Framework/Applications/:add CMSIS-NN (version 5) cifar10 example 1 year ago
WentaoWong 96ca3b18f1 APP_Framework/Applications/:add configuration file about CMSIS-NN (version 5) cifar10 example 1 year ago
WentaoWong 86cb28ee4f APP_Framework/Framework/:add CMSIS-NN (version 5) source code 1 year ago
WentaoWong fe06b461ee APP_Framework/Framework/:add Kconfig file and SConscript file about CMSIS-NN (version 5) 1 year ago
Wang_Weigen 1c60efe8a8 add debug info 1 year ago
Wang_Weigen 32cb324324 repair the total bin crc failed problem 1 year ago
Wang_Weigen 592ca413e8 sync with upstream 1 year ago
Wang_Weigen f24189d7e1 repair ota failed by add mutex protect 1 year ago
Wang_Weigen 9d970e7832 add mutex protection for adapter agent 1 year ago
Wang_Weigen 5a8b6d79aa repair somebug of ota/nbiot/adapter agent 1 year ago
chunyexixiaoyu e0c78f200b APP_Framework/Applications/:add TJpgDec example,notes the macro definition (WORK_POOL_SIZE),this value depends on the resolution of the image,user set. 1 year ago
xuedongliang 86b1d9c77d support adapter_ethernet and adapter_lora function from Liu Weichao 1 year ago
chunyexixiaoyu e33b0d0264 APP_Framework/Applications/:add configuration file about TJpgDec example 1 year ago
chunyexixiaoyu 2b69d31744 APP_Framework/Framework/:add TJpgDec(Tiny JPEG Decompressor)source code 1 year ago
chunyexixiaoyu a9ac7efed2 APP_Framework/Framework/:add Kconfig file and SConscript file about TJpgDec(Tiny JPEG Decompressor) 1 year ago
Liu_Weichao 5fe8fb59b2 Merge branch 'wang_weigen_master' of https://git.trustie.net/xuos/xiuos into xiuos_connection 1 year ago
Liu_Weichao 7a172fd136 1、support adapter_lora gateway and client state-machine-model;2、fix aiit-arm32-board usb compile error. 1 year ago
xuedongliang ca74d5cb93 Add QEMU support for XiUOS based on Cortex-M4 1 year ago
Wang_Weigen 251846604a repair ota_server.c 1 year ago
Wang_Weigen 2930757728 add the totle length with the last frame of ota server 1 year ago
Wang_Weigen 25cd73821f fix a bug of malloc big memory failed 1 year ago
Wang_Weigen eb14677832 1.add an API of finding the first user task in xiuos task manage list; 2.add restart application after ota 1 year ago
Liu_Weichao c631063b7a support adapter_lora and sx1278 device on aiit-arm32-board 1 year ago
Wang_Weigen f3d527cf70 delete useless code 1 year ago
Wang_Weigen b3c770dd26 delete useless code 1 year ago
Wang_Weigen 8609045f2a repair 'mount sd card' 1 year ago
Wang_Weigen 9959ec6470 1.repair the separate compile error;2.modify ota init task 1 year ago
Wang_Weigen 8b2eee0aa0 reapir ota save bin process 1 year ago
Wang_Weigen 224201ba55 add application bin ota function by 4G adapter,this function need save the app bin to sdcard and startup the app from sdcrad 1 year ago
xuedongliang dfdc29b1d8 add K210 fft test 1 year ago
xuedongliang 410178e426 add BC28 of NBIoT for connection adapter 1 year ago
bj 471e2d7920 cotex-m4-emulator2 1 year ago
chunyexixiaoyu e69139c6b9 APP_Framework/Applications/:add k210 fft(fast Fourier transform) example. 1 year ago
chunyexixiaoyu 4c0b05b752 Ubiquitous/RT_Thread/:rt-thread version update to fix the bug that tensflow lite for mcu can't be compiled. 1 year ago
Wang_Weigen 281a3b672a debug nbiot pass with some modification 1 year ago
Liu_Weichao 7b82f2a60b support adapter_ethernet and hfa21 device 1 year ago
bj 2f86d928c6 cortex-m4-emulator 1 year ago
Wang_Weigen abe138ab27 remove redefinition and repair compile error 1 year ago
Wang_Weigen 9bf26cdbf9 sync wangweigen_master 1 year ago
Wang_Weigen 267528408e repair wait time for 'ATOrderSend',optimize bc28 api 1 year ago
xuedongliang 3f13410d96 support aiit-arm32-board for nuttx 1 year ago
xuedongliang ac588f2fcf support adapter_4g and fix connections bugs 1 year ago
xuedongliang 7d5149af24 update k210 bsp and solve lcd display problem 1 year ago
wang lingyu 48a19fe349 support aiit-arm32-board 1 year ago
wang lingyu 25221ac786 support aiit-arm32-board for nuttx 1 year ago
Liu_Weichao 06c9c6ecc4 refactor connection directory to follow code standards 1 year ago
Liu_Weichao 8f6cac9797 fix adapter_bluetooth test function bugs 1 year ago
Liu_Weichao 8aac82b1b4 support adapter_4G send and receive data function 1 year ago
chunyexixiaoyu bea5eda2e0 APP_Framework/Applications:update face detect and instrusion detect ,the version had been tested for long time,and its's stable. 1 year ago
chunyexixiaoyu 43f19c4b55 Ubiquitous/RT_Thread/: add lcd test example update main.c function when it starts. 1 year ago
chunyexixiaoyu a184611226 Ubiquitous/RT_Thread/:update K210 bsp base on https://github.com/kendryte/K210-Micropython-OpenMV 1 year ago
chunyexixiaoyu 0eee31179c Ubiquitous/RT_Thread/:update stm32 configure file and solve ov2640 driver compile bug. 1 year ago
chunyexixiaoyu ecfbdb207f Ubiquitous/RT_Thread/:update submodule version 1 year ago
Liu_Weichao ab578dfe0e support 4G adapter and ec200t device 1 year ago
Wang_Weigen a4f24a29fc add BC28 of nbiot for adapter 1 year ago
xuedongliang 2aa5c0f0ba support adapter_bluetooth and fix at agent bugs 1 year ago
Liu_Weichao a5e97b1431 fix cortex-m3-emulator and hifive emulator compile error 1 year ago
Liu_Weichao 92347f7e29 1、support adapter_bluetooth and hc08 device;2、fix adapter at agent bug。 1 year ago
xuedongliang b07ad19dc3 add E18 of zigbee with net-group from Wang_weigen 1 year ago
Wang_Weigen ebbb30c763 sync the upstream branch 1 year ago
xuedongliang 58b3e0b6a6 update transform in rt-thread and sensor framework 1 year ago
xuedongliang a85e9fdb6d optimize connection framework kconfig and makefile; 2、transform connection framework api from user-api to priv-api. 1 year ago
Wang_Weigen 626cbb084d add reopen zigbee and modify the stacksize of zigbee receive thread 1 year ago
Wang_Weigen b0f717bee4 add zigbee e18 receive function 1 year ago
chunyexixiaoyu 51d3a8ab41 APP_Framework/Applications/:add SConscript in sensor_app ,fix header file in voice_d124.c. 1 year ago
chunyexixiaoyu d7e29f19cc APP_Framework/Framework/:add voice sensor in framework,and update the d124.c file 1 year ago
chunyexixiaoyu d7cb0876f6 APP_Framework/Framework/:add sensor SConscript and the sensor.c file can be compiled by default 1 year ago
Liu_Weichao dd5a68916e transform connection framework api from user-api to priv-api 1 year ago
chunyexixiaoyu d008cbf09f APP_Framework/Applications/:add list function base on rt-thread. 1 year ago
chunyexixiaoyu 2e209ef174 APP_Framework/Applications/:framework initialize in the bsp applications/main.c 1 year ago
chunyexixiaoyu 3fdc18e837 APP_Framework/Framework/:update transform layer in rt-thread. 1 year ago
Wang_Weigen 6be676af78 add e18 of zigbee connection 1 year ago
Wang_Weigen d14ec3cb12 Merge branch 'master' of https://git.trustie.net/xuos/xiuos into develop 1 year ago
xuedongliang 4a07f534d8 modify the api in sensor framework 1 year ago
xuedongliang 869e69097f fix two big : fix aiit_board spi_lora bug;fix sensor/voice Kconfig bug 1 year ago
Wang_Weigen d77c1828b2 modify the api in sensor framework 1 year ago
Liu_Weichao bb93aefe1d 1、fix aiit_board spi_lora bug;2、fix sensor/voice Kconfig bug。 1 year ago
  1. 6
      .gitmodules
  2. 2
      APP_Framework/Applications/Kconfig
  3. 7
      APP_Framework/Applications/Make.defs
  4. 48
      APP_Framework/Applications/Makefile
  5. 6
      APP_Framework/Applications/SConscript
  6. 27
      APP_Framework/Applications/app_test/Kconfig
  7. 12
      APP_Framework/Applications/app_test/Makefile
  8. 41
      APP_Framework/Applications/app_test/sd_card_mount.c
  9. 46
      APP_Framework/Applications/app_test/spi_sd_card_mount.c
  10. 60
      APP_Framework/Applications/app_test/test_adc.c
  11. 20
      APP_Framework/Applications/app_test/test_adhoc_lora.c
  12. 60
      APP_Framework/Applications/app_test/test_dac.c
  13. 4
      APP_Framework/Applications/connection_app/Kconfig
  14. 6
      APP_Framework/Applications/connection_app/Makefile
  15. 108
      APP_Framework/Applications/connection_app/adhoc_lora_demo/client.c
  16. 63
      APP_Framework/Applications/connection_app/adhoc_lora_demo/gateway.c
  17. 3
      APP_Framework/Applications/connection_app/bluetooth_demo/Makefile
  18. 88
      APP_Framework/Applications/connection_app/bluetooth_demo/bluetooth_receive_demo.c
  19. 65
      APP_Framework/Applications/connection_app/bluetooth_demo/bluetooth_send_demo.c
  20. 197
      APP_Framework/Applications/connection_app/ethernet_demo/ethernet_demo.c
  21. 56
      APP_Framework/Applications/connection_app/nbiot_demo/nbiot_demo.c
  22. 3
      APP_Framework/Applications/connection_app/socket_demo/Makefile
  23. 200
      APP_Framework/Applications/connection_app/socket_demo/lwip_tcp_socket_demo.c
  24. 209
      APP_Framework/Applications/connection_app/socket_demo/lwip_udp_socket_demo.c
  25. 223
      APP_Framework/Applications/connection_app/wifi_demo/wifi_demo.c
  26. 3
      APP_Framework/Applications/connection_app/zigbee_demo/Makefile
  27. 88
      APP_Framework/Applications/connection_app/zigbee_demo/zigbee_receive_demo.c
  28. 65
      APP_Framework/Applications/connection_app/zigbee_demo/zigbee_send_demo.c
  29. 1
      APP_Framework/Applications/control_app/Kconfig
  30. 11
      APP_Framework/Applications/control_app/Makefile
  31. 2
      APP_Framework/Applications/control_app/opcua_demo/Makefile
  32. 211
      APP_Framework/Applications/control_app/opcua_demo/opcua_demo.c
  33. 66
      APP_Framework/Applications/framework_init.c
  34. 0
      APP_Framework/Applications/general_functions/SConscript
  35. 12
      APP_Framework/Applications/general_functions/list/Makefile
  36. 11
      APP_Framework/Applications/general_functions/list/SConscript
  37. 6
      APP_Framework/Applications/general_functions/list/list.h
  38. 8
      APP_Framework/Applications/knowing_app/Kconfig
  39. 16
      APP_Framework/Applications/knowing_app/cmsis_5_demo/Kconfig
  40. 0
      APP_Framework/Applications/knowing_app/cmsis_5_demo/SConscript
  41. 14
      APP_Framework/Applications/knowing_app/cmsis_5_demo/cmsisnn-cifar10/README.md
  42. 18
      APP_Framework/Applications/knowing_app/cmsis_5_demo/cmsisnn-cifar10/SConscript
  43. BIN
      APP_Framework/Applications/knowing_app/cmsis_5_demo/cmsisnn-cifar10/cifar-photo/Truck.jpg
  44. 157
      APP_Framework/Applications/knowing_app/cmsis_5_demo/cmsisnn-cifar10/demo/cmsisnn_demo.c
  45. 46
      APP_Framework/Applications/knowing_app/cmsis_5_demo/cmsisnn-cifar10/model/m4/nn.c
  46. 12
      APP_Framework/Applications/knowing_app/cmsis_5_demo/cmsisnn-cifar10/model/m4/nn.h
  47. 69
      APP_Framework/Applications/knowing_app/cmsis_5_demo/cmsisnn-cifar10/model/m4/parameter.h
  48. 18
      APP_Framework/Applications/knowing_app/cmsis_5_demo/cmsisnn-cifar10/model/m4/weights.h
  49. 46
      APP_Framework/Applications/knowing_app/cmsis_5_demo/cmsisnn-cifar10/model/m7/nn.c
  50. 12
      APP_Framework/Applications/knowing_app/cmsis_5_demo/cmsisnn-cifar10/model/m7/nn.h
  51. 69
      APP_Framework/Applications/knowing_app/cmsis_5_demo/cmsisnn-cifar10/model/m7/parameter.h
  52. 18
      APP_Framework/Applications/knowing_app/cmsis_5_demo/cmsisnn-cifar10/model/m7/weights.h
  53. 8
      APP_Framework/Applications/knowing_app/face_detect/Kconfig
  54. 373
      APP_Framework/Applications/knowing_app/face_detect/face_detect.c
  55. 8
      APP_Framework/Applications/knowing_app/helmet_detect/Kconfig
  56. 167
      APP_Framework/Applications/knowing_app/helmet_detect/README.md
  57. 380
      APP_Framework/Applications/knowing_app/helmet_detect/helmet_detect.c
  58. 6
      APP_Framework/Applications/knowing_app/image_processing/Kconfig
  59. 14
      APP_Framework/Applications/knowing_app/image_processing/SConscript
  60. 4
      APP_Framework/Applications/knowing_app/image_processing/TJpgDec_APP/Kconfig
  61. 18
      APP_Framework/Applications/knowing_app/image_processing/TJpgDec_APP/SConscript
  62. 151
      APP_Framework/Applications/knowing_app/image_processing/TJpgDec_APP/tjpgd_example.c
  63. 8
      APP_Framework/Applications/knowing_app/instrusion_detect/Kconfig
  64. 5
      APP_Framework/Applications/knowing_app/instrusion_detect/README.md
  65. 381
      APP_Framework/Applications/knowing_app/instrusion_detect/instrusion_detect.c
  66. 3
      APP_Framework/Applications/knowing_app/iris_ml_demo/iris_ml_demo.c
  67. 10
      APP_Framework/Applications/knowing_app/k210_detect_entry/Kconfig
  68. 0
      APP_Framework/Applications/knowing_app/k210_detect_entry/README.md
  69. 2
      APP_Framework/Applications/knowing_app/k210_detect_entry/SConscript
  70. 1
      APP_Framework/Applications/knowing_app/k210_detect_entry/face.json
  71. 0
      APP_Framework/Applications/knowing_app/k210_detect_entry/face.kmodel
  72. 38
      APP_Framework/Applications/knowing_app/k210_detect_entry/face_mask.json
  73. BIN
      APP_Framework/Applications/knowing_app/k210_detect_entry/face_mask.kmodel
  74. 3
      APP_Framework/Applications/knowing_app/k210_detect_entry/helmet.json
  75. 0
      APP_Framework/Applications/knowing_app/k210_detect_entry/helmet.kmodel
  76. 3
      APP_Framework/Applications/knowing_app/k210_detect_entry/instrusion.json
  77. 0
      APP_Framework/Applications/knowing_app/k210_detect_entry/instrusion.kmodel
  78. 16
      APP_Framework/Applications/knowing_app/k210_detect_entry/k210_detect_entry.c
  79. 3
      APP_Framework/Applications/knowing_app/k210_fft_test/Kconfig
  80. 2
      APP_Framework/Applications/knowing_app/k210_fft_test/SConscript
  81. 101
      APP_Framework/Applications/knowing_app/k210_fft_test/fft_soft.c
  82. 14
      APP_Framework/Applications/knowing_app/k210_fft_test/fft_soft.h
  83. 159
      APP_Framework/Applications/knowing_app/k210_fft_test/fft_test.c
  84. 2
      APP_Framework/Applications/knowing_app/mnist/model.h
  85. 3
      APP_Framework/Applications/lv_app/Makefile
  86. 50
      APP_Framework/Applications/lv_app/lv_demo.c
  87. 50
      APP_Framework/Applications/lv_app/lv_demo_calendar.c
  88. 6
      APP_Framework/Applications/lv_app/lv_demo_calendar.h
  89. 39
      APP_Framework/Applications/lv_app/lv_init.c
  90. 10
      APP_Framework/Applications/main.c
  91. 7
      APP_Framework/Applications/ota/Kconfig
  92. 2
      APP_Framework/Applications/ota/Makefile
  93. 19
      APP_Framework/Applications/ota/README.md
  94. 411
      APP_Framework/Applications/ota/ota.c
  95. 364
      APP_Framework/Applications/ota/ota_server.c
  96. 85
      APP_Framework/Applications/sensor_app/Kconfig
  97. 6
      APP_Framework/Applications/sensor_app/Make.defs
  98. 112
      APP_Framework/Applications/sensor_app/Makefile
  99. 20
      APP_Framework/Applications/sensor_app/SConscript
  100. 36
      APP_Framework/Applications/sensor_app/ch4_as830.c

6
.gitmodules

@ -1,6 +1,6 @@
[submodule "Ubiquitous/RT_Thread/rt-thread"]
path = Ubiquitous/RT_Thread/rt-thread
url = https://git.trustie.net/chunyexixiaoyu/rt-thread.git
url = https://code.gitlink.org.cn/chunyexixiaoyu/rt-thread.git
[submodule "Ubiquitous/RT_Thread/bsp/k210/kendryte-sdk/kendryte-sdk-source"]
path = Ubiquitous/RT_Thread/bsp/k210/kendryte-sdk/kendryte-sdk-source
url = https://git.trustie.net/chunyexixiaoyu/kendryte-sdk-source.git
path = Ubiquitous/RT_Thread/aiit_board/k210/kendryte-sdk/kendryte-sdk-source
url = https://code.gitlink.org.cn/chunyexixiaoyu/kendryte-sdk-source.git

2
APP_Framework/Applications/Kconfig

@ -11,6 +11,8 @@ menu "Applications"
default 85 if KTASK_PRIORITY_256
endmenu
source "$APP_DIR/Applications/ota/Kconfig"
source "$APP_DIR/Applications/app_test/Kconfig"
source "$APP_DIR/Applications/connection_app/Kconfig"
source "$APP_DIR/Applications/control_app/Kconfig"

7
APP_Framework/Applications/Make.defs

@ -0,0 +1,7 @@
############################################################################
# APP_Framework/Applications/Make.defs
############################################################################
CONFIGURED_APPS += $(APPDIR)/../../../APP_Framework/Applications
CONFIGURED_APPS += $(APPDIR)/../../../APP_Framework/Applications/general_functions/list
include $(wildcard $(APPDIR)/../../../APP_Framework/Applications/*/Make.defs)

48
APP_Framework/Applications/Makefile

@ -1,21 +1,39 @@
SRC_DIR := general_functions
include $(KERNEL_ROOT)/.config
SRC_FILES := main.c framework_init.c
ifeq ($(CONFIG_APPLICATION_SENSOR),y)
SRC_DIR += sensor_app
ifeq ($(CONFIG_ADD_NUTTX_FETURES),y)
include $(APPDIR)/Make.defs
CSRCS += framework_init.c
include $(APPDIR)/Application.mk
endif
ifeq ($(CONFIG_APPLICATION_CONNECTION),y)
SRC_DIR += connection_app
endif
ifeq ($(CONFIG_APPLICATION_KNOWING),y)
SRC_DIR += knowing_app
endif
ifeq ($(CONFIG_ADD_XIUOS_FETURES),y)
SRC_DIR := general_functions app_test
ifeq ($(CONFIG_APPLICATION_CONTROL),y)
SRC_DIR += control_app
endif
SRC_FILES := main.c framework_init.c
ifeq ($(CONFIG_LIB_LV),y)
SRC_DIR += lv_app
endif
ifeq ($(CONFIG_APPLICATION_OTA),y)
SRC_DIR += ota
endif
ifeq ($(CONFIG_APPLICATION_SENSOR),y)
SRC_DIR += sensor_app
endif
ifeq ($(CONFIG_APPLICATION_CONNECTION),y)
SRC_DIR += connection_app
endif
ifeq ($(CONFIG_APPLICATION_KNOWING),y)
SRC_DIR += knowing_app
endif
ifeq ($(CONFIG_APPLICATION_CONTROL),y)
SRC_DIR += control_app
endif
include $(KERNEL_ROOT)/compiler.mk
include $(KERNEL_ROOT)/compiler.mk
endif

6
APP_Framework/Applications/SConscript

@ -1,9 +1,15 @@
import os
Import('RTT_ROOT')
Import('rtconfig')
from building import *
cwd = GetCurrentDir()
SOURCES = ['framework_init.c']
path = [cwd]
objs = []
group = DefineGroup('sensor', SOURCES, depend = [], CPPPATH = [cwd])
objs = objs + group
list = os.listdir(cwd)
for d in list:

27
APP_Framework/Applications/app_test/Kconfig

@ -4,17 +4,30 @@ menu "test app"
default n
if USER_TEST
config USER_TEST_LORA_ADHOC
bool "Config test lora adhoc"
config USER_TEST_SPI_FLASH
bool "Config test spi flash"
default n
config USER_TEST_SPI_LORA
bool "Config test spi lora"
menuconfig USER_TEST_ADC
bool "Config test adc"
default n
if USER_TEST_ADC
if ADD_XIUOS_FETURES
config ADC_DEV_DRIVER
string "Set ADC dev path"
default "/dev/adc1_dev"
endif
endif
config USER_TEST_SPI_FLASH
bool "Config test spi flash"
menuconfig USER_TEST_DAC
bool "Config test dac"
default n
if USER_TEST_DAC
if ADD_XIUOS_FETURES
config DAC_DEV_DRIVER
string "Set DAC dev path"
default "/dev/dac_dev"
endif
endif
endif
endmenu

12
APP_Framework/Applications/app_test/Makefile

@ -1,15 +1,15 @@
SRC_FILES :=
ifeq ($(CONFIG_USER_TEST_LORA_ADHOC),y)
SRC_FILES += test_adhoc_lora.c
ifeq ($(CONFIG_USER_TEST_SPI_FLASH),y)
SRC_FILES += test_spi_flash.c
endif
ifeq ($(CONFIG_USER_TEST_SPI_LORA),y)
SRC_FILES += test_spi_lora.c
ifeq ($(CONFIG_USER_TEST_ADC),y)
SRC_FILES += test_adc.c
endif
ifeq ($(CONFIG_USER_TEST_SPI_FLASH),y)
SRC_FILES += test_spi_flash.c
ifeq ($(CONFIG_USER_TEST_DAC),y)
SRC_FILES += test_dac.c
endif
include $(KERNEL_ROOT)/compiler.mk

41
APP_Framework/Applications/app_test/sd_card_mount.c

@ -1,41 +0,0 @@
/*
* Copyright (c) 2020 AIIT XUOS Lab
* XiUOS is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
/**
* @file sd_card_mount.c
* @brief Mount SD card when opened SDIO
* @version 1.0
* @author AIIT XUOS Lab
* @date 2021.04.19
*/
#include "user_api/switch_api/user_api.h"
#include <stdio.h>
#if defined(FS_VFS)
#include <iot-vfs.h>
/**
* @description: Mount SD card
* @return 0
*/
int MountSDCard(void)
{
if (MountFilesystem(SDIO_BUS_NAME, SDIO_DEVICE_NAME, SDIO_DRIVER_NAME, FSTYPE_FATFS, "/") == 0)
DBG("sd card mount to '/'");
else
SYS_WARN("sd card mount to '/' failed!");
return 0;
}
#endif
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0),MountSDCard, MountSDCard, MountSDCard );

46
APP_Framework/Applications/app_test/spi_sd_card_mount.c

@ -1,46 +0,0 @@
/*
* Copyright (c) 2020 AIIT XUOS Lab
* XiUOS is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
/**
* @file spi_sd_card_mount.c
* @brief Mount SD card when opened SPI SD card
* @version 1.0
* @author AIIT XUOS Lab
* @date 2021.04.01
*/
#include "user_api/switch_api/user_api.h"
#include <stdio.h>
#if defined(FS_VFS)
#include <iot-vfs.h>
/**
* @description: Mount SD card
* @return 0
*/
int MountSDCard(void)
{
struct Bus *spi_bus;
spi_bus = BusFind(SPI_BUS_NAME_1);
if (NONE == SpiSdInit(spi_bus, SPI_1_DEVICE_NAME_0, SPI_1_DRV_NAME, SPI_SD_NAME)) {
KPrintf("MountSDCard SpiSdInit error!\n");
return 0;
}
if (EOK == MountFilesystem(SPI_BUS_NAME_1, SPI_SD_NAME, SPI_1_DRV_NAME, FSTYPE_FATFS, "/"))
KPrintf("SPI SD card fatfs mounted\n");
return 0;
}
#endif

60
APP_Framework/Applications/app_test/test_adc.c

@ -0,0 +1,60 @@
/*
* Copyright (c) 2020 AIIT XUOS Lab
* XiUOS is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
/**
* @file: test_adc.c
* @brief: a application of adc function
* @version: 1.1
* @author: AIIT XUOS Lab
* @date: 2022/1/7
*/
#include <stdio.h>
#include <string.h>
#include <transform.h>
void test_adc()
{
int adc_fd;
uint8 adc_channel = 0x0;
uint16 adc_sample, adc_value_decimal = 0;
float adc_value;
adc_fd = PrivOpen(ADC_DEV_DRIVER, O_RDWR);
if (adc_fd < 0) {
KPrintf("open adc fd error %d\n", adc_fd);
return;
}
struct PrivIoctlCfg ioctl_cfg;
ioctl_cfg.ioctl_driver_type = ADC_TYPE;
ioctl_cfg.args = &adc_channel;
if (0 != PrivIoctl(adc_fd, OPE_CFG, &ioctl_cfg)) {
KPrintf("ioctl adc fd error %d\n", adc_fd);
PrivClose(adc_fd);
return;
}
PrivRead(adc_fd, &adc_sample, 2);
adc_value = (float)adc_sample * (3.3 / 4096);
adc_value_decimal = (adc_value - (uint16)adc_value) * 1000;
printf("adc sample %u value integer %u decimal %u\n", adc_sample, (uint16)adc_value, adc_value_decimal);
PrivClose(adc_fd);
return;
}
// SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN),
// test_adc, test_adc, read 3.3 voltage data from adc);

20
APP_Framework/Applications/app_test/test_adhoc_lora.c

@ -1,20 +0,0 @@
#include <xiuos.h>
extern void net_lora_client(int argc, char *argv[]);
extern void net_lora_gateway(int argc, char *argv[]);
void demo_lora_adhoc()
{
#ifdef CONNECTION_COMMUNICATION_SET_AS_LORA_CLIENT
char pgk_count[32];
char* param[3];
param[0] = "xxx";
param[1] = CONNECTION_COMMUNICATION_LORA_CLIENT_NAME;
itoa(CONNECTION_COMMUNICATION_LORA_CLIENT_PKG_COUNT, pgk_count, 10);
param[2] = pgk_count;
net_lora_client(2, param);
#endif
#ifdef CONNECTION_COMMUNICATION_SET_AS_LORA_GATEWAY
net_lora_gateway(0, 0);
#endif
}

60
APP_Framework/Applications/app_test/test_dac.c

@ -0,0 +1,60 @@
/*
* Copyright (c) 2020 AIIT XUOS Lab
* XiUOS is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
/**
* @file: test_dac.c
* @brief: a application of dac function
* @version: 2.0
* @author: AIIT XUOS Lab
* @date: 2022/1/11
*/
#include <stdio.h>
#include <string.h>
#include <transform.h>
void test_dac()
{
int dac_fd;
uint16 dac_set_value = 800;
uint16 dac_sample, dac_value_decimal = 0;
float dac_value;
dac_fd = PrivOpen(DAC_DEV_DRIVER, O_RDWR);
if (dac_fd < 0) {
KPrintf("open dac fd error %d\n", dac_fd);
return;
}
struct PrivIoctlCfg ioctl_cfg;
ioctl_cfg.ioctl_driver_type = DAC_TYPE;
ioctl_cfg.args = &dac_set_value;
if (0 != PrivIoctl(dac_fd, OPE_CFG, &ioctl_cfg)) {
KPrintf("ioctl dac fd error %d\n", dac_fd);
PrivClose(dac_fd);
return;
}
PrivRead(dac_fd, &dac_sample, 2);
dac_value = (float)dac_sample * (3.3 / 4096);//Vref+ need to be 3.3V
dac_value_decimal = (dac_value - (uint16)dac_value) * 1000;
printf("dac sample %u value integer %u decimal %u\n", dac_sample, (uint16)dac_value, dac_value_decimal);
PrivClose(dac_fd);
return;
}
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN),
test_dac, test_dac, set digital data to dac);

4
APP_Framework/Applications/connection_app/Kconfig

@ -1,3 +1,7 @@
menu "connection app"
menuconfig APPLICATION_CONNECTION
bool "Using connection apps"
default n
endmenu

6
APP_Framework/Applications/connection_app/Makefile

@ -1,3 +1,7 @@
SRC_DIR :=wifi_demo
SRC_DIR :=
ifeq ($(CONFIG_RESOURCES_LWIP),y)
SRC_DIR += socket_demo
endif
include $(KERNEL_ROOT)/compiler.mk

108
APP_Framework/Applications/connection_app/adhoc_lora_demo/client.c

@ -1,108 +0,0 @@
#include <user_api.h>
#include <string.h>
#include <xs_adapter_lora.h>
#include <xs_adapter_manager.h>
#include <stdio.h>
#include <stdlib.h>
char client_name[DEVNAME_LEN_MAX] = "lora_dev_123";
void success_cb(void *param)
{
printf("success_cb, param = %s\n", param);
}
void invert_param(void *param)
{
printf("success_cb02 invoke, invert bool param.\n");
bool *bparam = (bool *)param;
if (*bparam)
{
*bparam = false;
}
else
{
*bparam = true;
}
}
void net_lora_client(int argc, char *argv[])
{
int pkg_count = 10;
if (argc >= 1)
{
memset(client_name, 0, DEVNAME_LEN_MAX);
strncpy(client_name, argv[1], strlen(argv[1]));
printf("lora client set clientName(%s).\n", client_name);
}
if (argc >= 2)
{
pkg_count = atoi(argv[2]);
printf("lora client set pkg_count(%d).\n", pkg_count);
}
// 1.Create an adapter for a specific agreement (LORA)
static struct AdapterLora lora_adapter;
memset(&lora_adapter, 0, sizeof(lora_adapter));
struct AdapterDone lora_example_done = {
.NetAiitOpen = LoraAdapterOpen,
.NetAiitClose = LoraAdapterCose,
.NetAiitSend = LoraAdapterSendc2g,
.NetAiitReceive = NULL,
.NetAiitJoin = LoraAdapterJoin,
.NetAiitIoctl = NULL,
};
lora_adapter.parent.done = lora_example_done; // Bind adapter operation
lora_adapter.name = client_name; // Set adapter name
lora_adapter.spi_lora_fd = -1; // Set adapter information
lora_adapter.deve_ui = "xxx";
lora_adapter.app_key = "yyy";
// 2.Register the adapter in the list
LoraAdapterInit();
LoraAdapterRegister((adapter_t)&lora_adapter);
// 3.Find from the list of registered adapters
adapter_t padapter = LoraAdapterFind(client_name);
if (NONE == padapter)
{
printf("adapter find failed!\n");
return;
}
// 4.Open adapter
if (0 != padapter->done.NetAiitOpen(padapter))
{
printf("adapter open failed!\n");
return;
}
// 5.Join the specified network segment as client
printf("NetAiitJoin start. \n");
padapter->done.NetAiitJoin(padapter, ROLE_TYPE_SLAVE, CONNECTION_COMMUNICATION_LORA_NET_ID);
printf("NetAiitJoin end. \n");
// 6.Point to point sending data to gateway
int i = 0;
while (i < pkg_count)
{
char data[120] = {0};
sprintf(data, "***** I am %s, data_num = %d ******" ,client_name, i);
bool v = false;
padapter->done.NetAiitSend(padapter, data, strlen(data) + 1, true, 10000, 0, invert_param, &v, NULL);
while (!v) // Asynchronous analog synchronization
{
UserTaskDelay(100);
}
printf("send success(main thread)... %s\n" ,data);
i++;
UserTaskDelay(800); // Contract interval
}
printf("all pkg send success(main thread), quit.\n");
padapter->done.NetAiitClose(padapter);
printf("client quit.\n");
}

63
APP_Framework/Applications/connection_app/adhoc_lora_demo/gateway.c

@ -1,63 +0,0 @@
#include <user_api.h>
#include <string.h>
#include <xs_klist.h>
#include <xs_adapter_lora.h>
#include <xs_adapter_manager.h>
extern DoubleLinklistType online_user_head;
void net_lora_gateway(int argc, char *argv[])
{
// 1.New specific agreement (LORA) adapter
static struct AdapterLora lora_adapter;
memset(&lora_adapter, 0, sizeof(lora_adapter));
struct AdapterDone lora_example_done = {
.NetAiitOpen = LoraAdapterOpen,
.NetAiitClose = NULL,
.NetAiitSend = NULL,
.NetAiitReceive = LoraAdapterReceive,
.NetAiitJoin = LoraAdapterJoin,
.NetAiitIoctl = NULL,
};
lora_adapter.parent.done = lora_example_done; // Bind adapter operation
lora_adapter.name = "lora_dev_456"; // Set adapter name
lora_adapter.spi_lora_fd = -1; // Set adapter information
lora_adapter.deve_ui = "xxx";
lora_adapter.app_key = "yyy";
// 2.Register the adapter in the list
LoraAdapterInit();
LoraAdapterRegister((adapter_t)&lora_adapter);
// 3.Find from the list of registered adapters
adapter_t padapter = LoraAdapterFind("lora_dev_456");
if (NONE == padapter)
{
printf("adapter find failed!\n");
return;
}
// 4.Open adapter
if (0 != padapter->done.NetAiitOpen(padapter))
{
printf("adapter open failed!\n");
return;
}
// 5.Join the specified network segment as gateway
padapter->done.NetAiitJoin(padapter, ROLE_TYPE_MASTER, CONNECTION_COMMUNICATION_LORA_NET_ID);
}
static void net_lora_connectedlist(int argc, char *argv[])
{
DoubleLinklistType* pNode;
printf("******** connected users *********\n");
DOUBLE_LINKLIST_FOR_EACH(pNode, &online_user_head)
{
OnlineUser* pUser =CONTAINER_OF(pNode, OnlineUser, link);
printf("%s\n", pUser->user_name);
}
printf("*********************************\n");
}

3
APP_Framework/Applications/connection_app/bluetooth_demo/Makefile

@ -1,3 +0,0 @@
SRC_FILES := bluetooth_receive_demo.c bluetooth_send_demo.c
# zigbee_send_demo.c zigbee_receive_demo.c
include $(KERNEL_ROOT)/compiler.mk

88
APP_Framework/Applications/connection_app/bluetooth_demo/bluetooth_receive_demo.c

@ -1,88 +0,0 @@
/*
* Copyright (c) 2020 AIIT XUOS Lab
* XiUOS is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
/**
* @file: bluetooth_receive_demo.c
* @brief: using bluetooth to receive message
* @version: 1.0
* @author: AIIT XUOS Lab
* @date: 2021/4/30
*
*/
#include <xs_adapter_bluetooth.h>
#include <string.h>
#include <xs_klist.h>
#include <xs_adapter_manager.h>
#include <user_api.h>
#include <string.h>
static int re_sem;
static int buff_sem;
/*Critical zone protection function for*/
void BluetoothWait(char *rev_buffer)
{
while(1){
if (strlen(rev_buffer)>1){
UserSemaphoreAbandon(re_sem);
break;
}
}
}
/* receive message from another bluetooth device*/
void BluetoothReceiveDemo(int argc, char *argv[])
{
adapter_t padapter = BluetoothAdapterFind("Bluetooth");
if (NONE == padapter){
KPrintf("adapter find failed!\n");
return;
}
/*Open adapter*/
if (0 != padapter->done.NetAiitOpen(padapter)){
KPrintf("adapter open failed!\n");
return;
}
char rev_buffer[NAME_NUM_MAX];
/* Initialize semaphore */
re_sem = UserSemaphoreCreate(0);
/* receive buffer from serial port */
padapter->done.NetAiitReceive(padapter,rev_buffer,strlen(rev_buffer),10000,false,NULL);
BluetoothWait(rev_buffer);
UserSemaphoreObtain(re_sem,-1);
printf("\n");
for (int i=0;i<strlen(rev_buffer);i++)
{
if(rev_buffer[i] != 0Xff)
printf("%c",rev_buffer[i]);
}
printf("\n");
}
#ifndef SEPARATE_COMPILE
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN),
BluetoothReceiveDemo, BluetoothReceiveDemo, bluetooth receive function );
#endif

65
APP_Framework/Applications/connection_app/bluetooth_demo/bluetooth_send_demo.c

@ -1,65 +0,0 @@
/*
* Copyright (c) 2020 AIIT XUOS Lab
* XiUOS is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
/**
* @file: bluetooth_send_demo.c
* @brief: using bluetooth to send message
* @version: 1.0
* @author: AIIT XUOS Lab
* @date: 2021/4/30
*
*/
#include <xs_adapter_bluetooth.h>
#include <string.h>
#include <xs_klist.h>
#include <xs_adapter_manager.h>
#include <string.h>
#include <user_api.h>
adapter_t padapter;
/* a demo function to send message through command line using bluetooth*/
/* first open bluetooth to start demo*/
void BluetoothOpenDemo()
{
/*Find from the list of registered adapters*/
// adapter_t padapter = BluetoothAdapterFind("Bluetoot");
padapter = BluetoothAdapterFind("Bluetooth");
if (NONE == padapter){
printf("adapter find failed!\n");
return;
}
/*Open adapter*/
if (0 != padapter->done.NetAiitOpen(padapter)){
printf("adapter open failed!\n");
return;
}
}
#ifndef SEPARATE_COMPILE
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN),
BluetoothOpenDemo, BluetoothOpenDemo, bluetooth send function );
#endif
void BluetoothSendDemo(int argc, char *argv[])
{
/*Find from the list of registered adapters*/
bool v = false;
padapter->done.NetAiitSend(padapter, argv[1], strlen(argv[1]) ,true,10000,0, NULL,&v,NULL);
}
#ifndef SEPARATE_COMPILE
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN),
BluetoothSendDemo, BluetoothSendDemo, bluetooth send function );
#endif

197
APP_Framework/Applications/connection_app/ethernet_demo/ethernet_demo.c

@ -1,197 +0,0 @@
/*
* Copyright (c) 2020 AIIT XUOS Lab
* XiUOS is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
/**
* @file ethernet_demo.c
* @brief Demo for ethernet function
* @version 1.0
* @author AIIT XUOS Lab
* @date 2021.04.22
*/
#include <string.h>
#include <user_api.h>
#include <xs_adapter_manager.h>
#include <xs_adapter_at_ethernet.h>
static bool opened = false;
void OpenEthernetMsg()
{
struct AdapterAT *at_adapter = ATAdapterFind(ETHERNET_ADAPTER_ID);
if (!at_adapter)
printf("ATAdapterFind failed .\n");
if (!opened){
opened = true;
at_adapter->parent.done.NetAiitOpen(&at_adapter->parent);
}
}
void SendEthernetMsg(int argc, char *argv[])
{
char ethernet_msg[128];
if (argc >= 1){
memset(ethernet_msg, 0, 128);
strncpy(ethernet_msg, argv[1], strlen(argv[1]));
printf("SendEthernetMsg(%s).\n", ethernet_msg);
}
struct AdapterAT *at_adapter = ATAdapterFind(ETHERNET_ADAPTER_ID);
if (!at_adapter)
printf("ATAdapterFind failed .\n");
if (!opened){
opened = true;
at_adapter->parent.done.NetAiitOpen(&at_adapter->parent);
}
at_adapter->parent.done.NetAiitSend(&at_adapter->parent, ethernet_msg, strlen(ethernet_msg), true, 1000, 0, NULL, NULL, NULL);
}
void RecvEthernetMsg()
{
char ethernet_recv_msg[128];
memset(ethernet_recv_msg, 0, sizeof(ethernet_recv_msg));
struct AdapterAT *at_adapter = ATAdapterFind(ETHERNET_ADAPTER_ID);
if (!at_adapter)
printf("ATAdapterFind failed .\n");
if (!opened){
opened = true;
at_adapter->parent.done.NetAiitOpen(&at_adapter->parent);
}
while (1){
memset(ethernet_recv_msg, 0, sizeof(ethernet_recv_msg));
if (EOK == at_adapter->parent.done.NetAiitReceive(&at_adapter->parent, ethernet_recv_msg, 128, 40000, true, NULL))
printf("ethernet_recv_msg (%s)\n", ethernet_recv_msg);
else
printf("ethernet_recv_msg failed .\n");
}
}
void DhcpEthernet()
{
struct AdapterAT *at_adapter = ATAdapterFind(ETHERNET_ADAPTER_ID);
if (!at_adapter)
printf("ATAdapterFind failed .\n");
printf("Waiting for msg...\n");
if (!opened){
opened = true;
at_adapter->parent.done.NetAiitOpen(&at_adapter->parent);
}
if (EOK != at_adapter->atdone.ATOperateDHCP(at_adapter, 1))
printf("EthernetNetstat failed \n");
}
void PingEthernet()
{
char ethernet_recv_msg[128];
memset(ethernet_recv_msg, 0, sizeof(ethernet_recv_msg));
struct AdapterAT *at_adapter = ATAdapterFind(ETHERNET_ADAPTER_ID);
if (!at_adapter)
printf("ATAdapterFind failed .\n");
printf("Waiting for msg...\n");
struct PingResult result;
char *ip_str = "192.168.250.250";
if (!opened){
opened = true;
at_adapter->parent.done.NetAiitOpen(&at_adapter->parent);
}
if (EOK == at_adapter->atdone.ATPing(at_adapter, ip_str, &result))
printf("EthernetPing success (%s)\n", result.ip_addr.ipv4);
else
printf("EthernetPing failed \n");
}
void SetUpEthernet()
{
char ethernet_recv_msg[128];
memset(ethernet_recv_msg, 0, sizeof(ethernet_recv_msg));
struct AdapterAT *at_adapter = ATAdapterFind(ETHERNET_ADAPTER_ID);
if (!at_adapter)
printf("ATAdapterFind failed .\n");
printf("Waiting for msg...\n");
struct PingResult result;
if (!opened){
opened = true;
at_adapter->parent.done.NetAiitOpen(&at_adapter->parent);
}
if (EOK == at_adapter->atdone.ATOperateUp(at_adapter))
printf("EthernetSetUp success (%s)\n", result.ip_addr.ipv4);
else
printf("EthernetSetUp failed \n");
}
void NetstatEthernet()
{
struct AdapterAT *at_adapter = ATAdapterFind(ETHERNET_ADAPTER_ID);
if (!at_adapter)
printf("ATAdapterFind failed .\n");
printf("Waiting for msg...\n");
if (!opened){
opened = true;
at_adapter->parent.done.NetAiitOpen(&at_adapter->parent);
}
if (EOK != at_adapter->atdone.ATNetstat(at_adapter))
printf("EthernetNetstat failed \n");
}
void AtTestCmdEthernet(int argc, char *argv[])
{
char cmd[64];
if (argc >= 1){
memset(cmd, 0, sizeof(cmd));
strncpy(cmd, argv[1], strlen(argv[1]));
printf("AT cmd send(%s).\n", cmd);
}
strcat(cmd,"\r");
struct AdapterAT* at_adapter = ATAdapterFind(ETHERNET_ADAPTER_ID);
if (!opened){
opened = true;
at_adapter->parent.done.NetAiitOpen(&at_adapter->parent);
}
printf("Waiting for msg...\n");
// Send hfa21 handshake, start cmd mode.
ATOrderSend(at_adapter->agent, REPLY_TIME_OUT, NULL, "+++");
UserTaskDelay(100);
ATOrderSend(at_adapter->agent, REPLY_TIME_OUT, NULL, "a");
UserTaskDelay(2500);
ATOrderSend(at_adapter->agent,REPLY_TIME_OUT, NULL,cmd);
UserTaskDelay(2500);
ATOrderSend(at_adapter->agent,REPLY_TIME_OUT, NULL,"AT+Z\r");
UserTaskDelay(5000);
}

56
APP_Framework/Applications/connection_app/nbiot_demo/nbiot_demo.c

@ -1,56 +0,0 @@
/*
* Copyright (c) 2020 AIIT XUOS Lab
* XiUOS is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
/**
* @file nbiot_demo.c
* @brief Demo for NBIoT function
* @version 1.0
* @author AIIT XUOS Lab
* @date 2021.04.22
*/
#include <string.h>
#include <user_api.h>
#include <xs_adapter_at_agent.h>
#include <xs_adapter_manager.h>
#include <xs_adapter_at_nbiot.h>
extern void RegisterAdapterNBIoT(void);
void NbiotEnable(void)
{
struct AdapterAT* at_adapter = ATAdapterFind(NBIOT_ADAPTER_ID);
UserTaskDelay(5000);
at_adapter->parent.done.NetAiitOpen(&at_adapter->parent);
printf("Waiting for msg...\n");
at_adapter->atdone.ATSocketCreate(at_adapter, 1, SOCKET_TYPE_STREAM, NET_TYPE_AF_INET);
UserTaskDelay(1000);
struct AddressIpv4 addr;
addr.ipv4 = IpTint("115.236.53.226");
at_adapter->atdone.ATSocketConnect(at_adapter, 1, addr, 8989, 0);
int socket_fd = 1;
int count = 0;
while (1) {
UserTaskDelay(1000);
at_adapter->parent.done.NetAiitSend((struct Adapter *)at_adapter, "AB30313233", 5, 0, 0, 0, 0, 0, &socket_fd);
count++;
if (count == 10)
break;
}
}

3
APP_Framework/Applications/connection_app/socket_demo/Makefile

@ -0,0 +1,3 @@
SRC_FILES := lwip_tcp_socket_demo.c lwip_udp_socket_demo.c
include $(KERNEL_ROOT)/compiler.mk

200
APP_Framework/Applications/connection_app/socket_demo/lwip_tcp_socket_demo.c

@ -0,0 +1,200 @@
/*
* Copyright (c) 2020 AIIT XUOS Lab
* XiUOS is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at: