From 06c9c6ecc4967ffa32bb2d8a7da39585e72e03e8 Mon Sep 17 00:00:00 2001 From: Liu_Weichao Date: Fri, 15 Oct 2021 11:05:36 +0800 Subject: [PATCH] refactor connection directory to follow code standards --- APP_Framework/Framework/connection/{4G => 4g}/Kconfig | 2 +- APP_Framework/Framework/connection/{4G => 4g}/Makefile | 4 ++-- .../connection/{4G/adapter_4G.c => 4g/adapter_4g.c} | 0 .../Framework/connection/{4G/EC200T => 4g/ec200t}/Kconfig | 0 .../Framework/connection/{4G/EC200T => 4g/ec200t}/Makefile | 0 .../Framework/connection/{4G/EC200T => 4g/ec200t}/ec200t.c | 0 APP_Framework/Framework/connection/{5G => 5g}/Kconfig | 0 .../Framework/connection/{wifi/HFA21 => 5g}/Makefile | 2 +- .../connection/{5G/adapter_5G.c => 5g/adapter_5g.c} | 2 +- APP_Framework/Framework/connection/Kconfig | 4 ++-- APP_Framework/Framework/connection/Makefile | 4 ++-- APP_Framework/Framework/connection/bluetooth/Kconfig | 2 +- APP_Framework/Framework/connection/bluetooth/Makefile | 2 +- .../Framework/connection/bluetooth/{HC08 => hc08}/Kconfig | 0 .../Framework/connection/bluetooth/{HC08 => hc08}/Makefile | 0 .../Framework/connection/bluetooth/{HC08 => hc08}/hc08.c | 0 .../Framework/connection/lora/{SX1278 => sx1278}/Kconfig | 0 .../Framework/connection/lora/{SX1278 => sx1278}/Makefile | 0 .../Framework/connection/lora/{SX1278 => sx1278}/sx1278.c | 0 .../Framework/connection/nbiot/{BC28 => bc28}/Kconfig | 0 .../Framework/connection/nbiot/{BC28 => bc28}/Makefile | 0 .../Framework/connection/nbiot/{BC28 => bc28}/bc28.c | 0 APP_Framework/Framework/connection/wifi/Kconfig | 6 +++--- APP_Framework/Framework/connection/wifi/Makefile | 4 ++-- APP_Framework/Framework/connection/wifi/adapter_wifi.c | 4 ++-- .../Framework/connection/wifi/{HFA21 => hfa21_wifi}/Kconfig | 4 ++-- .../Framework/connection/{5G => wifi/hfa21_wifi}/Makefile | 2 +- .../wifi/{HFA21/hfa21.c => hfa21_wifi/hfa21_wifi.c} | 0 APP_Framework/Framework/connection/zigbee/Kconfig | 2 +- APP_Framework/Framework/connection/zigbee/Makefile | 2 +- .../Framework/connection/zigbee/{E18 => e18}/Kconfig | 0 .../Framework/connection/zigbee/{E18 => e18}/Makefile | 0 .../Framework/connection/zigbee/{E18 => e18}/e18.c | 0 .../Framework/connection/zigbee/{E18 => e18}/e18.h | 0 34 files changed, 23 insertions(+), 23 deletions(-) rename APP_Framework/Framework/connection/{4G => 4g}/Kconfig (67%) rename APP_Framework/Framework/connection/{4G => 4g}/Makefile (62%) rename APP_Framework/Framework/connection/{4G/adapter_4G.c => 4g/adapter_4g.c} (100%) rename APP_Framework/Framework/connection/{4G/EC200T => 4g/ec200t}/Kconfig (100%) rename APP_Framework/Framework/connection/{4G/EC200T => 4g/ec200t}/Makefile (100%) rename APP_Framework/Framework/connection/{4G/EC200T => 4g/ec200t}/ec200t.c (100%) rename APP_Framework/Framework/connection/{5G => 5g}/Kconfig (100%) rename APP_Framework/Framework/connection/{wifi/HFA21 => 5g}/Makefile (58%) mode change 100755 => 100644 rename APP_Framework/Framework/connection/{5G/adapter_5G.c => 5g/adapter_5g.c} (96%) rename APP_Framework/Framework/connection/bluetooth/{HC08 => hc08}/Kconfig (100%) rename APP_Framework/Framework/connection/bluetooth/{HC08 => hc08}/Makefile (100%) rename APP_Framework/Framework/connection/bluetooth/{HC08 => hc08}/hc08.c (100%) rename APP_Framework/Framework/connection/lora/{SX1278 => sx1278}/Kconfig (100%) rename APP_Framework/Framework/connection/lora/{SX1278 => sx1278}/Makefile (100%) rename APP_Framework/Framework/connection/lora/{SX1278 => sx1278}/sx1278.c (100%) rename APP_Framework/Framework/connection/nbiot/{BC28 => bc28}/Kconfig (100%) rename APP_Framework/Framework/connection/nbiot/{BC28 => bc28}/Makefile (100%) rename APP_Framework/Framework/connection/nbiot/{BC28 => bc28}/bc28.c (100%) rename APP_Framework/Framework/connection/wifi/{HFA21 => hfa21_wifi}/Kconfig (92%) rename APP_Framework/Framework/connection/{5G => wifi/hfa21_wifi}/Makefile (58%) mode change 100644 => 100755 rename APP_Framework/Framework/connection/wifi/{HFA21/hfa21.c => hfa21_wifi/hfa21_wifi.c} (100%) rename APP_Framework/Framework/connection/zigbee/{E18 => e18}/Kconfig (100%) rename APP_Framework/Framework/connection/zigbee/{E18 => e18}/Makefile (100%) rename APP_Framework/Framework/connection/zigbee/{E18 => e18}/e18.c (100%) rename APP_Framework/Framework/connection/zigbee/{E18 => e18}/e18.h (100%) diff --git a/APP_Framework/Framework/connection/4G/Kconfig b/APP_Framework/Framework/connection/4g/Kconfig similarity index 67% rename from APP_Framework/Framework/connection/4G/Kconfig rename to APP_Framework/Framework/connection/4g/Kconfig index 950529421..17e05a974 100644 --- a/APP_Framework/Framework/connection/4G/Kconfig +++ b/APP_Framework/Framework/connection/4g/Kconfig @@ -3,6 +3,6 @@ config ADAPTER_EC200T default y if ADAPTER_EC200T - source "$APP_DIR/Framework/connection/4G/EC200T/Kconfig" + source "$APP_DIR/Framework/connection/4g/ec200t/Kconfig" endif diff --git a/APP_Framework/Framework/connection/4G/Makefile b/APP_Framework/Framework/connection/4g/Makefile similarity index 62% rename from APP_Framework/Framework/connection/4G/Makefile rename to APP_Framework/Framework/connection/4g/Makefile index 1ef3b9279..436b7d97f 100644 --- a/APP_Framework/Framework/connection/4G/Makefile +++ b/APP_Framework/Framework/connection/4g/Makefile @@ -1,7 +1,7 @@ -SRC_FILES := adapter_4G.c +SRC_FILES := adapter_4g.c ifeq ($(CONFIG_ADAPTER_EC200T),y) - SRC_DIR += EC200T + SRC_DIR += ec200t endif 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 similarity index 100% rename from APP_Framework/Framework/connection/4G/adapter_4G.c rename to APP_Framework/Framework/connection/4g/adapter_4g.c diff --git a/APP_Framework/Framework/connection/4G/EC200T/Kconfig b/APP_Framework/Framework/connection/4g/ec200t/Kconfig similarity index 100% rename from APP_Framework/Framework/connection/4G/EC200T/Kconfig rename to APP_Framework/Framework/connection/4g/ec200t/Kconfig diff --git a/APP_Framework/Framework/connection/4G/EC200T/Makefile b/APP_Framework/Framework/connection/4g/ec200t/Makefile similarity index 100% rename from APP_Framework/Framework/connection/4G/EC200T/Makefile rename to APP_Framework/Framework/connection/4g/ec200t/Makefile diff --git a/APP_Framework/Framework/connection/4G/EC200T/ec200t.c b/APP_Framework/Framework/connection/4g/ec200t/ec200t.c similarity index 100% rename from APP_Framework/Framework/connection/4G/EC200T/ec200t.c rename to APP_Framework/Framework/connection/4g/ec200t/ec200t.c diff --git a/APP_Framework/Framework/connection/5G/Kconfig b/APP_Framework/Framework/connection/5g/Kconfig similarity index 100% rename from APP_Framework/Framework/connection/5G/Kconfig rename to APP_Framework/Framework/connection/5g/Kconfig diff --git a/APP_Framework/Framework/connection/wifi/HFA21/Makefile b/APP_Framework/Framework/connection/5g/Makefile old mode 100755 new mode 100644 similarity index 58% rename from APP_Framework/Framework/connection/wifi/HFA21/Makefile rename to APP_Framework/Framework/connection/5g/Makefile index a5c95324b..5b98645c0 --- a/APP_Framework/Framework/connection/wifi/HFA21/Makefile +++ b/APP_Framework/Framework/connection/5g/Makefile @@ -1,3 +1,3 @@ -SRC_FILES := hfa21.c +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 similarity index 96% rename from APP_Framework/Framework/connection/5G/adapter_5G.c rename to APP_Framework/Framework/connection/5g/adapter_5g.c index ff5ff1943..27485e108 100644 --- a/APP_Framework/Framework/connection/5G/adapter_5G.c +++ b/APP_Framework/Framework/connection/5g/adapter_5g.c @@ -11,7 +11,7 @@ */ /** - * @file adapter_5G.c + * @file adapter_5g.c * @brief Implement the connection 5G adapter function * @version 1.1 * @author AIIT XUOS Lab diff --git a/APP_Framework/Framework/connection/Kconfig b/APP_Framework/Framework/connection/Kconfig index bd062e6f4..a2ef6e64e 100644 --- a/APP_Framework/Framework/connection/Kconfig +++ b/APP_Framework/Framework/connection/Kconfig @@ -18,7 +18,7 @@ if SUPPORT_CONNECTION_FRAMEWORK bool "Using 4G adapter device" default n if CONNECTION_ADAPTER_4G - source "$APP_DIR/Framework/connection/4G/Kconfig" + source "$APP_DIR/Framework/connection/4g/Kconfig" endif menuconfig CONNECTION_ADAPTER_NB @@ -60,6 +60,6 @@ if SUPPORT_CONNECTION_FRAMEWORK bool "Using 5G adapter device" default n if CONNECTION_ADAPTER_5G - source "$APP_DIR/Framework/connection/5G/Kconfig" + source "$APP_DIR/Framework/connection/5g/Kconfig" endif endif diff --git a/APP_Framework/Framework/connection/Makefile b/APP_Framework/Framework/connection/Makefile index 328455fd7..54ebc25ba 100644 --- a/APP_Framework/Framework/connection/Makefile +++ b/APP_Framework/Framework/connection/Makefile @@ -5,7 +5,7 @@ ifeq ($(CONFIG_CONNECTION_ADAPTER_LORA),y) endif ifeq ($(CONFIG_CONNECTION_ADAPTER_4G),y) - SRC_DIR += 4G + SRC_DIR += 4g endif ifeq ($(CONFIG_CONNECTION_ADAPTER_NB),y) @@ -29,7 +29,7 @@ ifeq ($(CONFIG_CONNECTION_ADAPTER_ZIGBEE),y) endif ifeq ($(CONFIG_CONNECTION_ADAPTER_5G),y) - SRC_DIR += 5G + SRC_DIR += 5g endif include $(KERNEL_ROOT)/compiler.mk \ No newline at end of file diff --git a/APP_Framework/Framework/connection/bluetooth/Kconfig b/APP_Framework/Framework/connection/bluetooth/Kconfig index c2daecdae..cb71df572 100644 --- a/APP_Framework/Framework/connection/bluetooth/Kconfig +++ b/APP_Framework/Framework/connection/bluetooth/Kconfig @@ -3,5 +3,5 @@ config ADAPTER_HC08 default y if ADAPTER_HC08 - source "$APP_DIR/Framework/connection/bluetooth/HC08/Kconfig" + source "$APP_DIR/Framework/connection/bluetooth/hc08/Kconfig" endif diff --git a/APP_Framework/Framework/connection/bluetooth/Makefile b/APP_Framework/Framework/connection/bluetooth/Makefile index 29ef7fc31..bb367019f 100644 --- a/APP_Framework/Framework/connection/bluetooth/Makefile +++ b/APP_Framework/Framework/connection/bluetooth/Makefile @@ -1,7 +1,7 @@ SRC_FILES := adapter_bluetooth.c ifeq ($(CONFIG_ADAPTER_HC08),y) - SRC_DIR += HC08 + SRC_DIR += hc08 endif include $(KERNEL_ROOT)/compiler.mk diff --git a/APP_Framework/Framework/connection/bluetooth/HC08/Kconfig b/APP_Framework/Framework/connection/bluetooth/hc08/Kconfig similarity index 100% rename from APP_Framework/Framework/connection/bluetooth/HC08/Kconfig rename to APP_Framework/Framework/connection/bluetooth/hc08/Kconfig diff --git a/APP_Framework/Framework/connection/bluetooth/HC08/Makefile b/APP_Framework/Framework/connection/bluetooth/hc08/Makefile similarity index 100% rename from APP_Framework/Framework/connection/bluetooth/HC08/Makefile rename to APP_Framework/Framework/connection/bluetooth/hc08/Makefile diff --git a/APP_Framework/Framework/connection/bluetooth/HC08/hc08.c b/APP_Framework/Framework/connection/bluetooth/hc08/hc08.c similarity index 100% rename from APP_Framework/Framework/connection/bluetooth/HC08/hc08.c rename to APP_Framework/Framework/connection/bluetooth/hc08/hc08.c diff --git a/APP_Framework/Framework/connection/lora/SX1278/Kconfig b/APP_Framework/Framework/connection/lora/sx1278/Kconfig similarity index 100% rename from APP_Framework/Framework/connection/lora/SX1278/Kconfig rename to APP_Framework/Framework/connection/lora/sx1278/Kconfig diff --git a/APP_Framework/Framework/connection/lora/SX1278/Makefile b/APP_Framework/Framework/connection/lora/sx1278/Makefile similarity index 100% rename from APP_Framework/Framework/connection/lora/SX1278/Makefile rename to APP_Framework/Framework/connection/lora/sx1278/Makefile diff --git a/APP_Framework/Framework/connection/lora/SX1278/sx1278.c b/APP_Framework/Framework/connection/lora/sx1278/sx1278.c similarity index 100% rename from APP_Framework/Framework/connection/lora/SX1278/sx1278.c rename to APP_Framework/Framework/connection/lora/sx1278/sx1278.c diff --git a/APP_Framework/Framework/connection/nbiot/BC28/Kconfig b/APP_Framework/Framework/connection/nbiot/bc28/Kconfig similarity index 100% rename from APP_Framework/Framework/connection/nbiot/BC28/Kconfig rename to APP_Framework/Framework/connection/nbiot/bc28/Kconfig diff --git a/APP_Framework/Framework/connection/nbiot/BC28/Makefile b/APP_Framework/Framework/connection/nbiot/bc28/Makefile similarity index 100% rename from APP_Framework/Framework/connection/nbiot/BC28/Makefile rename to APP_Framework/Framework/connection/nbiot/bc28/Makefile diff --git a/APP_Framework/Framework/connection/nbiot/BC28/bc28.c b/APP_Framework/Framework/connection/nbiot/bc28/bc28.c similarity index 100% rename from APP_Framework/Framework/connection/nbiot/BC28/bc28.c rename to APP_Framework/Framework/connection/nbiot/bc28/bc28.c diff --git a/APP_Framework/Framework/connection/wifi/Kconfig b/APP_Framework/Framework/connection/wifi/Kconfig index 3ef0316f3..acda24557 100644 --- a/APP_Framework/Framework/connection/wifi/Kconfig +++ b/APP_Framework/Framework/connection/wifi/Kconfig @@ -1,7 +1,7 @@ -config ADAPTER_HFA21 +config ADAPTER_HFA21_WIFI bool "Using wifi adapter device HFA21" default y -if ADAPTER_HFA21 - source "$APP_DIR/Framework/connection/wifi/HFA21/Kconfig" +if ADAPTER_HFA21_WIFI + source "$APP_DIR/Framework/connection/wifi/hfa21_wifi/Kconfig" endif diff --git a/APP_Framework/Framework/connection/wifi/Makefile b/APP_Framework/Framework/connection/wifi/Makefile index 8c5a0c86a..3e08f0652 100644 --- a/APP_Framework/Framework/connection/wifi/Makefile +++ b/APP_Framework/Framework/connection/wifi/Makefile @@ -1,7 +1,7 @@ SRC_FILES := adapter_wifi.c -ifeq ($(CONFIG_ADAPTER_HFA21),y) - SRC_DIR += HFA21 +ifeq ($(CONFIG_ADAPTER_HFA21_WIFI),y) + SRC_DIR += hfa21_wifi endif 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 index 379c7e3f4..f9c27e48a 100644 --- a/APP_Framework/Framework/connection/wifi/adapter_wifi.c +++ b/APP_Framework/Framework/connection/wifi/adapter_wifi.c @@ -21,7 +21,7 @@ #include #include -#ifdef ADAPTER_HFA21 +#ifdef ADAPTER_HFA21_WIFI extern AdapterProductInfoType Hfa21Attach(struct Adapter *adapter); #endif @@ -65,7 +65,7 @@ int AdapterWifiInit(void) return -1; } -#ifdef ADAPTER_HFA21 +#ifdef ADAPTER_HFA21_WIFI AdapterProductInfoType product_info = Hfa21Attach(adapter); if (!product_info) { printf("AdapterWifiInit hfa21 attach error\n"); diff --git a/APP_Framework/Framework/connection/wifi/HFA21/Kconfig b/APP_Framework/Framework/connection/wifi/hfa21_wifi/Kconfig similarity index 92% rename from APP_Framework/Framework/connection/wifi/HFA21/Kconfig rename to APP_Framework/Framework/connection/wifi/hfa21_wifi/Kconfig index d61721c79..82f0489b8 100755 --- a/APP_Framework/Framework/connection/wifi/HFA21/Kconfig +++ b/APP_Framework/Framework/connection/wifi/hfa21_wifi/Kconfig @@ -1,6 +1,6 @@ config ADAPTER_WIFI_HFA21 - string "HFA21 adapter name" - default "hfa21" + string "HFA21 WIFI adapter name" + default "hfa21_wifi" if ADD_XIUOS_FETURES diff --git a/APP_Framework/Framework/connection/5G/Makefile b/APP_Framework/Framework/connection/wifi/hfa21_wifi/Makefile old mode 100644 new mode 100755 similarity index 58% rename from APP_Framework/Framework/connection/5G/Makefile rename to APP_Framework/Framework/connection/wifi/hfa21_wifi/Makefile index 9ce9e188f..5304916d9 --- a/APP_Framework/Framework/connection/5G/Makefile +++ b/APP_Framework/Framework/connection/wifi/hfa21_wifi/Makefile @@ -1,3 +1,3 @@ -SRC_FILES := adapter_5G.c +SRC_FILES := hfa21_wifi.c include $(KERNEL_ROOT)/compiler.mk diff --git a/APP_Framework/Framework/connection/wifi/HFA21/hfa21.c b/APP_Framework/Framework/connection/wifi/hfa21_wifi/hfa21_wifi.c similarity index 100% rename from APP_Framework/Framework/connection/wifi/HFA21/hfa21.c rename to APP_Framework/Framework/connection/wifi/hfa21_wifi/hfa21_wifi.c diff --git a/APP_Framework/Framework/connection/zigbee/Kconfig b/APP_Framework/Framework/connection/zigbee/Kconfig index 8656d3c00..42619008d 100644 --- a/APP_Framework/Framework/connection/zigbee/Kconfig +++ b/APP_Framework/Framework/connection/zigbee/Kconfig @@ -4,7 +4,7 @@ if CONNECTION_ADAPTER_ZIGBEE default y if ADAPTER_E18 - source "$APP_DIR/Framework/connection/zigbee/E18/Kconfig" + source "$APP_DIR/Framework/connection/zigbee/e18/Kconfig" endif endif diff --git a/APP_Framework/Framework/connection/zigbee/Makefile b/APP_Framework/Framework/connection/zigbee/Makefile index db3ac987b..316cd2d06 100644 --- a/APP_Framework/Framework/connection/zigbee/Makefile +++ b/APP_Framework/Framework/connection/zigbee/Makefile @@ -1,7 +1,7 @@ SRC_FILES := adapter_zigbee.c ifeq ($(CONFIG_ADAPTER_E18),y) - SRC_DIR += E18 + SRC_DIR += e18 endif include $(KERNEL_ROOT)/compiler.mk diff --git a/APP_Framework/Framework/connection/zigbee/E18/Kconfig b/APP_Framework/Framework/connection/zigbee/e18/Kconfig similarity index 100% rename from APP_Framework/Framework/connection/zigbee/E18/Kconfig rename to APP_Framework/Framework/connection/zigbee/e18/Kconfig diff --git a/APP_Framework/Framework/connection/zigbee/E18/Makefile b/APP_Framework/Framework/connection/zigbee/e18/Makefile similarity index 100% rename from APP_Framework/Framework/connection/zigbee/E18/Makefile rename to APP_Framework/Framework/connection/zigbee/e18/Makefile diff --git a/APP_Framework/Framework/connection/zigbee/E18/e18.c b/APP_Framework/Framework/connection/zigbee/e18/e18.c similarity index 100% rename from APP_Framework/Framework/connection/zigbee/E18/e18.c rename to APP_Framework/Framework/connection/zigbee/e18/e18.c diff --git a/APP_Framework/Framework/connection/zigbee/E18/e18.h b/APP_Framework/Framework/connection/zigbee/e18/e18.h similarity index 100% rename from APP_Framework/Framework/connection/zigbee/E18/e18.h rename to APP_Framework/Framework/connection/zigbee/e18/e18.h