From d41517ab906751f8daba08162194528dc3914f1d Mon Sep 17 00:00:00 2001 From: Liu_Weichao Date: Fri, 25 Jun 2021 10:20:55 +0800 Subject: [PATCH] add connection function --- .../general_functions/list/list.h | 4 +- APP_Framework/Framework/connection/4G/Kconfig | 0 .../Framework/connection/4G/Makefile | 3 + .../Framework/connection/4G/adapter_4G.c | 20 +++ APP_Framework/Framework/connection/5G/Kconfig | 0 .../Framework/connection/5G/Makefile | 3 + .../Framework/connection/5G/adapter_5G.c | 20 +++ APP_Framework/Framework/connection/Kconfig | 60 +++++++- APP_Framework/Framework/connection/Makefile | 32 ++++ APP_Framework/Framework/connection/adapter.c | 138 ++++++++++++++++-- APP_Framework/Framework/connection/adapter.h | 62 +++++++- .../Framework/connection/bluetooth/Kconfig | 0 .../Framework/connection/bluetooth/Makefile | 3 + .../connection/bluetooth/adapter_bluetooth.c | 19 +++ .../Framework/connection/ethernet/Kconfig | 0 .../Framework/connection/ethernet/Makefile | 3 + .../connection/ethernet/adapter_ethernet.c | 19 +++ .../Framework/connection/lora/Kconfig | 0 .../Framework/connection/lora/Makefile | 3 + .../Framework/connection/lora/adapter_lora.c | 19 +++ .../Framework/connection/nbiot/Kconfig | 0 .../Framework/connection/nbiot/Makefile | 3 + .../connection/nbiot/adapter_nbiot.c | 19 +++ .../Framework/connection/wifi/Kconfig | 0 .../Framework/connection/wifi/Makefile | 3 + .../Framework/connection/wifi/adapter_wifi.c | 19 +++ .../Framework/connection/zigbee/Kconfig | 0 .../Framework/connection/zigbee/Makefile | 3 + .../connection/zigbee/adapter_zigbee.c | 19 +++ 29 files changed, 452 insertions(+), 22 deletions(-) create mode 100644 APP_Framework/Framework/connection/4G/Kconfig create mode 100644 APP_Framework/Framework/connection/4G/Makefile create mode 100644 APP_Framework/Framework/connection/4G/adapter_4G.c create mode 100644 APP_Framework/Framework/connection/5G/Kconfig create mode 100644 APP_Framework/Framework/connection/5G/Makefile create mode 100644 APP_Framework/Framework/connection/5G/adapter_5G.c create mode 100644 APP_Framework/Framework/connection/bluetooth/Kconfig create mode 100644 APP_Framework/Framework/connection/bluetooth/Makefile create mode 100644 APP_Framework/Framework/connection/bluetooth/adapter_bluetooth.c create mode 100644 APP_Framework/Framework/connection/ethernet/Kconfig create mode 100644 APP_Framework/Framework/connection/ethernet/Makefile create mode 100644 APP_Framework/Framework/connection/ethernet/adapter_ethernet.c create mode 100644 APP_Framework/Framework/connection/lora/Kconfig create mode 100644 APP_Framework/Framework/connection/lora/Makefile create mode 100644 APP_Framework/Framework/connection/lora/adapter_lora.c create mode 100644 APP_Framework/Framework/connection/nbiot/Kconfig create mode 100644 APP_Framework/Framework/connection/nbiot/Makefile create mode 100644 APP_Framework/Framework/connection/nbiot/adapter_nbiot.c create mode 100644 APP_Framework/Framework/connection/wifi/Kconfig create mode 100644 APP_Framework/Framework/connection/wifi/Makefile create mode 100644 APP_Framework/Framework/connection/wifi/adapter_wifi.c create mode 100644 APP_Framework/Framework/connection/zigbee/Kconfig create mode 100644 APP_Framework/Framework/connection/zigbee/Makefile create mode 100644 APP_Framework/Framework/connection/zigbee/adapter_zigbee.c diff --git a/APP_Framework/Applications/general_functions/list/list.h b/APP_Framework/Applications/general_functions/list/list.h index 5fc8a26e..ebc0c9c1 100644 --- a/APP_Framework/Applications/general_functions/list/list.h +++ b/APP_Framework/Applications/general_functions/list/list.h @@ -11,11 +11,11 @@ */ /** -* @file: xs_klist.h +* @file: list.h * @brief: function declaration and structure defintion of list * @version: 1.0 * @author: AIIT XUOS Lab -* @date: 2020/3/2 +* @date: 2021/6/23 * */ diff --git a/APP_Framework/Framework/connection/4G/Kconfig b/APP_Framework/Framework/connection/4G/Kconfig new file mode 100644 index 00000000..e69de29b diff --git a/APP_Framework/Framework/connection/4G/Makefile b/APP_Framework/Framework/connection/4G/Makefile new file mode 100644 index 00000000..b70e80a0 --- /dev/null +++ b/APP_Framework/Framework/connection/4G/Makefile @@ -0,0 +1,3 @@ +SRC_FILES := adapter_4G.c + +include $(KERNEL_ROOT)/compiler.mk \ No newline at end of file diff --git a/APP_Framework/Framework/connection/4G/adapter_4G.c b/APP_Framework/Framework/connection/4G/adapter_4G.c new file mode 100644 index 00000000..5631add4 --- /dev/null +++ b/APP_Framework/Framework/connection/4G/adapter_4G.c @@ -0,0 +1,20 @@ +/* +* 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 adapter_4G.c + * @brief Implement the connection 4G adapter function + * @version 1.1 + * @author AIIT XUOS Lab + * @date 2021.06.25 + */ + diff --git a/APP_Framework/Framework/connection/5G/Kconfig b/APP_Framework/Framework/connection/5G/Kconfig new file mode 100644 index 00000000..e69de29b diff --git a/APP_Framework/Framework/connection/5G/Makefile b/APP_Framework/Framework/connection/5G/Makefile new file mode 100644 index 00000000..9ce9e188 --- /dev/null +++ b/APP_Framework/Framework/connection/5G/Makefile @@ -0,0 +1,3 @@ +SRC_FILES := adapter_5G.c + +include $(KERNEL_ROOT)/compiler.mk diff --git a/APP_Framework/Framework/connection/5G/adapter_5G.c b/APP_Framework/Framework/connection/5G/adapter_5G.c new file mode 100644 index 00000000..ff5ff194 --- /dev/null +++ b/APP_Framework/Framework/connection/5G/adapter_5G.c @@ -0,0 +1,20 @@ +/* +* 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 adapter_5G.c + * @brief Implement the connection 5G adapter function + * @version 1.1 + * @author AIIT XUOS Lab + * @date 2021.06.25 + */ + diff --git a/APP_Framework/Framework/connection/Kconfig b/APP_Framework/Framework/connection/Kconfig index b36b4799..386ab61d 100644 --- a/APP_Framework/Framework/connection/Kconfig +++ b/APP_Framework/Framework/connection/Kconfig @@ -1,3 +1,61 @@ menuconfig SUPPORT_CONNECTION_FRAMEWORK bool "support connection framework" - default n \ No newline at end of file + default n + +if SUPPORT_CONNECTION_FRAMEWORK + menuconfig ADAPTER_LORA + bool "Using lora adapter device" + default n + if ADAPTER_LORA + source "$APP_DIR/Framework/connection/lora/Kconfig" + endif + + menuconfig ADAPTER_4G + bool "Using 4G adapter device" + default n + if ADAPTER_4G + source "$APP_DIR/Framework/connection/4G/Kconfig" + endif + + menuconfig ADAPTER_NB + bool "Using nbiot adapter device" + default n + if ADAPTER_NB + source "$APP_DIR/Framework/connection/nbiot/Kconfig" + endif + + menuconfig ADAPTER_WIFI + bool "Using wifi adapter device" + default n + if ADAPTER_WIFI + source "$APP_DIR/Framework/connection/wifi/Kconfig" + endif + + menuconfig ADAPTER_ETHERNET + bool "Using ethernet adapter device" + default n + if ADAPTER_ETHERNET + source "$APP_DIR/Framework/connection/ethernet/Kconfig" + endif + + menuconfig ADAPTER_BLUETOOTH + bool "Using bluetooth adapter device" + default n + if ADAPTER_BLUETOOTH + source "$APP_DIR/Framework/connection/bluetooth/Kconfig" + endif + + menuconfig ADAPTER_ZIGBEE + bool "Using zigbee adapter device" + default n + if ADAPTER_ZIGBEE + source "$APP_DIR/Framework/connection/zigbee/Kconfig" + endif + + menuconfig ADAPTER_5G + bool "Using 5G adapter device" + default n + if ADAPTER_5G + source "$APP_DIR/Framework/connection/5G/Kconfig" + endif +endif diff --git a/APP_Framework/Framework/connection/Makefile b/APP_Framework/Framework/connection/Makefile index 1e13f243..1dbe6153 100644 --- a/APP_Framework/Framework/connection/Makefile +++ b/APP_Framework/Framework/connection/Makefile @@ -1,3 +1,35 @@ SRC_FILES := adapter.c +ifeq ($(CONFIG_ADAPTER_LORA),y) + SRC_DIR += lora +endif + +ifeq ($(CONFIG_ADAPTER_4G),y) + SRC_DIR += 4G +endif + +ifeq ($(CONFIG_ADAPTER_NB),y) + SRC_DIR += nbiot +endif + +ifeq ($(CONFIG_ADAPTER_WIFI),y) + SRC_DIR += wifi +endif + +ifeq ($(CONFIG_ADAPTER_ETHERNET),y) + SRC_DIR += ethernet +endif + +ifeq ($(CONFIG_ADAPTER_BLUETOOTH),y) + SRC_DIR += bluetooth +endif + +ifeq ($(CONFIG_ADAPTER_ZIGBEE),y) + SRC_DIR += zigbee +endif + +ifeq ($(CONFIG_ADAPTER_5G),y) + SRC_DIR += 5G +endif + include $(KERNEL_ROOT)/compiler.mk \ No newline at end of file diff --git a/APP_Framework/Framework/connection/adapter.c b/APP_Framework/Framework/connection/adapter.c index 9bb19937..955f82dd 100644 --- a/APP_Framework/Framework/connection/adapter.c +++ b/APP_Framework/Framework/connection/adapter.c @@ -12,8 +12,8 @@ /** * @file adapter.c - * @brief Implement the communication adapter framework management and API - * @version 1.0 + * @brief Implement the connection adapter framework management and API + * @version 1.1 * @author AIIT XUOS Lab * @date 2021.05.10 */ @@ -46,7 +46,7 @@ int AdapterFrameworkInit(void) * @param name - name string * @return adapter device pointer */ -struct Adapter *AdapterDeviceFindByName(const char *name) +AdapterType AdapterDeviceFindByName(const char *name) { struct Adapter *ret = NULL; struct DoublelistNode *node; @@ -87,6 +87,8 @@ int AdapterDeviceRegister(struct Adapter *adapter) AppDoubleListInsertNodeAfter(&adapter_list, &adapter->link); PrivMutexAbandon(&adapter_list_lock); + adapter->adapter_status = REGISTERED; + return 0; } @@ -103,6 +105,8 @@ int AdapterDeviceUnregister(struct Adapter *adapter) AppDoubleListRmNode(&adapter->link); PrivMutexAbandon(&adapter_list_lock); + adapter->adapter_status = UNREGISTERED; + return 0; } @@ -116,6 +120,11 @@ int AdapterDeviceOpen(struct Adapter *adapter) if (!adapter) return -1; + if (INSTALL == adapter->adapter_status) { + printf("Device %s has already been opened. Just return\n", adapter->name); + return 0; + } + int result = 0; struct IpProtocolDone *ip_done = NULL; @@ -131,7 +140,8 @@ int AdapterDeviceOpen(struct Adapter *adapter) result = priv_done->open(adapter); if (0 == result) { printf("Device %s open success.\n", adapter->name); - }else{ + adapter->adapter_status = INSTALL; + } else { if (adapter->fd) { PrivClose(adapter->fd); adapter->fd = 0; @@ -148,7 +158,8 @@ int AdapterDeviceOpen(struct Adapter *adapter) result = ip_done->open(adapter); if (0 == result) { printf("Device %s open success.\n", adapter->name); - }else{ + adapter->adapter_status = INSTALL; + } else { if (adapter->fd) { PrivClose(adapter->fd); adapter->fd = 0; @@ -174,6 +185,11 @@ int AdapterDeviceClose(struct Adapter *adapter) if (!adapter) return -1; + if (UNINSTALL == adapter->adapter_status) { + printf("Device %s has already been closed. Just return\n", adapter->name); + return 0; + } + int result = 0; struct IpProtocolDone *ip_done = NULL; @@ -187,10 +203,12 @@ int AdapterDeviceClose(struct Adapter *adapter) return 0; result = priv_done->close(adapter); - if (0 == result) + if (0 == result) { printf("%s successfully closed.\n", adapter->name); - else + adapter->adapter_status = UNINSTALL; + } else { printf("Closed %s failure.\n", adapter->name); + } break; @@ -200,10 +218,12 @@ int AdapterDeviceClose(struct Adapter *adapter) return 0; result = ip_done->close(adapter); - if (0 == result) + if (0 == result) { printf("%s successfully closed.\n", adapter->name); - else + adapter->adapter_status = UNINSTALL; + } else { printf("Closed %s failure.\n", adapter->name); + } break; default: @@ -214,13 +234,13 @@ int AdapterDeviceClose(struct Adapter *adapter) } /** - * @description: Read data from adapter + * @description: Receice data from adapter * @param adapter - adapter device pointer * @param dst - buffer to save data * @param len - buffer length * @return gotten data length */ -ssize_t AdapterDeviceRead(struct Adapter *adapter, void *dst, size_t len) +ssize_t AdapterDeviceRecv(struct Adapter *adapter, void *dst, size_t len) { if (!adapter) return -1; @@ -240,19 +260,19 @@ ssize_t AdapterDeviceRead(struct Adapter *adapter, void *dst, size_t len) return ip_done->recv(adapter->socket, dst, len); } else { - printf("AdapterDeviceRead net_protocol %d not support\n", adapter->net_protocol); + printf("AdapterDeviceRecv net_protocol %d not support\n", adapter->net_protocol); return -1; } } /** - * @description: Write data to adapter + * @description: Send data to adapter * @param adapter - adapter device pointer * @param src - data buffer * @param len - data length * @return length of data written */ -ssize_t AdapterDeviceWrite(struct Adapter *adapter, const void *src, size_t len) +ssize_t AdapterDeviceSend(struct Adapter *adapter, const void *src, size_t len) { if (!adapter) return -1; @@ -272,13 +292,13 @@ ssize_t AdapterDeviceWrite(struct Adapter *adapter, const void *src, size_t len) return ip_done->send(adapter->socket, src, len); } else { - printf("AdapterDeviceWrite net_protocol %d not support\n", adapter->net_protocol); + printf("AdapterDeviceSend net_protocol %d not support\n", adapter->net_protocol); return -1; } } /** - * @description: Configure adapter + * @description: Configure adapter device * @param adapter - adapter device pointer * @param cmd - command * @param args - command parameter @@ -308,3 +328,89 @@ int AdapterDeviceControl(struct Adapter *adapter, int cmd, void *args) return -1; } } + +/** + * @description: Connect to a certain ip net, only support IP_PROTOCOL + * @param adapter - adapter device pointer + * @param ip - connect ip + * @param port - connect port + * @param ip_type - ip type, IPV4 or IPV6 + * @return success: 0 , failure: other + */ +int AdapterDeviceConnect(struct Adapter *adapter, const char *ip, const char *port, enum IpType ip_type) +{ + if (!adapter) + return -1; + + if (PRIVATE_PROTOCOL == adapter->net_protocol) { + printf("AdapterDeviceConnect not suuport private_protocol, please use join\n"); + return -1; + } else if (IP_PROTOCOL == adapter->net_protocol) { + struct IpProtocolDone *ip_done = (struct IpProtocolDone *)adapter->done; + + if (NULL == ip_done->connect) + return -1; + + return ip_done->connect(adapter, ip, port, ip_type); + } else { + printf("AdapterDeviceConnect net_protocol %d not support\n", adapter->net_protocol); + return -1; + } +} + +/** + * @description: Join to a certain private net, only support PRIVATE_PROTOCOL + * @param adapter - adapter device pointer + * @param priv_net_group - private net group + * @return success: 0 , failure: other + */ +int AdapterDeviceJoin(struct Adapter *adapter, const char *priv_net_group) +{ + if (!adapter) + return -1; + + if (PRIVATE_PROTOCOL == adapter->net_protocol) { + struct PrivProtocolDone *priv_done = (struct PrivProtocolDone *)adapter->done; + + if (NULL == priv_done->join) + return -1; + + return priv_done->join(adapter, priv_net_group); + } else if (IP_PROTOCOL == adapter->net_protocol) { + printf("AdapterDeviceJoin not suuport ip_protocol, please use connect\n"); + return -1; + } else { + printf("AdapterDeviceJoin net_protocol %d not support\n", adapter->net_protocol); + return -1; + } +} + +/** + * @description: Adapter disconnect from ip net or private net group + * @param adapter - adapter device pointer + * @return success: 0 , failure: other + */ +int AdapterDeviceDisconnect(struct Adapter *adapter) +{ + if (!adapter) + return -1; + + if (PRIVATE_PROTOCOL == adapter->net_protocol) { + struct PrivProtocolDone *priv_done = (struct PrivProtocolDone *)adapter->done; + + if (NULL == priv_done->disconnect) + return -1; + + return priv_done->disconnect(adapter); + } else if (IP_PROTOCOL == adapter->net_protocol) { + struct IpProtocolDone *ip_done = (struct IpProtocolDone *)adapter->done; + + if (NULL == ip_done->disconnect) + return -1; + + return ip_done->disconnect(adapter->socket); + } else { + printf("AdapterDeviceDisconnect net_protocol %d not support\n", adapter->net_protocol); + return -1; + } +} diff --git a/APP_Framework/Framework/connection/adapter.h b/APP_Framework/Framework/connection/adapter.h index d66b9fc6..e802032a 100644 --- a/APP_Framework/Framework/connection/adapter.h +++ b/APP_Framework/Framework/connection/adapter.h @@ -12,8 +12,8 @@ /** * @file adapter.h - * @brief Structure and function declarations of the communication adapter framework - * @version 1.0 + * @brief Structure and function declarations of the connection adapter framework + * @version 1.1 * @author AIIT XUOS Lab * @date 2021.05.10 */ @@ -30,6 +30,10 @@ #define ADAPTER_BUFFSIZE 64 +#define ADAPTER_AT_OPERATION 1 +#define ADAPTER_LWIP_OPERATION 2 +#define ADAPTER_RAWIP_OPERATION 3 + #define ADAPTER_LORA_FUNC ((uint32_t)(1 << ATAPTER_LORA)) #define ADAPTER_4G_FUNC ((uint32_t)(1 << ADAPTER_4G)) #define ADAPTER_NBIOT_FUNC ((uint32_t)(1 << ADAPTER_NBIOT)) @@ -40,6 +44,7 @@ #define ADAPTER_5G_FUNC ((uint32_t)(1 << ADAPTER_5G)) struct Adapter; +typedef struct Adapter *AdapterType; struct Socket { @@ -73,6 +78,20 @@ enum NetRoleType ROLE_NONE, }; +enum AdapterStatus +{ + REGISTERED = 1, + UNREGISTERED, + INSTALL, + UNINSTALL, +}; + +enum IpType +{ + IPV4 = 1, + IPV6, +}; + struct AdapterProductInfo { uint32_t functions; @@ -85,7 +104,7 @@ struct IpProtocolDone int (*open)(struct Adapter *adapter); int (*close)(struct Adapter *adapter); int (*ioctl)(struct Adapter *adapter, int cmd, void *args); - int (*connect)(struct Adapter *adapter, const char *ip, const char *port, uint8_t ip_type); + int (*connect)(struct Adapter *adapter, const char *ip, const char *port, enum IpType ip_type); int (*send)(struct Socket *socket, const void *buf, size_t len); int (*recv)(struct Socket *socket, void *buf, size_t len); int (*disconnect)(struct Socket *socket); @@ -112,6 +131,7 @@ struct Adapter enum NetProtocolType net_protocol; enum NetRoleType net_role; + enum AdapterStatus adapter_status; char buffer[ADAPTER_BUFFSIZE]; @@ -120,4 +140,40 @@ struct Adapter struct DoublelistNode link; }; +/*Init adapter framework*/ +int AdapterFrameworkInit(void); + +/*Find adapter device by name*/ +AdapterType AdapterDeviceFindByName(const char *name); + +/*Register the adapter to the linked list*/ +int AdapterDeviceRegister(struct Adapter *adapter); + +/*Unregister the adapter from the linked list*/ +int AdapterDeviceUnregister(struct Adapter *adapter); + +/*Open adapter device*/ +int AdapterDeviceOpen(struct Adapter *adapter); + +/*Close adapter device*/ +int AdapterDeviceClose(struct Adapter *adapter); + +/*Receice data from adapter*/ +ssize_t AdapterDeviceRecv(struct Adapter *adapter, void *dst, size_t len); + +/*Send data to adapter*/ +ssize_t AdapterDeviceSend(struct Adapter *adapter, const void *src, size_t len); + +/*Configure adapter device*/ +int AdapterDeviceControl(struct Adapter *adapter, int cmd, void *args); + +/*Connect to a certain ip net, only support IP_PROTOCOL*/ +int AdapterDeviceConnect(struct Adapter *adapter, const char *ip, const char *port, enum IpType ip_type); + +/*Join to a certain private net, only support PRIVATE_PROTOCOL*/ +int AdapterDeviceJoin(struct Adapter *adapter, const char *priv_net_group); + +/*Adapter disconnect from ip net or private net group*/ +int AdapterDeviceDisconnect(struct Adapter *adapter); + #endif \ No newline at end of file diff --git a/APP_Framework/Framework/connection/bluetooth/Kconfig b/APP_Framework/Framework/connection/bluetooth/Kconfig new file mode 100644 index 00000000..e69de29b diff --git a/APP_Framework/Framework/connection/bluetooth/Makefile b/APP_Framework/Framework/connection/bluetooth/Makefile new file mode 100644 index 00000000..6e3fbfbc --- /dev/null +++ b/APP_Framework/Framework/connection/bluetooth/Makefile @@ -0,0 +1,3 @@ +SRC_FILES := adapter_bluetooth.c + +include $(KERNEL_ROOT)/compiler.mk diff --git a/APP_Framework/Framework/connection/bluetooth/adapter_bluetooth.c b/APP_Framework/Framework/connection/bluetooth/adapter_bluetooth.c new file mode 100644 index 00000000..9ac60d27 --- /dev/null +++ b/APP_Framework/Framework/connection/bluetooth/adapter_bluetooth.c @@ -0,0 +1,19 @@ +/* +* 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 adapter_bluetooth.c + * @brief Implement the connection bluetooth adapter function + * @version 1.1 + * @author AIIT XUOS Lab + * @date 2021.06.25 + */ diff --git a/APP_Framework/Framework/connection/ethernet/Kconfig b/APP_Framework/Framework/connection/ethernet/Kconfig new file mode 100644 index 00000000..e69de29b diff --git a/APP_Framework/Framework/connection/ethernet/Makefile b/APP_Framework/Framework/connection/ethernet/Makefile new file mode 100644 index 00000000..39f3cab4 --- /dev/null +++ b/APP_Framework/Framework/connection/ethernet/Makefile @@ -0,0 +1,3 @@ +SRC_FILES := adapter_ethernet.c + +include $(KERNEL_ROOT)/compiler.mk diff --git a/APP_Framework/Framework/connection/ethernet/adapter_ethernet.c b/APP_Framework/Framework/connection/ethernet/adapter_ethernet.c new file mode 100644 index 00000000..560973ff --- /dev/null +++ b/APP_Framework/Framework/connection/ethernet/adapter_ethernet.c @@ -0,0 +1,19 @@ +/* +* 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 adapter_ethernet.c + * @brief Implement the connection ethernet adapter function + * @version 1.1 + * @author AIIT XUOS Lab + * @date 2021.06.25 + */ diff --git a/APP_Framework/Framework/connection/lora/Kconfig b/APP_Framework/Framework/connection/lora/Kconfig new file mode 100644 index 00000000..e69de29b diff --git a/APP_Framework/Framework/connection/lora/Makefile b/APP_Framework/Framework/connection/lora/Makefile new file mode 100644 index 00000000..91779a06 --- /dev/null +++ b/APP_Framework/Framework/connection/lora/Makefile @@ -0,0 +1,3 @@ +SRC_FILES := adapter_lora.c + +include $(KERNEL_ROOT)/compiler.mk diff --git a/APP_Framework/Framework/connection/lora/adapter_lora.c b/APP_Framework/Framework/connection/lora/adapter_lora.c new file mode 100644 index 00000000..7a2af445 --- /dev/null +++ b/APP_Framework/Framework/connection/lora/adapter_lora.c @@ -0,0 +1,19 @@ +/* +* 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 adapter_lora.c + * @brief Implement the connection lora adapter function + * @version 1.1 + * @author AIIT XUOS Lab + * @date 2021.06.25 + */ diff --git a/APP_Framework/Framework/connection/nbiot/Kconfig b/APP_Framework/Framework/connection/nbiot/Kconfig new file mode 100644 index 00000000..e69de29b diff --git a/APP_Framework/Framework/connection/nbiot/Makefile b/APP_Framework/Framework/connection/nbiot/Makefile new file mode 100644 index 00000000..3dc3423a --- /dev/null +++ b/APP_Framework/Framework/connection/nbiot/Makefile @@ -0,0 +1,3 @@ +SRC_FILES := adapter_nbiot.c + +include $(KERNEL_ROOT)/compiler.mk diff --git a/APP_Framework/Framework/connection/nbiot/adapter_nbiot.c b/APP_Framework/Framework/connection/nbiot/adapter_nbiot.c new file mode 100644 index 00000000..04f98462 --- /dev/null +++ b/APP_Framework/Framework/connection/nbiot/adapter_nbiot.c @@ -0,0 +1,19 @@ +/* +* 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 adapter_nbiot.c + * @brief Implement the connection nbiot adapter function + * @version 1.1 + * @author AIIT XUOS Lab + * @date 2021.06.25 + */ diff --git a/APP_Framework/Framework/connection/wifi/Kconfig b/APP_Framework/Framework/connection/wifi/Kconfig new file mode 100644 index 00000000..e69de29b diff --git a/APP_Framework/Framework/connection/wifi/Makefile b/APP_Framework/Framework/connection/wifi/Makefile new file mode 100644 index 00000000..e6507100 --- /dev/null +++ b/APP_Framework/Framework/connection/wifi/Makefile @@ -0,0 +1,3 @@ +SRC_FILES := adapter_wifi.c + +include $(KERNEL_ROOT)/compiler.mk diff --git a/APP_Framework/Framework/connection/wifi/adapter_wifi.c b/APP_Framework/Framework/connection/wifi/adapter_wifi.c new file mode 100644 index 00000000..d05c587b --- /dev/null +++ b/APP_Framework/Framework/connection/wifi/adapter_wifi.c @@ -0,0 +1,19 @@ +/* +* 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 adapter_wifi.c + * @brief Implement the connection wifi adapter function + * @version 1.1 + * @author AIIT XUOS Lab + * @date 2021.06.25 + */ diff --git a/APP_Framework/Framework/connection/zigbee/Kconfig b/APP_Framework/Framework/connection/zigbee/Kconfig new file mode 100644 index 00000000..e69de29b diff --git a/APP_Framework/Framework/connection/zigbee/Makefile b/APP_Framework/Framework/connection/zigbee/Makefile new file mode 100644 index 00000000..0311fe30 --- /dev/null +++ b/APP_Framework/Framework/connection/zigbee/Makefile @@ -0,0 +1,3 @@ +SRC_FILES := adapter_zigbee.c + +include $(KERNEL_ROOT)/compiler.mk diff --git a/APP_Framework/Framework/connection/zigbee/adapter_zigbee.c b/APP_Framework/Framework/connection/zigbee/adapter_zigbee.c new file mode 100644 index 00000000..102830bf --- /dev/null +++ b/APP_Framework/Framework/connection/zigbee/adapter_zigbee.c @@ -0,0 +1,19 @@ +/* +* 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 adapter_zigbee.c + * @brief Implement the connection zigbee adapter function + * @version 1.1 + * @author AIIT XUOS Lab + * @date 2021.06.25 + */