diff --git a/LICENSE b/LICENSE
index 437d064..397eb34 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,3 +1,5 @@
+SOURCE LICENSE:
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the
@@ -10,3 +12,34 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+SDK LICENSE:
+
+Phyplus Microelectronics Limited confidential and proprietary.
+All rights reserved.
+
+IMPORTANT: All rights of this software belong to Phyplus Microelectronics
+Limited ("Phyplus"). Your use of this Software is limited to those
+specific rights granted under the terms of the business contract, the
+confidential agreement, the non-disclosure agreement and any other forms
+of agreements as a customer or a partner of Phyplus. You may not use this
+Software unless you agree to abide by the terms of these agreements.
+You acknowledge that the Software may not be modified, copied,
+distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
+(BLE) integrated circuit, either as a product or is integrated into your
+products. Other than for the aforementioned purposes, you may not use,
+reproduce, copy, prepare derivative works of, modify, distribute, perform,
+display or sell this Software and/or its documentation for any purposes.
+
+YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
+NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
diff --git a/README.md b/README.md
index e44a490..91abc0d 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ Custom firmware for Tuya [THB2](https://pvvx.github.io/THB2).
1. Соединить GND, TX, RX, RTS–RESET, VCC (+3.3B).
2. Запустить:
```
-python3 rdwr_phy6222.py -p COM11 -r wh TestTHB2.hex
+python3 rdwr_phy62x2.py -p COM11 -r wh TestTHB2.hex
```
3. Прошивка зашита. Устройство работает.
@@ -37,7 +37,7 @@ python3 rdwr_phy6222.py -p COM11 -r wh TestTHB2.hex
1. Соединить GND, TX, RX, RTS–RESET, VCC (+3.3B).
2. Запустить:
```
-python3 rdwr_phy6222.py -p COM11 -r rc 0x11000000 0x80000 ff_thb2.bin
+python3 rdwr_phy62x2.py -p COM11 -r rc 0x11000000 0x80000 ff_thb2.bin
```
3. Полученный файл ff_thb2.bin сохранить.
@@ -47,7 +47,7 @@ python3 rdwr_phy6222.py -p COM11 -r rc 0x11000000 0x80000 ff_thb2.bin
2. Соединить GND, TX, RX, RTS–RESET, VCC (+3.3B).
3. Запустить:
```
-python3 rdwr_phy6222.py -p COM11 -b 1000000 -r we 0 ff_thb2.bin
+python3 rdwr_phy62x2.py -p COM11 -b 1000000 -r we 0 ff_thb2.bin
```
Не все адаптеры USB-COM поддерживают 1Mbit. Тогда удалите опцию `-b 1000000` или выберите другой Baud rate.
diff --git a/bthome_phy6222/Makefile b/bthome_phy6222/Makefile
index c64f473..b764da1 100644
--- a/bthome_phy6222/Makefile
+++ b/bthome_phy6222/Makefile
@@ -208,7 +208,7 @@ DEFINES += -DPHY_MCU_TYPE=MCU_BUMBEE_M0
DEFINES += -DDEF_GAPBOND_MGR_ENABLE=0
DEFINES += -DUSE_FS=0
DEFINES += -DMAX_NUM_LL_CONN=1
-DEFINES += -DXFLASH_HIGH_SPEED=1
+#DEFINES += -DXFLASH_HIGH_SPEED=1
CFLAGS += $(DEFINES) $(INCLUDES)
diff --git a/bthome_phy6222/SDK/.gitignore b/bthome_phy6222/SDK/.gitignore
new file mode 100644
index 0000000..96236f8
--- /dev/null
+++ b/bthome_phy6222/SDK/.gitignore
@@ -0,0 +1 @@
+example
\ No newline at end of file
diff --git a/bthome_phy6222/SDK/SDK_LICENSE b/bthome_phy6222/SDK/SDK_LICENSE
new file mode 100644
index 0000000..804e801
--- /dev/null
+++ b/bthome_phy6222/SDK/SDK_LICENSE
@@ -0,0 +1,28 @@
+
+Phyplus Microelectronics Limited confidential and proprietary.
+All rights reserved.
+
+IMPORTANT: All rights of this software belong to Phyplus Microelectronics
+Limited ("Phyplus"). Your use of this Software is limited to those
+specific rights granted under the terms of the business contract, the
+confidential agreement, the non-disclosure agreement and any other forms
+of agreements as a customer or a partner of Phyplus. You may not use this
+Software unless you agree to abide by the terms of these agreements.
+You acknowledge that the Software may not be modified, copied,
+distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
+(BLE) integrated circuit, either as a product or is integrated into your
+products. Other than for the aforementioned purposes, you may not use,
+reproduce, copy, prepare derivative works of, modify, distribute, perform,
+display or sell this Software and/or its documentation for any purposes.
+
+YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
+NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
diff --git a/bthome_phy6222/SDK/components/ble/controller/ll.h b/bthome_phy6222/SDK/components/ble/controller/ll.h
index 77758a3..f4d2059 100644
--- a/bthome_phy6222/SDK/components/ble/controller/ll.h
+++ b/bthome_phy6222/SDK/components/ble/controller/ll.h
@@ -1,8 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
/*******************************************************************************
Filename: ll.h
Revised:
@@ -16,6 +11,7 @@
This API is based on the Bluetooth Core Specification,
V4.0.0, Vol. 6.
+ SDK_LICENSE
*******************************************************************************/
diff --git a/bthome_phy6222/SDK/components/ble/controller/ll_buf.h b/bthome_phy6222/SDK/components/ble/controller/ll_buf.h
index 8a763a0..87695da 100644
--- a/bthome_phy6222/SDK/components/ble/controller/ll_buf.h
+++ b/bthome_phy6222/SDK/components/ble/controller/ll_buf.h
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ ll_buf.h
+ SDK_LICENSE
+***************/
#ifndef _LL_BUF_H_
#define _LL_BUF_H_
diff --git a/bthome_phy6222/SDK/components/ble/controller/ll_common.h b/bthome_phy6222/SDK/components/ble/controller/ll_common.h
index ec8edb1..2d300bf 100644
--- a/bthome_phy6222/SDK/components/ble/controller/ll_common.h
+++ b/bthome_phy6222/SDK/components/ble/controller/ll_common.h
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ ll_common.h
+ SDK_LICENSE
+***************/
#ifndef _LL_H_
#define _LL_H_
diff --git a/bthome_phy6222/SDK/components/ble/controller/ll_debug.h b/bthome_phy6222/SDK/components/ble/controller/ll_debug.h
index afe1b27..104c05b 100644
--- a/bthome_phy6222/SDK/components/ble/controller/ll_debug.h
+++ b/bthome_phy6222/SDK/components/ble/controller/ll_debug.h
@@ -1,8 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
/**
****************************************************************************************
*
@@ -13,6 +8,8 @@
*
* $Rev: $
*
+ * SDK_LICENSE
+ *
****************************************************************************************
*/
diff --git a/bthome_phy6222/SDK/components/ble/controller/ll_def.h b/bthome_phy6222/SDK/components/ble/controller/ll_def.h
index c5aed55..61c5ab9 100644
--- a/bthome_phy6222/SDK/components/ble/controller/ll_def.h
+++ b/bthome_phy6222/SDK/components/ble/controller/ll_def.h
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ ll_def.h
+ SDK_LICENSE
+***************/
#ifndef LL_DEF_H_
#define LL_DEF_H_
diff --git a/bthome_phy6222/SDK/components/ble/controller/ll_enc.h b/bthome_phy6222/SDK/components/ble/controller/ll_enc.h
index 735141b..37a4920 100644
--- a/bthome_phy6222/SDK/components/ble/controller/ll_enc.h
+++ b/bthome_phy6222/SDK/components/ble/controller/ll_enc.h
@@ -1,8 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
/*******************************************************************************
Filename: ll_enc.h
Revised:
@@ -14,7 +9,8 @@
This API is based on ULP BT LE D09R23.
-
+ SDK_LICENSE
+
*******************************************************************************/
#ifndef LL_ENC_H
diff --git a/bthome_phy6222/SDK/components/ble/controller/ll_hw_drv.h b/bthome_phy6222/SDK/components/ble/controller/ll_hw_drv.h
index f6130a4..80730ea 100644
--- a/bthome_phy6222/SDK/components/ble/controller/ll_hw_drv.h
+++ b/bthome_phy6222/SDK/components/ble/controller/ll_hw_drv.h
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ ll_hw_drv.h
+ SDK_LICENSE
+***************/
#ifndef _LL_HW_DRV_H_
#define _LL_HW_DRV_H_
diff --git a/bthome_phy6222/SDK/components/ble/controller/ll_sleep.h b/bthome_phy6222/SDK/components/ble/controller/ll_sleep.h
index 5c324d1..dfe8231 100644
--- a/bthome_phy6222/SDK/components/ble/controller/ll_sleep.h
+++ b/bthome_phy6222/SDK/components/ble/controller/ll_sleep.h
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ ll_sleep.h
+ SDK_LICENSE
+***************/
#ifndef LL_SLEEP__H_
#define LL_SLEEP__H_
diff --git a/bthome_phy6222/SDK/components/ble/controller/rf_phy_driver.h b/bthome_phy6222/SDK/components/ble/controller/rf_phy_driver.h
index 854703e..c6d0231 100644
--- a/bthome_phy6222/SDK/components/ble/controller/rf_phy_driver.h
+++ b/bthome_phy6222/SDK/components/ble/controller/rf_phy_driver.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file rf_phy_driver.h
@brief
@@ -9,15 +5,12 @@
@date 24. Aug. 2017
@author Zhongqi Yang
-
-
+ SDK_LICENSE
*******************************************************************************/
#ifndef __RF_PHY_DRIVER_H_
#define __RF_PHY_DRIVER_H_
-
-
/*******************************************************************************
INCLUDES
*/
@@ -46,8 +39,6 @@ typedef enum _RX_ADC_CLK_SEL
} rxadc_clk_t;
-
-
/*******************************************************************************
Global Var
*/
@@ -60,7 +51,7 @@ extern volatile uint8_t g_rfPhyPktFmt; //** rf_phy pkt format config
extern volatile uint32 g_rfPhyRxDcIQ; //** rx dc offset cal result **//
extern volatile int8_t g_rfPhyFreqOffSet;
-extern volatile sysclk_t g_system_clk;
+//extern volatile sysclk_t g_system_clk;
extern volatile rfphy_clk_t g_rfPhyClkSel;
extern volatile rxadc_clk_t g_rxAdcClkSel;
diff --git a/bthome_phy6222/SDK/components/ble/hci/hci_data.h b/bthome_phy6222/SDK/components/ble/hci/hci_data.h
index 7b24b48..27f73b6 100644
--- a/bthome_phy6222/SDK/components/ble/hci/hci_data.h
+++ b/bthome_phy6222/SDK/components/ble/hci/hci_data.h
@@ -1,15 +1,11 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
Filename: hci_c_data.h
Revised: $Date: 2011-08-22 08:41:40 -0700 (Mon, 22 Aug 2011) $
Revision: $Revision: 27235 $
Description: This file handles HCI data for the BLE Controller.
-
-
+
+ SDK_LICENSE
*******************************************************************************/
#ifndef HCI_C_DATA_H
diff --git a/bthome_phy6222/SDK/components/ble/hci/hci_event.h b/bthome_phy6222/SDK/components/ble/hci/hci_event.h
index 97e3ebb..01e68e7 100644
--- a/bthome_phy6222/SDK/components/ble/hci/hci_event.h
+++ b/bthome_phy6222/SDK/components/ble/hci/hci_event.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
Filename: hci_c_event.h
Revised: $Date: 2012-05-01 12:13:50 -0700 (Tue, 01 May 2012) $
@@ -10,7 +6,7 @@
Description: This file contains the HCI Event types, contants,
external functions etc. for the BLE Controller.
-
+ SDK_LICENSE
*******************************************************************************/
#ifndef HCI_C_EVENT_H
diff --git a/bthome_phy6222/SDK/components/ble/hci/hci_host.h b/bthome_phy6222/SDK/components/ble/hci/hci_host.h
index 2602602..46b025f 100644
--- a/bthome_phy6222/SDK/components/ble/hci/hci_host.h
+++ b/bthome_phy6222/SDK/components/ble/hci/hci_host.h
@@ -1,10 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
-/*************************************************************************************************
-**************************************************************************************************/
+/*************
+ hci_host.h
+ SDK_LICENSE
+***************/
#ifndef HCI_HOST_H
#define HCI_HOST_H
diff --git a/bthome_phy6222/SDK/components/ble/hci/hci_task.h b/bthome_phy6222/SDK/components/ble/hci/hci_task.h
index c965199..24e6f67 100644
--- a/bthome_phy6222/SDK/components/ble/hci/hci_task.h
+++ b/bthome_phy6222/SDK/components/ble/hci/hci_task.h
@@ -1,9 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-/*************************************************************************************************
-**************************************************************************************************/
+/*************
+ hci_task.h
+ SDK_LICENSE
+***************/
#ifndef HCI_TASK_H
#define HCI_TASK_H
diff --git a/bthome_phy6222/SDK/components/ble/hci/hci_tl.h b/bthome_phy6222/SDK/components/ble/hci/hci_tl.h
index 4bc3596..752008b 100644
--- a/bthome_phy6222/SDK/components/ble/hci/hci_tl.h
+++ b/bthome_phy6222/SDK/components/ble/hci/hci_tl.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
Filename: hci_tl.h
Revised: $Date: 2012-04-20 15:24:45 -0700 (Fri, 20 Apr 2012) $
@@ -10,6 +6,7 @@
Description: This file contains the types, contants, external functions
etc. for the BLE HCI Transport Layer.
+ SDK_LICENSE
*******************************************************************************/
#ifndef HCI_TL_H
diff --git a/bthome_phy6222/SDK/components/ble/host/att_internal.h b/bthome_phy6222/SDK/components/ble/host/att_internal.h
index 9569c4c..32115c8 100644
--- a/bthome_phy6222/SDK/components/ble/host/att_internal.h
+++ b/bthome_phy6222/SDK/components/ble/host/att_internal.h
@@ -1,11 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-/**************************************************************************************************
-
-
-**************************************************************************************************/
+/*************
+ att_internal.h
+ SDK_LICENSE
+***************/
#ifndef ATT_INTERNAL_H
#define ATT_INTERNAL_H
diff --git a/bthome_phy6222/SDK/components/ble/host/gap_internal.h b/bthome_phy6222/SDK/components/ble/host/gap_internal.h
index 2526998..9ba91bd 100644
--- a/bthome_phy6222/SDK/components/ble/host/gap_internal.h
+++ b/bthome_phy6222/SDK/components/ble/host/gap_internal.h
@@ -1,10 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
-/**************************************************************************************************
-**************************************************************************************************/
+/*************
+ gap_internal.h
+ SDK_LICENSE
+***************/
#ifndef GAP_INTERNAL_H
#define GAP_INTERNAL_H
diff --git a/bthome_phy6222/SDK/components/ble/host/gapgattserver.h b/bthome_phy6222/SDK/components/ble/host/gapgattserver.h
index 5d11102..f99b7ac 100644
--- a/bthome_phy6222/SDK/components/ble/host/gapgattserver.h
+++ b/bthome_phy6222/SDK/components/ble/host/gapgattserver.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: gapgattserver.h
Revised:
@@ -10,8 +6,7 @@
Description: This file contains GAP GATT attribute definitions
and prototypes.
-
-
+ SDK_LICENSE
**************************************************************************************************/
#ifndef GAPGATTSERVER_H
diff --git a/bthome_phy6222/SDK/components/ble/host/gatt_internal.h b/bthome_phy6222/SDK/components/ble/host/gatt_internal.h
index 7ff48d2..f9ce0fc 100644
--- a/bthome_phy6222/SDK/components/ble/host/gatt_internal.h
+++ b/bthome_phy6222/SDK/components/ble/host/gatt_internal.h
@@ -1,9 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-/**************************************************************************************************
-**************************************************************************************************/
+/*************
+ gatt_internal.h
+ SDK_LICENSE
+***************/
#ifndef GATT_INTERNAL_H
#define GATT_INTERNAL_H
diff --git a/bthome_phy6222/SDK/components/ble/host/gatt_profile_uuid.h b/bthome_phy6222/SDK/components/ble/host/gatt_profile_uuid.h
index b3a59f6..a2af046 100644
--- a/bthome_phy6222/SDK/components/ble/host/gatt_profile_uuid.h
+++ b/bthome_phy6222/SDK/components/ble/host/gatt_profile_uuid.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: gatt_profile_uuid.h
Revised:
@@ -9,7 +5,7 @@
Description: This file contains GATT Profile UUID types.
-
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/ble/host/gattservapp.h b/bthome_phy6222/SDK/components/ble/host/gattservapp.h
index f8fb063..e82f768 100644
--- a/bthome_phy6222/SDK/components/ble/host/gattservapp.h
+++ b/bthome_phy6222/SDK/components/ble/host/gattservapp.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**
@headerfile: gattservapp.h
@@ -12,7 +8,8 @@
Description: This file contains the GATT Server Application (GATTServApp)
definitions and prototypes.
-
+
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/ble/host/gatttest.h b/bthome_phy6222/SDK/components/ble/host/gatttest.h
index 3d56312..a563a38 100644
--- a/bthome_phy6222/SDK/components/ble/host/gatttest.h
+++ b/bthome_phy6222/SDK/components/ble/host/gatttest.h
@@ -1,9 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-/**************************************************************************************************
-**************************************************************************************************/
+/*************
+ gatttest.h
+ SDK_LICENSE
+***************/
#ifndef GATTTEST_H
#define GATTTEST_H
diff --git a/bthome_phy6222/SDK/components/ble/host/l2cap_internal.h b/bthome_phy6222/SDK/components/ble/host/l2cap_internal.h
index 598bee9..0966236 100644
--- a/bthome_phy6222/SDK/components/ble/host/l2cap_internal.h
+++ b/bthome_phy6222/SDK/components/ble/host/l2cap_internal.h
@@ -1,9 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-/**************************************************************************************************
-**************************************************************************************************/
+/*************
+ l2cap_internal.h
+ SDK_LICENSE
+***************/
#ifndef L2CAP_INTERNAL_H
#define L2CAP_INTERNAL_H
diff --git a/bthome_phy6222/SDK/components/ble/host/linkdb.h b/bthome_phy6222/SDK/components/ble/host/linkdb.h
index a73ae02..2ea3b7b 100644
--- a/bthome_phy6222/SDK/components/ble/host/linkdb.h
+++ b/bthome_phy6222/SDK/components/ble/host/linkdb.h
@@ -1,8 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
/**************************************************************************************************
Filename: linkdb.h
Revised:
@@ -10,7 +5,7 @@
Description: This file contains the linkDB interface.
-
+ SDK_LICENSE
**************************************************************************************************/
#ifndef LINKDB_H
diff --git a/bthome_phy6222/SDK/components/ble/host/sm_internal.h b/bthome_phy6222/SDK/components/ble/host/sm_internal.h
index 92f3b00..f540ade 100644
--- a/bthome_phy6222/SDK/components/ble/host/sm_internal.h
+++ b/bthome_phy6222/SDK/components/ble/host/sm_internal.h
@@ -1,10 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
-/**************************************************************************************************
-**************************************************************************************************/
+/*************
+ sm_internal.h
+ SDK_LICENSE
+***************/
#ifndef SM_INTERNAL_H
#define SM_INTERNAL_H
diff --git a/bthome_phy6222/SDK/components/ble/host/smp.h b/bthome_phy6222/SDK/components/ble/host/smp.h
index 99c89c2..1d4459c 100644
--- a/bthome_phy6222/SDK/components/ble/host/smp.h
+++ b/bthome_phy6222/SDK/components/ble/host/smp.h
@@ -1,9 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-/**************************************************************************************************
-**************************************************************************************************/
+/*************
+ smp.h
+ SDK_LICENSE
+***************/
#ifndef SMP_H
#define SMP_H
diff --git a/bthome_phy6222/SDK/components/ble/include/att.h b/bthome_phy6222/SDK/components/ble/include/att.h
index c2afe88..25efe1f 100644
--- a/bthome_phy6222/SDK/components/ble/include/att.h
+++ b/bthome_phy6222/SDK/components/ble/include/att.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**
@headerfile: att.h
@@ -12,9 +8,10 @@
Description: This file contains Attribute Protocol (ATT) definitions
and prototypes.
-
-
-->
+
+ SDK_LICENSE
+
**************************************************************************************************/
#ifndef ATT_H
diff --git a/bthome_phy6222/SDK/components/ble/include/bcomdef.h b/bthome_phy6222/SDK/components/ble/include/bcomdef.h
index e086cda..cb2c96e 100644
--- a/bthome_phy6222/SDK/components/ble/include/bcomdef.h
+++ b/bthome_phy6222/SDK/components/ble/include/bcomdef.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**
@headerfile: bcomdef.h
@@ -13,6 +9,7 @@
-->
+SDK_LICENSE
**************************************************************************************************/
#ifndef BCOMDEF_H
diff --git a/bthome_phy6222/SDK/components/ble/include/gap.h b/bthome_phy6222/SDK/components/ble/include/gap.h
index bf038e0..b5837cc 100644
--- a/bthome_phy6222/SDK/components/ble/include/gap.h
+++ b/bthome_phy6222/SDK/components/ble/include/gap.h
@@ -1,12 +1,9 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**
@headerfile: gap.h
$Date:
$Revision:
+SDK_LICENSE
*/
diff --git a/bthome_phy6222/SDK/components/ble/include/gatt.h b/bthome_phy6222/SDK/components/ble/include/gatt.h
index 4e6272a..b26f5e3 100644
--- a/bthome_phy6222/SDK/components/ble/include/gatt.h
+++ b/bthome_phy6222/SDK/components/ble/include/gatt.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**
@headerfile: gatt.h
$Date:
@@ -12,6 +8,7 @@
Description: This file contains Generic Attribute Profile (GATT)
definitions and prototypes.
+ SDK_LICENSE
*/
@@ -80,7 +77,9 @@ extern "C"
/** @} End GATT_MAX_ATTR_SIZE_DEFINES */
// GATT Maximum number of connections (including loopback)
+#ifndef GATT_MAX_NUM_CONN
#define GATT_MAX_NUM_CONN ( MAX_NUM_LL_CONN + 1 )
+#endif
// GATT Base Method
#define GATT_BASE_METHOD 0x40
diff --git a/bthome_phy6222/SDK/components/ble/include/gatt_uuid.h b/bthome_phy6222/SDK/components/ble/include/gatt_uuid.h
index 9c46ccb..eec15a4 100644
--- a/bthome_phy6222/SDK/components/ble/include/gatt_uuid.h
+++ b/bthome_phy6222/SDK/components/ble/include/gatt_uuid.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: gatt_uuid.h
Revised:
@@ -10,6 +6,7 @@
Description: This file contains Generic Attribute Profile (GATT)
UUID types.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/ble/include/hci.h b/bthome_phy6222/SDK/components/ble/include/hci.h
index 411f2dc..69e6c2c 100644
--- a/bthome_phy6222/SDK/components/ble/include/hci.h
+++ b/bthome_phy6222/SDK/components/ble/include/hci.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
Filename: hci.h
Revised:
@@ -14,6 +10,7 @@
All Bluetooth and BLE commands are based on:
Bluetooth Core Specification, V4.0.0, Vol. 2, Part E.
+ SDK_LICENSE
*******************************************************************************/
diff --git a/bthome_phy6222/SDK/components/ble/include/l2cap.h b/bthome_phy6222/SDK/components/ble/include/l2cap.h
index 9d1e157..e0243fe 100644
--- a/bthome_phy6222/SDK/components/ble/include/l2cap.h
+++ b/bthome_phy6222/SDK/components/ble/include/l2cap.h
@@ -1,8 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
/**************************************************************************************************
Filename: l2cap.h
Revised:
@@ -10,6 +5,7 @@
Description: This file contains the L2CAP definitions.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/ble/include/sm.h b/bthome_phy6222/SDK/components/ble/include/sm.h
index e3f7a95..ee54a28 100644
--- a/bthome_phy6222/SDK/components/ble/include/sm.h
+++ b/bthome_phy6222/SDK/components/ble/include/sm.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**
@headerfile: sm.h
$Date:
@@ -11,7 +7,7 @@
This file contains the interface to the SM.
-
+ SDK_LICENSE
*/
diff --git a/bthome_phy6222/SDK/components/driver/adc/adc.c b/bthome_phy6222/SDK/components/driver/adc/adc.c
index 9f8b8d2..4d22e71 100644
--- a/bthome_phy6222/SDK/components/driver/adc/adc.c
+++ b/bthome_phy6222/SDK/components/driver/adc/adc.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file adc.c
@brief Contains all functions support for adc driver
@@ -9,7 +5,7 @@
@date 18. Oct. 2017
@author qing.han
-
+ SDK_LICENSE
*******************************************************************************/
#include
diff --git a/bthome_phy6222/SDK/components/driver/adc/adc.h b/bthome_phy6222/SDK/components/driver/adc/adc.h
index 8a862e7..df841f0 100644
--- a/bthome_phy6222/SDK/components/driver/adc/adc.h
+++ b/bthome_phy6222/SDK/components/driver/adc/adc.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file adc.h
@brief Contains all functions support for adc driver
@@ -9,7 +5,7 @@
@date 18. Oct. 2017
@author qing.han
-
+ SDK_LICENSE
*******************************************************************************/
#ifndef __ADC__H__
diff --git a/bthome_phy6222/SDK/components/driver/adc/readme.txt b/bthome_phy6222/SDK/components/driver/adc/readme.txt
deleted file mode 100644
index 960eafd..0000000
--- a/bthome_phy6222/SDK/components/driver/adc/readme.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-调用hal_adc_start的同时,启动一个oals_timer.
-
-example:
-//triggle function
- hal_adc_start();
- osal_start_timerEx(adcDemo_TaskID, adcProctect_EVT,50);
-...............
-...............
-
-//osal task event process
-
-if(event&adcProctect_EVT)
-{
- hal_adc_stop();
- hal_clk_reset(MOD_ADCC);
-return (event^adcProctect_EVT)
-}
\ No newline at end of file
diff --git a/bthome_phy6222/SDK/components/driver/bsp_button/bsp_button.c b/bthome_phy6222/SDK/components/driver/bsp_button/bsp_button.c
index 986801a..6245817 100644
--- a/bthome_phy6222/SDK/components/driver/bsp_button/bsp_button.c
+++ b/bthome_phy6222/SDK/components/driver/bsp_button/bsp_button.c
@@ -1,3 +1,8 @@
+/*************
+ bsp_button.c
+ SDK_LICENSE
+***************/
+
#include "error.h"
#include "bsp_button.h"
#include "log.h"
diff --git a/bthome_phy6222/SDK/components/driver/bsp_button/bsp_button.h b/bthome_phy6222/SDK/components/driver/bsp_button/bsp_button.h
index 3e6faee..7b2a636 100644
--- a/bthome_phy6222/SDK/components/driver/bsp_button/bsp_button.h
+++ b/bthome_phy6222/SDK/components/driver/bsp_button/bsp_button.h
@@ -1,3 +1,8 @@
+/*************
+ bsp_button.h
+ SDK_LICENSE
+***************/
+
#ifndef __BSP_BUTTON_H__
#define __BSP_BUTTON_H__
diff --git a/bthome_phy6222/SDK/components/driver/bsp_button/bsp_button_task.c b/bthome_phy6222/SDK/components/driver/bsp_button/bsp_button_task.c
index cb7c442..1fdb65d 100644
--- a/bthome_phy6222/SDK/components/driver/bsp_button/bsp_button_task.c
+++ b/bthome_phy6222/SDK/components/driver/bsp_button/bsp_button_task.c
@@ -1,11 +1,8 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: bsp_button_task.c
Revised: $Date $
Revision: $Revision $
+ SDK_LICENSE
**************************************************************************************************/
/*********************************************************************
diff --git a/bthome_phy6222/SDK/components/driver/bsp_button/bsp_button_task.h b/bthome_phy6222/SDK/components/driver/bsp_button/bsp_button_task.h
index 59f0422..988e9de 100644
--- a/bthome_phy6222/SDK/components/driver/bsp_button/bsp_button_task.h
+++ b/bthome_phy6222/SDK/components/driver/bsp_button/bsp_button_task.h
@@ -1,12 +1,9 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: bsp_button_task.h
Revised: $Date $
Revision: $Revision $
+ SDK_LICENSE
**************************************************************************************************/
#ifndef __BSP_BUTTON_TASK_H__
diff --git a/bthome_phy6222/SDK/components/driver/bsp_button/bsp_gpio.c b/bthome_phy6222/SDK/components/driver/bsp_button/bsp_gpio.c
index d8b4a7e..ac9657f 100644
--- a/bthome_phy6222/SDK/components/driver/bsp_button/bsp_gpio.c
+++ b/bthome_phy6222/SDK/components/driver/bsp_button/bsp_gpio.c
@@ -1,16 +1,13 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************
-
-
Module Name: bsp_gpio
File name: bsp_gpio.c
Brief description:
key driver module
Data: 2020-06-30
Revision:V0.01
+
+ SDK_LICENSE
+
****************************************************************/
#include "bsp_gpio.h"
diff --git a/bthome_phy6222/SDK/components/driver/bsp_button/bsp_gpio.h b/bthome_phy6222/SDK/components/driver/bsp_button/bsp_gpio.h
index 58760ac..09cded7 100644
--- a/bthome_phy6222/SDK/components/driver/bsp_button/bsp_gpio.h
+++ b/bthome_phy6222/SDK/components/driver/bsp_button/bsp_gpio.h
@@ -1,15 +1,13 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
/**************************************************************
-
-
Module Name: bsp_gpio
File name: bsp_gpio.h
Brief description:
key driver module
Data: 2020-06-30
Revision:V0.01
+
+ SDK_LICENSE
+
****************************************************************/
#ifndef __KEY_H__
diff --git a/bthome_phy6222/SDK/components/driver/clock/clock.c b/bthome_phy6222/SDK/components/driver/clock/clock.c
index 4345e1e..f57bcef 100644
--- a/bthome_phy6222/SDK/components/driver/clock/clock.c
+++ b/bthome_phy6222/SDK/components/driver/clock/clock.c
@@ -1,6 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ clock.c
+ SDK_LICENSE
+***************/
#include "clock.h"
#include "gpio.h"
#include "global_config.h"
diff --git a/bthome_phy6222/SDK/components/driver/clock/clock.h b/bthome_phy6222/SDK/components/driver/clock/clock.h
index 8b100cc..0141051 100644
--- a/bthome_phy6222/SDK/components/driver/clock/clock.h
+++ b/bthome_phy6222/SDK/components/driver/clock/clock.h
@@ -1,6 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ clock.h
+ SDK_LICENSE
+***************/
#ifndef _HAL_CLOCK_H
#define _HAL_CLOCK_H
@@ -41,6 +42,12 @@ typedef enum _SYSCLK_SEL
SYS_CLK_NUM = 8,
} sysclk_t;
+#ifdef USE_ROMSYM_ALIAS
+extern sysclk_t _symrom_g_system_clk;
+#else
+extern sysclk_t g_system_clk;
+#endif
+
typedef enum
{
HCLK_CHANGE = 0,
diff --git a/bthome_phy6222/SDK/components/driver/dma/dma.c b/bthome_phy6222/SDK/components/driver/dma/dma.c
index e314c7e..e9737be 100644
--- a/bthome_phy6222/SDK/components/driver/dma/dma.c
+++ b/bthome_phy6222/SDK/components/driver/dma/dma.c
@@ -1,8 +1,8 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
+/*************
+ dma.c
+ SDK_LICENSE
+***************/
+
#include
#include "clock.h"
diff --git a/bthome_phy6222/SDK/components/driver/dma/dma.h b/bthome_phy6222/SDK/components/driver/dma/dma.h
index 485fae7..1b94756 100644
--- a/bthome_phy6222/SDK/components/driver/dma/dma.h
+++ b/bthome_phy6222/SDK/components/driver/dma/dma.h
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ dma.h
+ SDK_LICENSE
+***************/
/* Peripheral group ----------------------------------------------------------- */
/** @defgroup GPDMA GPDMA (General Purpose Direct Memory Access)
diff --git a/bthome_phy6222/SDK/components/driver/flash/flash.c b/bthome_phy6222/SDK/components/driver/flash/flash.c
index 5eba771..7dc20a2 100644
--- a/bthome_phy6222/SDK/components/driver/flash/flash.c
+++ b/bthome_phy6222/SDK/components/driver/flash/flash.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
- *******
- **************************************************************************************************/
-
/*******************************************************************************
@file flash.c
@brief Contains all functions support for flash driver
@@ -9,7 +5,7 @@
@date 27. Nov. 2017
@author qing.han
-
+ SDK_LICENSE
*******************************************************************************/
#include "rom_sym_def.h"
diff --git a/bthome_phy6222/SDK/components/driver/flash/flash.h b/bthome_phy6222/SDK/components/driver/flash/flash.h
index 0e30183..81cfa37 100644
--- a/bthome_phy6222/SDK/components/driver/flash/flash.h
+++ b/bthome_phy6222/SDK/components/driver/flash/flash.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file flash.h
@brief Contains all functions support for flash driver
@@ -9,7 +5,7 @@
@date 27. Nov. 2017
@author qing.han
-
+ SDK_LICENSE
*******************************************************************************/
#ifndef _FLASH_H_
diff --git a/bthome_phy6222/SDK/components/driver/gpio/gpio.c b/bthome_phy6222/SDK/components/driver/gpio/gpio.c
index c5d0ace..8d40e9f 100644
--- a/bthome_phy6222/SDK/components/driver/gpio/gpio.c
+++ b/bthome_phy6222/SDK/components/driver/gpio/gpio.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*******************************************************************************
@file gpio.c
@brief Contains all functions support for gpio and iomux driver
@@ -37,7 +5,7 @@
@date 19. Oct. 2017
@author qing.han
-
+ SDK_LICENSE
*******************************************************************************/
#include "types.h"
diff --git a/bthome_phy6222/SDK/components/driver/gpio/gpio.h b/bthome_phy6222/SDK/components/driver/gpio/gpio.h
index 8ca58a6..44ba68b 100644
--- a/bthome_phy6222/SDK/components/driver/gpio/gpio.h
+++ b/bthome_phy6222/SDK/components/driver/gpio/gpio.h
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*******************************************************************************
@file gpio.h
@brief Contains all functions support for gpio and iomux driver
@@ -37,7 +5,7 @@
@date 19. Oct. 2017
@author qing.han
-
+ SDK_LICENSE
*******************************************************************************/
#ifndef __GPIO_H__
diff --git a/bthome_phy6222/SDK/components/driver/i2c/i2c.c b/bthome_phy6222/SDK/components/driver/i2c/i2c.c
index 7a54b2f..4103f8a 100644
--- a/bthome_phy6222/SDK/components/driver/i2c/i2c.c
+++ b/bthome_phy6222/SDK/components/driver/i2c/i2c.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file i2c.c
@brief Contains all functions support for i2c driver
@@ -9,7 +5,7 @@
@date 25. Oct. 2017
@author qing.han
-
+ SDK_LICENSE
*******************************************************************************/
diff --git a/bthome_phy6222/SDK/components/driver/i2c/i2c.h b/bthome_phy6222/SDK/components/driver/i2c/i2c.h
index 16e4f1a..314ce5d 100644
--- a/bthome_phy6222/SDK/components/driver/i2c/i2c.h
+++ b/bthome_phy6222/SDK/components/driver/i2c/i2c.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file i2c.h
@brief Contains all functions support for i2c driver
@@ -9,7 +5,7 @@
@date 25. Oct. 2017
@author qing.han
-
+ SDK_LICENSE
*******************************************************************************/
#ifndef __I2C__H__
diff --git a/bthome_phy6222/SDK/components/driver/i2c/i2c_common.c b/bthome_phy6222/SDK/components/driver/i2c/i2c_common.c
index ae76c83..4f5614a 100644
--- a/bthome_phy6222/SDK/components/driver/i2c/i2c_common.c
+++ b/bthome_phy6222/SDK/components/driver/i2c/i2c_common.c
@@ -1,13 +1,10 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file i2c_comman.c
@brief i2c general Function
@version 1.0
-
+ SDK_LICENSE
+
*******************************************************************************/
/*******************************************************************************
diff --git a/bthome_phy6222/SDK/components/driver/i2c/i2c_common.h b/bthome_phy6222/SDK/components/driver/i2c/i2c_common.h
index 3ba0a41..4af38c8 100644
--- a/bthome_phy6222/SDK/components/driver/i2c/i2c_common.h
+++ b/bthome_phy6222/SDK/components/driver/i2c/i2c_common.h
@@ -1,12 +1,10 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file i2c_comman.h
@brief i2c General Configuration
@version 1.0
+ SDK_LICENSE
+
*******************************************************************************/
#ifndef __I2C_COMMON_H__
diff --git a/bthome_phy6222/SDK/components/driver/i2c/i2c_io.c b/bthome_phy6222/SDK/components/driver/i2c/i2c_io.c
index 55aec64..cd86553 100644
--- a/bthome_phy6222/SDK/components/driver/i2c/i2c_io.c
+++ b/bthome_phy6222/SDK/components/driver/i2c/i2c_io.c
@@ -1,3 +1,8 @@
+/*************
+ i2c_io.c
+ SDK_LICENSE
+***************/
+
//#include "iic.h"
#include "bus_dev.h"
#include "gpio.h"
diff --git a/bthome_phy6222/SDK/components/driver/i2c/i2c_io.h b/bthome_phy6222/SDK/components/driver/i2c/i2c_io.h
index 22f9113..93ded64 100644
--- a/bthome_phy6222/SDK/components/driver/i2c/i2c_io.h
+++ b/bthome_phy6222/SDK/components/driver/i2c/i2c_io.h
@@ -1,3 +1,8 @@
+/*************
+ i2c_io.h
+ SDK_LICENSE
+***************/
+
#ifndef __IIC_H
#define __IIC_H
diff --git a/bthome_phy6222/SDK/components/driver/i2c/i2c_s.c b/bthome_phy6222/SDK/components/driver/i2c/i2c_s.c
index 1b592a9..0973fec 100644
--- a/bthome_phy6222/SDK/components/driver/i2c/i2c_s.c
+++ b/bthome_phy6222/SDK/components/driver/i2c/i2c_s.c
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ i2c_s.c
+ SDK_LICENSE
+***************/
#include "bus_dev.h"
#include "gpio.h"
diff --git a/bthome_phy6222/SDK/components/driver/i2c/i2c_s.h b/bthome_phy6222/SDK/components/driver/i2c/i2c_s.h
index 07129d5..fad8d46 100644
--- a/bthome_phy6222/SDK/components/driver/i2c/i2c_s.h
+++ b/bthome_phy6222/SDK/components/driver/i2c/i2c_s.h
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ i2c_s.h
+ SDK_LICENSE
+***************/
#ifndef _IIC_SLAVE_H
#define _IIC_SLAVE_H
diff --git a/bthome_phy6222/SDK/components/driver/i2c/i2c_slave.c b/bthome_phy6222/SDK/components/driver/i2c/i2c_slave.c
index 73c72f4..d4323ca 100644
--- a/bthome_phy6222/SDK/components/driver/i2c/i2c_slave.c
+++ b/bthome_phy6222/SDK/components/driver/i2c/i2c_slave.c
@@ -1,12 +1,10 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file i2c_slave.c
@brief i2c slave function
@version 1.0
+ SDK_LICENSE
+
*******************************************************************************/
/*******************************************************************************
diff --git a/bthome_phy6222/SDK/components/driver/i2c/i2c_slave.h b/bthome_phy6222/SDK/components/driver/i2c/i2c_slave.h
index 5afdc9b..ef8ded6 100644
--- a/bthome_phy6222/SDK/components/driver/i2c/i2c_slave.h
+++ b/bthome_phy6222/SDK/components/driver/i2c/i2c_slave.h
@@ -1,12 +1,10 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file i2c_slave.h
@brief i2c slave Configuration,API...
@version 1.0
+ SDK_LICENSE
+
*******************************************************************************/
#ifndef __I2C_SLAVE_H__
diff --git a/bthome_phy6222/SDK/components/driver/key/key.c b/bthome_phy6222/SDK/components/driver/key/key.c
index eccf229..5e585a7 100644
--- a/bthome_phy6222/SDK/components/driver/key/key.c
+++ b/bthome_phy6222/SDK/components/driver/key/key.c
@@ -1,16 +1,13 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************
-
-
Module Name: key
File name: key.c
Brief description:
key driver module
Data: 2020-06-30
Revision:V0.01
+
+ SDK_LICENSE
+
****************************************************************/
#include "rom_sym_def.h"
#include "key.h"
@@ -21,7 +18,7 @@
key_contex_t key_state;
-extern uint32 getMcuPrecisionCount(void);
+//extern uint32 getMcuPrecisionCount(void);
static int key_timer_start(uint32 intval_ms)
{
diff --git a/bthome_phy6222/SDK/components/driver/key/key.h b/bthome_phy6222/SDK/components/driver/key/key.h
index f71cab2..646bf7c 100644
--- a/bthome_phy6222/SDK/components/driver/key/key.h
+++ b/bthome_phy6222/SDK/components/driver/key/key.h
@@ -1,15 +1,13 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
/**************************************************************
-
-
Module Name: key
File name: key.h
Brief description:
key driver module
Data: 2020-06-30
Revision:V0.01
+
+ SDK_LICENSE
+
****************************************************************/
#ifndef __KEY_H__
diff --git a/bthome_phy6222/SDK/components/driver/kscan/kscan.c b/bthome_phy6222/SDK/components/driver/kscan/kscan.c
index 93e37fc..2d720ac 100644
--- a/bthome_phy6222/SDK/components/driver/kscan/kscan.c
+++ b/bthome_phy6222/SDK/components/driver/kscan/kscan.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file kscan.c
@brief Contains all functions support for key scan driver
@@ -9,7 +5,7 @@
@date 13. Nov. 2017
@author Ding
-
+ SDK_LICENSE
*******************************************************************************/
#include "rom_sym_def.h"
diff --git a/bthome_phy6222/SDK/components/driver/kscan/kscan.h b/bthome_phy6222/SDK/components/driver/kscan/kscan.h
index 5575eac..a0e023e 100644
--- a/bthome_phy6222/SDK/components/driver/kscan/kscan.h
+++ b/bthome_phy6222/SDK/components/driver/kscan/kscan.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file kscan.h
@brief Contains all functions support for key scan driver
@@ -9,7 +5,7 @@
@date 13. Nov. 2017
@author Ding
-
+ SDK_LICENSE
*******************************************************************************/
#ifndef __KSCAN__H__
diff --git a/bthome_phy6222/SDK/components/driver/led_light/led_light.c b/bthome_phy6222/SDK/components/driver/led_light/led_light.c
index 30b9beb..c63ee94 100644
--- a/bthome_phy6222/SDK/components/driver/led_light/led_light.c
+++ b/bthome_phy6222/SDK/components/driver/led_light/led_light.c
@@ -1,3 +1,7 @@
+/*************
+ led_light.h
+ SDK_LICENSE
+***************/
#include "led_light.h"
#include "pwm.h"
diff --git a/bthome_phy6222/SDK/components/driver/led_light/led_light.h b/bthome_phy6222/SDK/components/driver/led_light/led_light.h
index aa1620d..41b0c39 100644
--- a/bthome_phy6222/SDK/components/driver/led_light/led_light.h
+++ b/bthome_phy6222/SDK/components/driver/led_light/led_light.h
@@ -1,3 +1,7 @@
+/*************
+ led_light.c
+ SDK_LICENSE
+***************/
#ifndef _LED_LIGHT_H
#define _LED_LIGHT_H
diff --git a/bthome_phy6222/SDK/components/driver/log/log.h b/bthome_phy6222/SDK/components/driver/log/log.h
index 8c32b3c..f2e92c3 100644
--- a/bthome_phy6222/SDK/components/driver/log/log.h
+++ b/bthome_phy6222/SDK/components/driver/log/log.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file log.h
@brief Contains all functions support for uart driver
@@ -9,7 +5,7 @@
@date 31. Jan. 2018
@author eagle.han
-
+ SDK_LICENSE
*******************************************************************************/
#ifndef ENABLE_LOG_ROM
diff --git a/bthome_phy6222/SDK/components/driver/log/my_printf.c b/bthome_phy6222/SDK/components/driver/log/my_printf.c
index 8fa64a2..5c8d0c8 100644
--- a/bthome_phy6222/SDK/components/driver/log/my_printf.c
+++ b/bthome_phy6222/SDK/components/driver/log/my_printf.c
@@ -1,3 +1,7 @@
+/*************
+ my_printf.c
+ SDK_LICENSE
+***************/
#include "rom_sym_def.h"
#include "types.h"
diff --git a/bthome_phy6222/SDK/components/driver/pwm/pwm.c b/bthome_phy6222/SDK/components/driver/pwm/pwm.c
index a808f39..7544769 100644
--- a/bthome_phy6222/SDK/components/driver/pwm/pwm.c
+++ b/bthome_phy6222/SDK/components/driver/pwm/pwm.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file pwm.c
@brief Contains all functions support for pwm driver
@@ -9,7 +5,7 @@
@date 30. Oct. 2017
@author Ding
-
+ SDK_LICENSE
*******************************************************************************/
#include "rom_sym_def.h"
diff --git a/bthome_phy6222/SDK/components/driver/pwm/pwm.h b/bthome_phy6222/SDK/components/driver/pwm/pwm.h
index 4aa637c..bb7f452 100644
--- a/bthome_phy6222/SDK/components/driver/pwm/pwm.h
+++ b/bthome_phy6222/SDK/components/driver/pwm/pwm.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file pwm.h
@brief Contains all functions support for pwm driver
@@ -9,7 +5,7 @@
@date 30. Oct. 2017
@author Ding
-
+ SDK_LICENSE
*******************************************************************************/
#ifndef __PWM__H__
diff --git a/bthome_phy6222/SDK/components/driver/pwrmgr/pwrmgr.c b/bthome_phy6222/SDK/components/driver/pwrmgr/pwrmgr.c
index 4e47e1d..f293e74 100644
--- a/bthome_phy6222/SDK/components/driver/pwrmgr/pwrmgr.c
+++ b/bthome_phy6222/SDK/components/driver/pwrmgr/pwrmgr.c
@@ -1,8 +1,9 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-#include "rom_sym_def.h"
+/************
+ pwrmgr.c
+ SDK_LICENSE
+**************/
#include "types.h"
+#include "rom_sym_def.h"
#include "ll_sleep.h"
#include "bus_dev.h"
#include "string.h"
@@ -14,517 +15,593 @@
#include "clock.h"
#include "jump_function.h"
#include "flash.h"
-
#include "rf_phy_driver.h"
#if(CFG_SLEEP_MODE == PWR_MODE_NO_SLEEP)
- static uint8_t mPwrMode = PWR_MODE_NO_SLEEP;
- #elif(CFG_SLEEP_MODE == PWR_MODE_SLEEP)
- static uint8_t mPwrMode = PWR_MODE_SLEEP;
- #elif(CFG_SLEEP_MODE == PWR_MODE_PWROFF_NO_SLEEP)
- static uint8_t mPwrMode = PWR_MODE_PWROFF_NO_SLEEP;
+ static uint8_t mPwrMode = PWR_MODE_NO_SLEEP;
+#elif(CFG_SLEEP_MODE == PWR_MODE_SLEEP)
+ static uint8_t mPwrMode = PWR_MODE_SLEEP;
+ #elif(CFG_SLEEP_MODE == PWR_MODE_PWROFF_NO_SLEEP)
+ static uint8_t mPwrMode = PWR_MODE_PWROFF_NO_SLEEP;
#else
- #error "CFG_SLEEP_MODE define incorrect"
+ #error "CFG_SLEEP_MODE define incorrect"
#endif
//#define CFG_FLASH_ENABLE_DEEP_SLEEP
#ifdef CFG_FLASH_ENABLE_DEEP_SLEEP
- #warning "CONFIG FLASH ENABLE DEEP SLEEP !!!"
+ #warning "CONFIG FLASH ENABLE DEEP SLEEP !!!"
#endif
#define CFG_SRAM_RETENTION_LOW_CURRENT_LDO_ENABLE
#ifdef CFG_SRAM_RETENTION_LOW_CURRENT_LDO_ENABLE
-// #warning "ENABLE LOW CURRENT LDO FOR SRAM RETENTION !!!"
+// #warning "ENABLE LOW CURRENT LDO FOR SRAM RETENTION !!!"
+#endif
+
+//#define CFG_HCLK_DYNAMIC_CHANGE
+#if(CFG_HCLK_DYNAMIC_CHANGE)
+ #warning "ENABLE CFG_HCLK_DYNAMIC_CHANGE !!!"
#endif
typedef struct _pwrmgr_Context_t
{
- MODULE_e moudle_id;
- bool lock;
- pwrmgr_Hdl_t sleep_handler;
- pwrmgr_Hdl_t wakeup_handler;
+ MODULE_e moudle_id;
+ bool lock;
+ pwrmgr_Hdl_t sleep_handler;
+ pwrmgr_Hdl_t wakeup_handler;
} pwrmgr_Ctx_t;
static pwrmgr_Ctx_t mCtx[HAL_PWRMGR_TASK_MAX_NUM];
-static uint32_t sramRet_config;
+static PWRMGR_CFG_BIT s_pwrmgr_cfg;
static uint32_t s_config_swClk0 = DEF_CLKG_CONFIG_0;
uint32_t s_config_swClk1 = DEF_CLKG_CONFIG_1;
-uint32_t s_gpio_wakeup_src_group1, s_gpio_wakeup_src_group2;
-/*
- osal_idle_task will be call
-*/
-__ATTR_SECTION_SRAM__ void osal_idle_task (void)
-{
- AP_WDT_FEED;
- osal_pwrmgr_powerconserve0();
-}
+#if(CFG_SLEEP_MODE == PWR_MODE_SLEEP)
+ uint32_t s_gpio_wakeup_src_group1,s_gpio_wakeup_src_group2;
+#endif
+
+// /*
+// osal_idle_task will be call
+// */
+// extern void osal_pwrmgr_powerconserve1( void );
+// __ATTR_SECTION_SRAM__ void osal_idle_task (void)
+// {
+// AP_WDT_FEED;
+// osal_pwrmgr_powerconserve1();
+// }
int hal_pwrmgr_init(void)
{
- memset(&mCtx, 0, sizeof(mCtx));
+ memset(&mCtx, 0, sizeof(mCtx));
- switch(mPwrMode)
- {
- case PWR_MODE_NO_SLEEP:
- case PWR_MODE_PWROFF_NO_SLEEP:
- disableSleep();
- break;
+ switch(mPwrMode)
+ {
+ case PWR_MODE_NO_SLEEP:
+ case PWR_MODE_PWROFF_NO_SLEEP:
+ disableSleep();
+ break;
- case PWR_MODE_SLEEP:
- enableSleep();
- break;
- }
+ case PWR_MODE_SLEEP:
+ enableSleep();
+ break;
+ }
- /*
- if wdt enable, set osal idle task to feed wdt before powerconserve
- */
- if(AP_WDT_ENABLE_STATE)
- JUMP_FUNCTION(OSAL_POWER_CONSERVE)=(uint32_t)&osal_idle_task;
-
- return PPlus_SUCCESS;
+ // /*
+ // if wdt enable, set osal idle task to feed wdt before powerconserve
+ // */
+ // if(AP_WDT_ENABLE_STATE)
+ // JUMP_FUNCTION(OSAL_POWER_CONSERVE)=(uint32_t)&osal_idle_task;
+ return PPlus_SUCCESS;
}
int hal_pwrmgr_clk_gate_config(MODULE_e module)
{
- if (module < MOD_CP_CPU)
- {
- s_config_swClk0 |= BIT(module);
- }
- else if (module < MOD_PCLK_CACHE)
- {
- s_config_swClk1 |= BIT(module - MOD_CP_CPU);
- }
+ if (module < MOD_CP_CPU)
+ {
+ s_config_swClk0 |= BIT(module);
+ }
+ else if (module < MOD_PCLK_CACHE)
+ {
+ s_config_swClk1 |= BIT(module - MOD_CP_CPU);
+ }
- return PPlus_SUCCESS;
+ return PPlus_SUCCESS;
}
bool hal_pwrmgr_is_lock(MODULE_e mod)
{
- int i;
- int ret = FALSE;
+ int i;
+ int ret = FALSE;
- if(mPwrMode == PWR_MODE_NO_SLEEP || mPwrMode == PWR_MODE_PWROFF_NO_SLEEP )
- {
- return TRUE;
- }
+ if(mPwrMode == PWR_MODE_NO_SLEEP || mPwrMode == PWR_MODE_PWROFF_NO_SLEEP )
+ {
+ return TRUE;
+ }
- HAL_ENTER_CRITICAL_SECTION();
+ HAL_ENTER_CRITICAL_SECTION();
- for(i = 0; i< HAL_PWRMGR_TASK_MAX_NUM; i++)
- {
- if(mCtx[i].moudle_id == MOD_NONE)
- break;
+ for(i = 0; i< HAL_PWRMGR_TASK_MAX_NUM; i++)
+ {
+ if(mCtx[i].moudle_id == MOD_NONE)
+ break;
- if(mCtx[i].moudle_id == mod)
- {
- if(mCtx[i].lock == TRUE)
- ret = TRUE;
+ if(mCtx[i].moudle_id == mod)
+ {
+ if(mCtx[i].lock == TRUE)
+ ret = TRUE;
- break;
- }
- }
+ break;
+ }
+ }
- HAL_EXIT_CRITICAL_SECTION();
- return ret;
+ HAL_EXIT_CRITICAL_SECTION();
+ return ret;
}
int hal_pwrmgr_lock(MODULE_e mod)
{
- int i;
- int ret = PPlus_ERR_NOT_REGISTED;
+ int i;
+ int ret = PPlus_ERR_NOT_REGISTED;
- if(mPwrMode == PWR_MODE_NO_SLEEP || mPwrMode == PWR_MODE_PWROFF_NO_SLEEP )
- {
- disableSleep();
- return PPlus_SUCCESS;
- }
+ if(mPwrMode == PWR_MODE_NO_SLEEP || mPwrMode == PWR_MODE_PWROFF_NO_SLEEP )
+ {
+ disableSleep();
+ return PPlus_SUCCESS;
+ }
- HAL_ENTER_CRITICAL_SECTION();
+ HAL_ENTER_CRITICAL_SECTION();
- for(i = 0; i< HAL_PWRMGR_TASK_MAX_NUM; i++)
- {
- if(mCtx[i].moudle_id == MOD_NONE)
- break;
+ for(i = 0; i< HAL_PWRMGR_TASK_MAX_NUM; i++)
+ {
+ if(mCtx[i].moudle_id == MOD_NONE)
+ break;
- if(mCtx[i].moudle_id == mod)
- {
- mCtx[i].lock = TRUE;
- disableSleep();
- //LOG("LOCK\n");
- ret = PPlus_SUCCESS;
- break;
- }
- }
+ if(mCtx[i].moudle_id == mod)
+ {
+ mCtx[i].lock = TRUE;
+ disableSleep();
+ //LOG("LOCK\n");
+ ret = PPlus_SUCCESS;
+ break;
+ }
+ }
- HAL_EXIT_CRITICAL_SECTION();
- return ret;
+ HAL_EXIT_CRITICAL_SECTION();
+ return ret;
}
int hal_pwrmgr_unlock(MODULE_e mod)
{
- int i, cnt = 0;
+ int i, cnt = 0;
- if(mPwrMode == PWR_MODE_NO_SLEEP || mPwrMode == PWR_MODE_PWROFF_NO_SLEEP )
- {
- disableSleep();
- return PPlus_SUCCESS;
- }
+ if(mPwrMode == PWR_MODE_NO_SLEEP || mPwrMode == PWR_MODE_PWROFF_NO_SLEEP )
+ {
+ disableSleep();
+ return PPlus_SUCCESS;
+ }
- HAL_ENTER_CRITICAL_SECTION();
+ HAL_ENTER_CRITICAL_SECTION();
- for(i = 0; i< HAL_PWRMGR_TASK_MAX_NUM; i++)
- {
- if(mCtx[i].moudle_id == MOD_NONE)
- break;
+ for(i = 0; i< HAL_PWRMGR_TASK_MAX_NUM; i++)
+ {
+ if(mCtx[i].moudle_id == MOD_NONE)
+ break;
- if(mCtx[i].moudle_id == mod)
- {
- mCtx[i].lock = FALSE;
- }
+ if(mCtx[i].moudle_id == mod)
+ {
+ mCtx[i].lock = FALSE;
+ }
- if(mCtx[i].lock)
- cnt ++;
- }
+ if(mCtx[i].lock)
+ cnt ++;
+ }
- if(cnt == 0)
- enableSleep();
- else
- disableSleep();
+ if(cnt == 0)
+ enableSleep();
+ else
+ disableSleep();
- HAL_EXIT_CRITICAL_SECTION();
- //LOG("sleep mode:%d\n", isSleepAllow());
- return PPlus_SUCCESS;
+ HAL_EXIT_CRITICAL_SECTION();
+ //LOG("sleep mode:%d\n", isSleepAllow());
+ return PPlus_SUCCESS;
}
int hal_pwrmgr_register(MODULE_e mod, pwrmgr_Hdl_t sleepHandle, pwrmgr_Hdl_t wakeupHandle)
{
- int i;
- pwrmgr_Ctx_t* pctx = NULL;
+ int i;
+ pwrmgr_Ctx_t* pctx = NULL;
- for(i = 0; i< HAL_PWRMGR_TASK_MAX_NUM; i++)
- {
- if(mCtx[i].moudle_id == mod)
- return PPlus_ERR_INVALID_STATE;
+ for(i = 0; i< HAL_PWRMGR_TASK_MAX_NUM; i++)
+ {
+ if(mCtx[i].moudle_id == mod)
+ return PPlus_ERR_INVALID_STATE;
- if(mCtx[i].moudle_id == MOD_NONE)
- {
- pctx = &mCtx[i];
- break;
- }
- }
+ if(mCtx[i].moudle_id == MOD_NONE)
+ {
+ pctx = &mCtx[i];
+ s_pwrmgr_cfg.moudle_num++;
+ break;
+ }
+ }
- if(pctx == NULL)
- return PPlus_ERR_NO_MEM;
+ if(pctx == NULL)
+ return PPlus_ERR_NO_MEM;
- pctx->lock = FALSE;
- pctx->moudle_id = mod;
- pctx->sleep_handler = sleepHandle;
- pctx->wakeup_handler = wakeupHandle;
- return PPlus_SUCCESS;
+ pctx->lock = FALSE;
+ pctx->moudle_id = mod;
+ pctx->sleep_handler = sleepHandle;
+ pctx->wakeup_handler = wakeupHandle;
+ return PPlus_SUCCESS;
}
int hal_pwrmgr_unregister(MODULE_e mod)
{
- int i;
- pwrmgr_Ctx_t* pctx = NULL;
+ int i;
+ pwrmgr_Ctx_t* pctx = NULL;
- for(i = 0; i< HAL_PWRMGR_TASK_MAX_NUM; i++)
- {
- if(mCtx[i].moudle_id == mod)
- {
- pctx = &mCtx[i];
- break;
- }
+ for(i = 0; i< HAL_PWRMGR_TASK_MAX_NUM; i++)
+ {
+ if(mCtx[i].moudle_id == mod)
+ {
+ s_pwrmgr_cfg.moudle_num--;
+ pctx = &mCtx[i];
+ break;
+ }
- if(mCtx[i].moudle_id == MOD_NONE)
- {
- return PPlus_ERR_NOT_REGISTED;
- }
- }
+ if(mCtx[i].moudle_id == MOD_NONE)
+ {
+ return PPlus_ERR_NOT_REGISTED;
+ }
+ }
- if(pctx == NULL)
- return PPlus_ERR_NOT_REGISTED;
+ if(pctx == NULL)
+ return PPlus_ERR_NOT_REGISTED;
- HAL_ENTER_CRITICAL_SECTION();
- memcpy(pctx, pctx+1, sizeof(pwrmgr_Ctx_t)*(HAL_PWRMGR_TASK_MAX_NUM-i-1));
- HAL_EXIT_CRITICAL_SECTION();
- return PPlus_SUCCESS;
+ HAL_ENTER_CRITICAL_SECTION();
+ memcpy(pctx, pctx+1, sizeof(pwrmgr_Ctx_t)*(HAL_PWRMGR_TASK_MAX_NUM-i-1));
+ HAL_EXIT_CRITICAL_SECTION();
+ return PPlus_SUCCESS;
}
+void clk_change_mod_restore(void)
+{
+ int i;
+
+ for(i = 0; i< HAL_PWRMGR_TASK_MAX_NUM; i++)
+ {
+ if(mCtx[i].moudle_id == MOD_NONE)
+ {
+ return ;
+ }
+
+ if(mCtx[i].wakeup_handler)
+ mCtx[i].wakeup_handler();
+ }
+
+ return;
+}
+
+#if(CFG_SLEEP_MODE == PWR_MODE_SLEEP)
+void peripheral_interrupt_restore_default(void)
+{
+ NVIC_SetPriority((IRQn_Type)KSCAN_IRQn, IRQ_PRIO_HAL);
+ NVIC_SetPriority((IRQn_Type)WDT_IRQn, IRQ_PRIO_HAL);
+ NVIC_SetPriority((IRQn_Type)UART0_IRQn, IRQ_PRIO_HAL);
+ NVIC_SetPriority((IRQn_Type)UART1_IRQn, IRQ_PRIO_HAL);
+ NVIC_SetPriority((IRQn_Type)I2C0_IRQn, IRQ_PRIO_HAL);
+ NVIC_SetPriority((IRQn_Type)I2C1_IRQn, IRQ_PRIO_HAL);
+ NVIC_SetPriority((IRQn_Type)SPI0_IRQn, IRQ_PRIO_HAL);
+ NVIC_SetPriority((IRQn_Type)SPI1_IRQn, IRQ_PRIO_HAL);
+ NVIC_SetPriority((IRQn_Type)GPIO_IRQn, IRQ_PRIO_HAL);
+ NVIC_SetPriority((IRQn_Type)DMAC_IRQn, IRQ_PRIO_HAL);
+ NVIC_SetPriority((IRQn_Type)TIM5_IRQn, IRQ_PRIO_HAL);
+ NVIC_SetPriority((IRQn_Type)TIM6_IRQn, IRQ_PRIO_HAL);
+ NVIC_SetPriority((IRQn_Type)ADCC_IRQn, IRQ_PRIO_HAL);
+}
int __attribute__((used)) hal_pwrmgr_wakeup_process(void)
{
- int i;
-#ifdef CFG_FLASH_ENABLE_DEEP_SLEEP
- extern void spif_release_deep_sleep(void);
- spif_release_deep_sleep();
- WaitRTCCount(8); // 8*32us
-#endif
- AP_PCR->SW_CLK = s_config_swClk0;
- AP_PCR->SW_CLK1 = s_config_swClk1 | 0x01; //force set M0 CPU
- s_gpio_wakeup_src_group1 = AP_AON->GPIO_WAKEUP_SRC[0];
- s_gpio_wakeup_src_group2 = AP_AON->GPIO_WAKEUP_SRC[1];
- //restore BB TIMER IRQ_PRIO
- NVIC_SetPriority((IRQn_Type)BB_IRQn, IRQ_PRIO_REALTIME);
- NVIC_SetPriority((IRQn_Type)TIM1_IRQn, IRQ_PRIO_HIGH); //ll_EVT
- NVIC_SetPriority((IRQn_Type)TIM2_IRQn, IRQ_PRIO_HIGH); //OSAL_TICK
- NVIC_SetPriority((IRQn_Type)TIM4_IRQn, IRQ_PRIO_HIGH); //LL_EXA_ADV
+ int i;
+ #ifdef CFG_FLASH_ENABLE_DEEP_SLEEP
+ extern void spif_release_deep_sleep(void);
+ spif_release_deep_sleep();
+ WaitRTCCount(8);
+ #endif
+ AP_PCR->SW_CLK = s_config_swClk0;
+ AP_PCR->SW_CLK1 = s_config_swClk1|0x01;//force set M0 CPU
+ s_gpio_wakeup_src_group1 = AP_AON->GPIO_WAKEUP_SRC[0];
+ s_gpio_wakeup_src_group2 = AP_AON->GPIO_WAKEUP_SRC[1];
+ //restore BB TIMER IRQ_PRIO
+ NVIC_SetPriority((IRQn_Type)BB_IRQn, IRQ_PRIO_REALTIME);
+ NVIC_SetPriority((IRQn_Type)TIM1_IRQn, IRQ_PRIO_HIGH); //ll_EVT
+ NVIC_SetPriority((IRQn_Type)TIM2_IRQn, IRQ_PRIO_HIGH); //OSAL_TICK
+ NVIC_SetPriority((IRQn_Type)TIM4_IRQn, IRQ_PRIO_HIGH); //LL_EXA_ADV
+ //peripheral_interrupt_restore_default();
- for(i = 0; i< HAL_PWRMGR_TASK_MAX_NUM; i++)
- {
- if(mCtx[i].moudle_id == MOD_NONE)
- {
- return PPlus_ERR_NOT_REGISTED;
- }
+ for(i = 0; i< s_pwrmgr_cfg.moudle_num; i++)
+ {
+ if(mCtx[i].moudle_id == MOD_NONE)
+ {
+ return PPlus_ERR_NOT_REGISTED;
+ }
- if(mCtx[i].wakeup_handler)
- mCtx[i].wakeup_handler();
- }
+ if(mCtx[i].wakeup_handler)
+ mCtx[i].wakeup_handler();
+ }
- return PPlus_SUCCESS;
+ return PPlus_SUCCESS;
}
int __attribute__((used)) hal_pwrmgr_sleep_process(void)
{
- int i;
- //20181013 ZQ :
- hal_pwrmgr_RAM_retention_set();
+ int i;
+ //20181013 ZQ :
+ hal_pwrmgr_RAM_retention_set();
- //LOG("Sleep\n");
- for(i = 0; i< HAL_PWRMGR_TASK_MAX_NUM; i++)
- {
- if(mCtx[i].moudle_id == MOD_NONE)
- {
- //return PPlus_ERR_NOT_REGISTED;
- //found last module
- break;
- }
+ //LOG("Sleep\n");
+ for(i = s_pwrmgr_cfg.moudle_num-1; i >= 0; i--)
+ {
+ if(mCtx[i].moudle_id == MOD_NONE)
+ {
+ return PPlus_ERR_NOT_REGISTED;
+ }
- if(mCtx[i].sleep_handler)
- mCtx[i].sleep_handler();
- }
+ if(mCtx[i].sleep_handler)
+ mCtx[i].sleep_handler();
+ }
-#ifdef CFG_FLASH_ENABLE_DEEP_SLEEP
- extern void spif_set_deep_sleep(void);
- spif_set_deep_sleep();
+#if(CFG_HCLK_DYNAMIC_CHANGE==1)
+ /*
+ hclk will change to SYS_CLK_XTAL_16M in next wakeup_process
+ */
+ hal_system_clock_change_req(SYS_CLK_XTAL_16M);
#endif
- return PPlus_SUCCESS;
+#ifdef CFG_FLASH_ENABLE_DEEP_SLEEP
+ extern void spif_set_deep_sleep(void);
+ spif_set_deep_sleep();
+#endif
+ return PPlus_SUCCESS;
+}
+#else
+int __attribute__((used)) hal_pwrmgr_wakeup_process(void)
+{
+ return PPlus_SUCCESS;
}
+int __attribute__((used)) hal_pwrmgr_sleep_process(void)
+{
+ return PPlus_SUCCESS;
+}
+
+
+#endif
+
+
/**************************************************************************************
- @fn hal_pwrmgr_RAM_retention
+ @fn hal_pwrmgr_RAM_retention
- @brief This function process for enable retention sram
+ @brief This function process for enable retention sram
- input parameters
+ input parameters
- @param uint32_t sram: sram bit map
+ @param uint32_t sram: sram bit map
- output parameters
+ output parameters
- @param None.
+ @param None.
- @return refer error.h.
+ @return refer error.h.
**************************************************************************************/
int hal_pwrmgr_RAM_retention(uint32_t sram)
{
- if(sram & 0xffffffe0)
- {
- sramRet_config = 0x00;
- return PPlus_ERR_INVALID_PARAM;
- }
+ if(sram & 0xffffffe0)
+ {
+ s_pwrmgr_cfg.sramRet_config = 0x00;
+ return PPlus_ERR_INVALID_PARAM;
+ }
- sramRet_config = sram;
- return PPlus_SUCCESS;
+ s_pwrmgr_cfg.sramRet_config = sram;
+ return PPlus_SUCCESS;
}
int hal_pwrmgr_RAM_retention_clr(void)
{
- subWriteReg(0x4000f01c,21,17,0);
- return PPlus_SUCCESS;
+ subWriteReg(0x4000f01c,21,17,0);
+ return PPlus_SUCCESS;
}
int hal_pwrmgr_RAM_retention_set(void)
{
- subWriteReg(0x4000f01c,21,17,sramRet_config);
- return PPlus_SUCCESS;
+ subWriteReg(0x4000f01c,21,17,s_pwrmgr_cfg.sramRet_config);
+ return PPlus_SUCCESS;
}
int hal_pwrmgr_LowCurrentLdo_enable(void)
{
#ifdef CFG_SRAM_RETENTION_LOW_CURRENT_LDO_ENABLE
- uint32_t retention_flag;
- hal_flash_read(0x1100181c,(uint8_t*)&retention_flag,4);
+ uint32_t retention_flag;
+ hal_flash_read(0x1100181c,(uint8_t*)&retention_flag,4);
- if(retention_flag == 0xffffffff)
- {
- subWriteReg(0x4000f014,26,26, 1);
- }
+ if(retention_flag == 0xffffffff)
+ {
+ subWriteReg(0x4000f014,26,26, 1);
+ }
- return PPlus_SUCCESS;
+ return PPlus_SUCCESS;
#else
- return PPlus_ERR_FORBIDDEN;
+ subWriteReg(0x4000f014,26,26, 0);
+ return PPlus_ERR_FORBIDDEN;
#endif
}
int hal_pwrmgr_LowCurrentLdo_disable(void)
{
- subWriteReg(0x4000f014,26,26, 0);
- return PPlus_SUCCESS;
+ subWriteReg(0x4000f014,26,26, 0);
+ return PPlus_SUCCESS;
}
extern void gpio_wakeup_set(gpio_pin_e pin, gpio_polarity_e type);
extern void gpio_pull_set(gpio_pin_e pin, gpio_pupd_e type);
void hal_pwrmgr_poweroff(pwroff_cfg_t* pcfg, uint8_t wakeup_pin_num)
{
- HAL_ENTER_CRITICAL_SECTION();
- subWriteReg(0x4000f01c,6,6,0x00); //disable software control
- //(void)(wakeup_pin_num);
+ HAL_ENTER_CRITICAL_SECTION();
+ subWriteReg(0x4000f01c,6,6,0x00); //disable software control
+ //(void)(wakeup_pin_num);
- for(uint8_t i = 0; i < wakeup_pin_num; i++ )
- {
- if(pcfg[i].type==POL_FALLING)
- gpio_pull_set(pcfg[i].pin,GPIO_PULL_UP_S);
- else
- gpio_pull_set(pcfg[i].pin,GPIO_PULL_DOWN);
+ for(uint8_t i = 0; i < wakeup_pin_num; i++ )
+ {
+ if(pcfg[i].type==POL_FALLING)
+ gpio_pull_set(pcfg[i].pin,GPIO_PULL_UP_S);
+ else
+ gpio_pull_set(pcfg[i].pin,GPIO_PULL_DOWN);
- gpio_wakeup_set(pcfg[i].pin, pcfg[i].type);
- }
+ gpio_wakeup_set(pcfg[i].pin, pcfg[i].type);
+ }
- /**
- config reset casue as RSTC_OFF_MODE
- reset path walkaround dwc
- */
+ /**
+ config reset casue as RSTC_OFF_MODE
+ reset path walkaround dwc
+ */
+ AON_CLEAR_XTAL_TRACKING_AND_CALIB;
+ AP_AON->SLEEP_R[0] = 2;
+ enter_sleep_off_mode(SYSTEM_OFF_MODE);
- AON_CLEAR_XTAL_TRACKING_AND_CALIB;
-
- AP_AON->SLEEP_R[0] = 2;
- write_reg(0x4000f000,0x5a5aa5a5);
-
- while(1);
+ while(1);
}
__ATTR_SECTION_SRAM__ void hal_pwrmgr_enter_sleep_rtc_reset(uint32_t sleepRtcTick)
{
- HAL_ENTER_CRITICAL_SECTION();
- subWriteReg(0x4000f01c,6,6,0x00); //disable software control
- config_RTC(sleepRtcTick);
- // clear sram retention
- hal_pwrmgr_RAM_retention_clr();
- /**
- config reset casue as RSTC_WARM_NDWC
- reset path walkaround dwc
- */
-
- AON_CLEAR_XTAL_TRACKING_AND_CALIB;
+ HAL_ENTER_CRITICAL_SECTION();
+ subWriteReg(0x4000f01c,6,6,0x00); //disable software control
+ config_RTC(sleepRtcTick);
+ // clear sram retention
+ hal_pwrmgr_RAM_retention_clr();
+ /**
+ config reset casue as RSTC_WARM_NDWC
+ reset path walkaround dwc
+ */
+ AON_CLEAR_XTAL_TRACKING_AND_CALIB;
+ AP_AON->SLEEP_R[0]=4;
+ enter_sleep_off_mode(SYSTEM_SLEEP_MODE);
- AP_AON->SLEEP_R[0]=4;
- enter_sleep_off_mode(SYSTEM_SLEEP_MODE);
-
- while(1) {};
+ while(1) {};
}
-#define STANDBY_WAIT_MS(a) WaitRTCCount((a)<<5) // 32us * 32 around 1ms
-__attribute__((section("_section_standby_var_"))) pwroff_cfg_t s_pwroff_cfg[WAKEUP_PIN_MAX];
-__attribute__((section("_section_standby_var_"))) __attribute__((used)) uint8 pwroff_register_number=0;
+#define STANDBY_WAIT_MS(a) WaitRTCCount((a)<<5) // 32us * 32 around 1ms
+pwroff_cfg_t s_pwroff_cfg[WAKEUP_PIN_MAX];
+__attribute__((used)) uint8 pwroff_register_number=0;
__attribute__((section("_section_standby_code_"))) void wakeupProcess_standby(void)
{
- subWriteReg(0x4000f014,29,27,0x07);
- STANDBY_WAIT_MS(5);
+ subWriteReg(0x4000f014,29,27,0x07);
+ STANDBY_WAIT_MS(5);
#ifdef CFG_FLASH_ENABLE_DEEP_SLEEP
- extern void spif_release_deep_sleep(void);
- spif_release_deep_sleep();
- STANDBY_WAIT_MS(15);
+ extern void spif_release_deep_sleep(void);
+ spif_release_deep_sleep();
+ STANDBY_WAIT_MS(15);
#endif
- uint32_t volatile cnt=0;
- uint8_t volatile find_flag=0;
- uint8 pin_n=0;
- extern bool gpio_read(gpio_pin_e pin);
+ uint32_t volatile cnt=0;
+ uint8_t volatile find_flag=0;
+ uint8 pin_n=0;
+ extern bool gpio_read(gpio_pin_e pin);
- for(pin_n=0; pin_n(s_pwroff_cfg[pin_n].on_time>>5))
- {
- write_reg(0x4000f030, 0x01);
- break;
- }
- }
- else
- hal_pwrmgr_enter_standby(&s_pwroff_cfg[0],pwroff_register_number);
- }
+ if(cnt>(s_pwroff_cfg[pin_n].on_time>>5))
+ {
+ write_reg(0x4000f030, 0x01);
+ break;
+ }
+ }
+ else
+ hal_pwrmgr_enter_standby(&s_pwroff_cfg[0],pwroff_register_number);
+ }
- set_sleep_flag(0);
- AP_AON->SLEEP_R[0] = 4;
- HAL_ENTER_CRITICAL_SECTION();
- AP_PCR->SW_RESET1 = 0;
+ set_sleep_flag(0);
+ AP_AON->SLEEP_R[0] = 4;
+ AON_CLEAR_XTAL_TRACKING_AND_CALIB;
+ HAL_ENTER_CRITICAL_SECTION();
+ AP_PCR->SW_RESET1 = 0;
- while(1);
+ while(1);
}
extern void gpio_wakeup_set(gpio_pin_e pin, gpio_polarity_e type);
extern void gpio_pull_set(gpio_pin_e pin, gpio_pupd_e type);
__attribute__((section("_section_standby_code_"))) void hal_pwrmgr_enter_standby(pwroff_cfg_t* pcfg,uint8_t wakeup_pin_num)
{
- HAL_ENTER_CRITICAL_SECTION();
- subWriteReg(0x4000f01c,6,6,0x00); //disable software control
- uint8_t i = 0;
+ HAL_ENTER_CRITICAL_SECTION();
+ subWriteReg(0x4000f01c,6,6,0x00); //disable software control
+ uint8_t i = 0;
- if(wakeup_pin_num>WAKEUP_PIN_MAX)
- {
- wakeup_pin_num=WAKEUP_PIN_MAX;
- }
+ if(wakeup_pin_num>WAKEUP_PIN_MAX)
+ {
+ wakeup_pin_num=WAKEUP_PIN_MAX;
+ }
- for(i = 0; i < wakeup_pin_num; i++)
- {
- if(pcfg[i].type==POL_FALLING)
- gpio_pull_set(pcfg[i].pin,GPIO_PULL_UP_S);
- else
- gpio_pull_set(pcfg[i].pin,GPIO_PULL_DOWN);
+ pwroff_register_number=wakeup_pin_num;
- gpio_wakeup_set(pcfg[i].pin, pcfg[i].type);
- osal_memcpy(&s_pwroff_cfg[i],&(pcfg[i]),sizeof(pwroff_cfg_t));
- pwroff_register_number++;
- }
+ for(i = 0; i < wakeup_pin_num; i++)
+ {
+ if(pcfg[i].type==POL_FALLING)
+ gpio_pull_set(pcfg[i].pin,GPIO_PULL_UP_S);
+ else
+ gpio_pull_set(pcfg[i].pin,GPIO_PULL_DOWN);
- JUMP_FUNCTION(WAKEUP_PROCESS)= (uint32_t)&wakeupProcess_standby;
+ gpio_wakeup_set(pcfg[i].pin, pcfg[i].type);
+ osal_memcpy(&s_pwroff_cfg[i],&(pcfg[i]),sizeof(pwroff_cfg_t));
+ }
+
+ JUMP_FUNCTION(WAKEUP_PROCESS)= (uint32_t)&wakeupProcess_standby;
#ifdef CFG_FLASH_ENABLE_DEEP_SLEEP
- extern void spif_set_deep_sleep(void);
- spif_set_deep_sleep();
- WaitRTCCount(50); // 50*32us
+ extern void spif_set_deep_sleep(void);
+ spif_set_deep_sleep();
+ WaitRTCCount(50);
#endif
- subWriteReg(0x4000f014,29,27,0);
- set_sleep_flag(1);
- AP_AON->SLEEP_R[0] = 2;
- subWriteReg(0x4000f01c,21,17,RET_SRAM0);
- enter_sleep_off_mode(SYSTEM_SLEEP_MODE);
+ subWriteReg(0x4000f014,29,27,0);
+ set_sleep_flag(1);
+ AP_AON->SLEEP_R[0] = 2;
+ subWriteReg(0x4000f01c,21,17,RET_SRAM0);
+ enter_sleep_off_mode(SYSTEM_SLEEP_MODE);
- while(1);
+ while(1);
}
+__ATTR_SECTION_XIP__ int hal_pwrmgr_get_module_lock_status(void)
+{
+ if (mPwrMode == PWR_MODE_NO_SLEEP || mPwrMode == PWR_MODE_PWROFF_NO_SLEEP)
+ {
+ disableSleep();
+ return FALSE;
+ }
+ for (int i = 0; i < HAL_PWRMGR_TASK_MAX_NUM; i++)
+ {
+ if (mCtx[i].lock == TRUE)
+ {
+ return FALSE;
+ }
+ }
-
-
+ return TRUE;
+}
diff --git a/bthome_phy6222/SDK/components/driver/pwrmgr/pwrmgr.h b/bthome_phy6222/SDK/components/driver/pwrmgr/pwrmgr.h
index 3d68907..ad8fa1f 100644
--- a/bthome_phy6222/SDK/components/driver/pwrmgr/pwrmgr.h
+++ b/bthome_phy6222/SDK/components/driver/pwrmgr/pwrmgr.h
@@ -1,8 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
+/************
+ pwrmgr.c
+ SDK_LICENSE
+**************/
#ifndef _HAL_PWRMGR_HD
#define _HAL_PWRMGR_HD
@@ -14,34 +13,43 @@ extern "C" {
#include "bus_dev.h"
#include "gpio.h"
+#include "clock.h"
-#define PWR_MODE_NO_SLEEP 1
-#define PWR_MODE_SLEEP 2
-#define PWR_MODE_PWROFF_NO_SLEEP 4
+#define PWR_MODE_NO_SLEEP 1
+#define PWR_MODE_SLEEP 2
+#define PWR_MODE_PWROFF_NO_SLEEP 4
//WAKEUP FROM STANDBY MODE
-#define WAKEUP_PIN_MAX 3
+#define WAKEUP_PIN_MAX 3
-#define HAL_PWRMGR_TASK_MAX_NUM 10
+#define HAL_PWRMGR_TASK_MAX_NUM 10
-#define RET_SRAM0 BIT(0) /*32K, 0x1fff0000~0x1fff7fff*/
-#define RET_SRAM1 BIT(1) /*16K, 0x1fff8000~0x1fffbfff*/
-#define RET_SRAM2 BIT(2) /*16K, 0x1fffc000~0x1fffffff*/
+#define RET_SRAM0 BIT(0) /*32K, 0x1fff0000~0x1fff7fff*/
+#define RET_SRAM1 BIT(1) /*16K, 0x1fff8000~0x1fffbfff*/
+#define RET_SRAM2 BIT(2) /*16K, 0x1fffc000~0x1fffffff*/
-#define DEF_CLKG_CONFIG_0 (_CLK_IOMUX|_CLK_UART0|_CLK_GPIO|_CLK_SPIF|_CLK_DMA)
+#define DEF_CLKG_CONFIG_0 (_CLK_IOMUX|_CLK_UART0|_CLK_GPIO|_CLK_SPIF|_CLK_DMA|_CLK_TIMER5)
-#define DEF_CLKG_CONFIG_1 (_CLK_M0_CPU | _CLK_BB |_CLK_TIMER |_CLK_BBREG \
- |_CLK_TIMER1|_CLK_TIMER2|_CLK_TIMER3|_CLK_TIMER4|_CLK_COM)
+#define DEF_CLKG_CONFIG_1 (_CLK_M0_CPU | _CLK_BB |_CLK_TIMER |_CLK_BBREG \
+ |_CLK_TIMER1|_CLK_TIMER2|_CLK_TIMER3|_CLK_TIMER4|_CLK_COM)
typedef struct
{
- gpio_pin_e pin;
- gpio_polarity_e type;
- uint16_t on_time;
+ gpio_pin_e pin;
+ gpio_polarity_e type;
+ uint16_t on_time;
} pwroff_cfg_t;
+typedef struct
+{
+ uint8_t sramRet_config:3;
+ uint8_t moudle_num:5;
+} PWRMGR_CFG_BIT;
+
+
extern uint32_t g_system_reset_cause;
+extern sysclk_t g_system_clk_change;
typedef void (*pwrmgr_Hdl_t)(void);
@@ -59,11 +67,16 @@ int hal_pwrmgr_RAM_retention_clr(void);
int hal_pwrmgr_RAM_retention_set(void);
int hal_pwrmgr_LowCurrentLdo_enable(void);
int hal_pwrmgr_LowCurrentLdo_disable(void);
+int hal_pwrmgr_get_module_lock_status(void);
void hal_pwrmgr_poweroff(pwroff_cfg_t* pcfg, uint8_t wakeup_pin_num);
__ATTR_SECTION_SRAM__ void hal_pwrmgr_enter_sleep_rtc_reset(uint32_t sleepRtcTick);
void hal_pwrmgr_enter_standby(pwroff_cfg_t* pcfg,uint8_t wakeup_pin_num) ;
+void clk_change_mod_restore(void);
+extern uint8_t hal_system_clock_change_req(sysclk_t clk);
+extern uint8_t hal_system_clock_change_active(sysclk_t clk,pwrmgr_Hdl_t restoreHandle);
+
#ifdef __cplusplus
}
#endif
diff --git a/bthome_phy6222/SDK/components/driver/qdec/qdec.c b/bthome_phy6222/SDK/components/driver/qdec/qdec.c
index 9b532d6..86462f6 100644
--- a/bthome_phy6222/SDK/components/driver/qdec/qdec.c
+++ b/bthome_phy6222/SDK/components/driver/qdec/qdec.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file qdec.c
@brief Contains all functions support for key scan driver
@@ -9,7 +5,7 @@
@date 13. Nov. 2017
@author Ding
-
+ SDK_LICENSE
*******************************************************************************/
#include "rom_sym_def.h"
diff --git a/bthome_phy6222/SDK/components/driver/qdec/qdec.h b/bthome_phy6222/SDK/components/driver/qdec/qdec.h
index 3becd75..3f387c3 100644
--- a/bthome_phy6222/SDK/components/driver/qdec/qdec.h
+++ b/bthome_phy6222/SDK/components/driver/qdec/qdec.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file qdec.h
@brief Contains all functions support for key scan driver
@@ -9,7 +5,7 @@
@date 13. Nov. 2017
@author Ding
-
+ SDK_LICENSE
*******************************************************************************/
#ifndef __QDEC__H__
diff --git a/bthome_phy6222/SDK/components/driver/spi/spi.c b/bthome_phy6222/SDK/components/driver/spi/spi.c
index 5ed897b..b52b064 100644
--- a/bthome_phy6222/SDK/components/driver/spi/spi.c
+++ b/bthome_phy6222/SDK/components/driver/spi/spi.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file spi.c
@brief Contains all functions support for spi driver
@@ -9,7 +5,7 @@
@date 18. Oct. 2017
@author qing.han
-
+ SDK_LICENSE
*******************************************************************************/
#include "rom_sym_def.h"
@@ -47,11 +43,20 @@ static spi_Ctx_t m_spiCtx[2];
static void hal_spi_write_fifo(AP_SSI_TypeDef* Ssix,uint8_t len,uint8_t* tx_rx_ptr)
{
uint8_t i=0;
+ SPI_INDEX_e spi_index = (Ssix == AP_SPI0) ? SPI0 : SPI1;
HAL_ENTER_CRITICAL_SECTION();
while(iDataReg = *(tx_rx_ptr+i);
+ if (m_spiCtx[spi_index].cfg.spi_dfsmod <= SPI_1BYTE)
+ {
+ Ssix->DataReg = *(tx_rx_ptr+i);
+ }
+ else
+ {
+ Ssix->DataReg = *((uint16_t*)tx_rx_ptr+i);
+ }
+
i++;
}
@@ -114,6 +119,7 @@ static void spi_int_handle(uint8_t id, spi_Ctx_t* pctx, AP_SSI_TypeDef* Ssix)
if(trans_ptr->tx_offset == trans_ptr->xmit_len)
{
Ssix->IMR = 0x10;
+ m_spiCtx[pctx->spi_info->spi_index].transmit.busy = FALSE;
break;
}
}
@@ -448,30 +454,32 @@ static void hal_spi_master_init(hal_spi_t* spi_ptr,uint32_t baud,SPI_SCMOD_e scm
static void config_dma_channel4spitx(hal_spi_t* spi_ptr,uint8_t* tx_buf,uint16_t tx_len)
{
DMA_CH_CFG_t cfgc;
-// uint16_t* size16_tx_buf;
AP_SSI_TypeDef* Ssix = NULL;
Ssix = (spi_ptr->spi_index == SPI0) ? AP_SPI0 : AP_SPI1;
Ssix->DMACR &= 0x01;
spi_Ctx_t* pctx;
pctx = &m_spiCtx[spi_ptr->spi_index];
-// if(pctx->cfg.spi_dfsmod == SPI_2BYTE)
-// size16_tx_buf = (uint16_t *)tx_buf;
- cfgc.transf_size = tx_len;
cfgc.sinc = DMA_INC_INC;
- if(pctx->cfg.spi_dfsmod == SPI_1BYTE)
+ if(pctx->cfg.spi_dfsmod <= SPI_1BYTE)
{
+ hal_spi_dfs_set(spi_ptr,SPI_1BYTE);
+ cfgc.transf_size = tx_len;
cfgc.src_tr_width = DMA_WIDTH_BYTE;
cfgc.dst_tr_width = DMA_WIDTH_BYTE;
+ cfgc.src_addr = (uint32_t)tx_buf;
}
else
{
+ uint16_t* size16_tx_buf = (uint16_t*)tx_buf;
+ hal_spi_dfs_set(spi_ptr,SPI_2BYTE);
+ cfgc.transf_size = tx_len/2;
cfgc.src_tr_width = DMA_WIDTH_HALFWORD;
cfgc.dst_tr_width = DMA_WIDTH_HALFWORD;
+ cfgc.src_addr = (uint32_t)size16_tx_buf;
}
cfgc.src_msize = DMA_BSIZE_1;
- cfgc.src_addr = (uint32_t)tx_buf;
cfgc.dinc = DMA_INC_NCHG;
cfgc.dst_msize = DMA_BSIZE_1;
cfgc.dst_addr = (uint32_t)&(Ssix->DataReg);
@@ -515,7 +523,7 @@ static int hal_spi_xmit_polling
)
{
uint32_t rx_size = rx_len, tx_size = tx_len;
- uint32_t tmp_len,i;
+ uint32_t tmp_len,i,tmp_tx_buf_len = 0;
AP_SSI_TypeDef* Ssix = NULL;
#if DMAC_USE
spi_Ctx_t* pctx;
@@ -557,70 +565,157 @@ static int hal_spi_xmit_polling
if(tx_buf)
{
//support divider 2
- switch (tmp_len)
+ if (m_spiCtx[spi_ptr->spi_index].cfg.spi_dfsmod <= SPI_1BYTE)
{
- case 1:
- Ssix->DataReg = *tx_buf;
- break;
+ switch (tmp_len)
+ {
+ case 1:
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len);
+ tmp_tx_buf_len += 1;
+ break;
- case 2:
- Ssix->DataReg = *tx_buf;
- Ssix->DataReg = *(tx_buf+1);
- break;
+ case 2:
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+1);
+ tmp_tx_buf_len += 2;
+ break;
- case 3:
- Ssix->DataReg = *tx_buf;
- Ssix->DataReg = *(tx_buf+1);
- Ssix->DataReg = *(tx_buf+2);
- break;
+ case 3:
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+1);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+2);
+ tmp_tx_buf_len += 3;
+ break;
- case 4:
- Ssix->DataReg = *tx_buf;
- Ssix->DataReg = *(tx_buf+1);
- Ssix->DataReg = *(tx_buf+2);
- Ssix->DataReg = *(tx_buf+3);
- break;
+ case 4:
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+1);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+2);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+3);
+ tmp_tx_buf_len += 4;
+ break;
- case 5:
- Ssix->DataReg = *tx_buf;
- Ssix->DataReg = *(tx_buf+1);
- Ssix->DataReg = *(tx_buf+2);
- Ssix->DataReg = *(tx_buf+3);
- Ssix->DataReg = *(tx_buf+4);
- break;
+ case 5:
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+1);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+2);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+3);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+4);
+ tmp_tx_buf_len += 5;
+ break;
- case 6:
- Ssix->DataReg = *tx_buf;
- Ssix->DataReg = *(tx_buf+1);
- Ssix->DataReg = *(tx_buf+2);
- Ssix->DataReg = *(tx_buf+3);
- Ssix->DataReg = *(tx_buf+4);
- Ssix->DataReg = *(tx_buf+5);
- break;
+ case 6:
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+1);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+2);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+3);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+4);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+5);
+ tmp_tx_buf_len += 6;
+ break;
- case 7:
- Ssix->DataReg = *tx_buf;
- Ssix->DataReg = *(tx_buf+1);
- Ssix->DataReg = *(tx_buf+2);
- Ssix->DataReg = *(tx_buf+3);
- Ssix->DataReg = *(tx_buf+4);
- Ssix->DataReg = *(tx_buf+5);
- Ssix->DataReg = *(tx_buf+6);
- break;
+ case 7:
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+1);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+2);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+3);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+4);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+5);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+6);
+ tmp_tx_buf_len += 7;
+ break;
- case 8:
- Ssix->DataReg = *tx_buf;
- Ssix->DataReg = *(tx_buf+1);
- Ssix->DataReg = *(tx_buf+2);
- Ssix->DataReg = *(tx_buf+3);
- Ssix->DataReg = *(tx_buf+4);
- Ssix->DataReg = *(tx_buf+5);
- Ssix->DataReg = *(tx_buf+6);
- Ssix->DataReg = *(tx_buf+7);
- break;
+ case 8:
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+1);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+2);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+3);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+4);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+5);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+6);
+ Ssix->DataReg = *(tx_buf+tmp_tx_buf_len+7);
+ tmp_tx_buf_len += 8;
+ break;
- default:
- break;
+ default:
+ break;
+ }
+ }
+ else
+ {
+ switch (tmp_len)
+ {
+ case 1:
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len);
+ tmp_tx_buf_len += 1;
+ break;
+
+ case 2:
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+1);
+ tmp_tx_buf_len += 2;
+ break;
+
+ case 3:
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+1);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+2);
+ tmp_tx_buf_len += 3;
+ break;
+
+ case 4:
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+1);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+2);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+3);
+ tmp_tx_buf_len += 4;
+ break;
+
+ case 5:
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+1);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+2);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+3);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+4);
+ tmp_tx_buf_len += 5;
+ break;
+
+ case 6:
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+1);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+2);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+3);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+4);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+5);
+ tmp_tx_buf_len += 6;
+ break;
+
+ case 7:
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+1);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+2);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+3);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+4);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+5);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+6);
+ tmp_tx_buf_len += 7;
+ break;
+
+ case 8:
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+1);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+2);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+3);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+4);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+5);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+6);
+ Ssix->DataReg = *((uint16_t*)tx_buf+tmp_tx_buf_len+7);
+ tmp_tx_buf_len += 8;
+ break;
+
+ default:
+ break;
+ }
}
}
else
@@ -720,7 +815,7 @@ void hal_spi_dfs_set(hal_spi_t* spi_ptr,SPI_DFS_e mod)
Ssix->SSIEN = 0;
subWriteReg(&Ssix->CR0,3,0,mod);
Ssix->SSIEN = 1;
- pctx->cfg.spi_dfsmod = SPI_2BYTE;
+ pctx->cfg.spi_dfsmod = mod;
}
@@ -939,6 +1034,7 @@ int hal_spi_bus_init(hal_spi_t* spi_ptr,spi_Cfg_t cfg)
hal_clk_gate_enable((MODULE_e)(MOD_SPI0 + spi_ptr->spi_index));
hal_spi_pin_init(spi_ptr,cfg.sclk_pin,cfg.ssn_pin,cfg.MOSI,cfg.MISO);
hal_spi_master_init(spi_ptr,cfg.baudrate, cfg.spi_scmod, cfg.spi_tmod);
+ hal_spi_dfs_set(spi_ptr,cfg.spi_dfsmod);
pctx->cfg = cfg;
pctx->transmit.busy = false;
pctx->spi_info = spi_ptr;
@@ -1075,7 +1171,7 @@ int hal_spi_init(SPI_INDEX_e channel)
}
else if(channel == SPI1)
{
- ret = hal_pwrmgr_register(MOD_SPI0,spi1_sleep_handler, spi1_wakeup_handler);
+ ret = hal_pwrmgr_register(MOD_SPI1,spi1_sleep_handler, spi1_wakeup_handler);
if(ret == PPlus_SUCCESS)
memset(&m_spiCtx[1],0,sizeof(spi_Ctx_t));
diff --git a/bthome_phy6222/SDK/components/driver/spi/spi.h b/bthome_phy6222/SDK/components/driver/spi/spi.h
index 98c6cf2..95b8f68 100644
--- a/bthome_phy6222/SDK/components/driver/spi/spi.h
+++ b/bthome_phy6222/SDK/components/driver/spi/spi.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file spi.h
@brief Contains all functions support for spi driver
@@ -9,7 +5,7 @@
@date 18. Oct. 2017
@author qing.han
-
+ SDK_LICENSE
*******************************************************************************/
#ifndef _SPI_H_
@@ -52,11 +48,23 @@ typedef enum
typedef enum
{
- SPI_1BYTE=0x07, //1byte
- SPI_2BYTE=0x0f, //2byte
-} SPI_DFS_e;
+ SPI_4BIT = 0x03,
+ SPI_5BIT = 0x04,
+ SPI_6BIT = 0x05,
+ SPI_7BIT = 0x06,
+ SPI_8BIT = 0x07,SPI_1BYTE = 0x07, // 1byte
+ SPI_9BIT = 0x08,
+ SPI_10BIT = 0x09,
+ SPI_11BIT = 0x0a,
+ SPI_12BIT = 0x0b,
+ SPI_13BIT = 0x0c,
+ SPI_14BIT = 0x0d,
+ SPI_15BIT = 0x0e,
+ SPI_16BIT = 0x0f,SPI_2BYTE = 0x0f, // 2byte
+} SPI_DFS_e;
+
typedef enum
{
SPI_TRXD=0, //Transmit & Receive
diff --git a/bthome_phy6222/SDK/components/driver/spiflash/spiflash.c b/bthome_phy6222/SDK/components/driver/spiflash/spiflash.c
index da6cb0e..63219b0 100644
--- a/bthome_phy6222/SDK/components/driver/spiflash/spiflash.c
+++ b/bthome_phy6222/SDK/components/driver/spiflash/spiflash.c
@@ -1,6 +1,8 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ spiflash.c
+ SDK_LICENSE
+***************/
+
#include "error.h"
#include "spiflash.h"
#include "log.h"
diff --git a/bthome_phy6222/SDK/components/driver/spiflash/spiflash.h b/bthome_phy6222/SDK/components/driver/spiflash/spiflash.h
index d641779..5c72ed4 100644
--- a/bthome_phy6222/SDK/components/driver/spiflash/spiflash.h
+++ b/bthome_phy6222/SDK/components/driver/spiflash/spiflash.h
@@ -1,6 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ spiflash.h
+ SDK_LICENSE
+***************/
#ifndef __SPIFLASH_H__
#define __SPIFLASH_H__
diff --git a/bthome_phy6222/SDK/components/driver/timer/timer.c b/bthome_phy6222/SDK/components/driver/timer/timer.c
index 5b1eb5b..4034dc1 100644
--- a/bthome_phy6222/SDK/components/driver/timer/timer.c
+++ b/bthome_phy6222/SDK/components/driver/timer/timer.c
@@ -1,6 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ timer.h
+ SDK_LICENSE
+***************/
#include "rom_sym_def.h"
#include "timer.h"
#include "error.h"
diff --git a/bthome_phy6222/SDK/components/driver/timer/timer.h b/bthome_phy6222/SDK/components/driver/timer/timer.h
index 5b8f7ec..e221eae 100644
--- a/bthome_phy6222/SDK/components/driver/timer/timer.h
+++ b/bthome_phy6222/SDK/components/driver/timer/timer.h
@@ -1,6 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ timer.c
+ SDK_LICENSE
+***************/
#ifndef __TIMER_H__
#define __TIMER_H__
diff --git a/bthome_phy6222/SDK/components/driver/uart/uart.c b/bthome_phy6222/SDK/components/driver/uart/uart.c
index b929cd0..d7d4ed3 100644
--- a/bthome_phy6222/SDK/components/driver/uart/uart.c
+++ b/bthome_phy6222/SDK/components/driver/uart/uart.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file uart.c
@brief Contains all functions support for uart driver
@@ -9,6 +5,7 @@
@date 19. Oct. 2017
@author qing.han
+ SDK_LICENSE
*******************************************************************************/
#include "rom_sym_def.h"
diff --git a/bthome_phy6222/SDK/components/driver/uart/uart.h b/bthome_phy6222/SDK/components/driver/uart/uart.h
index f2a1513..fb91f01 100644
--- a/bthome_phy6222/SDK/components/driver/uart/uart.h
+++ b/bthome_phy6222/SDK/components/driver/uart/uart.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file uart.h
@brief Contains all functions support for uart driver
@@ -9,7 +5,7 @@
@date 19. Oct. 2017
@author qing.han
-
+ SDK_LICENSE
*******************************************************************************/
#ifndef __UART_H__
diff --git a/bthome_phy6222/SDK/components/driver/voice/voice.c b/bthome_phy6222/SDK/components/driver/voice/voice.c
index 8d8b2d0..41094af 100644
--- a/bthome_phy6222/SDK/components/driver/voice/voice.c
+++ b/bthome_phy6222/SDK/components/driver/voice/voice.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file voice.c
@brief Contains all functions support for adc driver
@@ -9,7 +5,7 @@
@date 16. Jun. 2018
@author qing.han
- .
+ SDK_LICENSE
*******************************************************************************/
#include "rom_sym_def.h"
diff --git a/bthome_phy6222/SDK/components/driver/voice/voice.h b/bthome_phy6222/SDK/components/driver/voice/voice.h
index 2d44ec1..3856559 100644
--- a/bthome_phy6222/SDK/components/driver/voice/voice.h
+++ b/bthome_phy6222/SDK/components/driver/voice/voice.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file voice.h
@brief Contains all functions support for voice driver
@@ -9,7 +5,7 @@
@date 18. Jun. 2018
@author qing.han
-
+ SDK_LICENSE
*******************************************************************************/
#ifndef __VOICE__H__
diff --git a/bthome_phy6222/SDK/components/driver/watchdog/watchdog.c b/bthome_phy6222/SDK/components/driver/watchdog/watchdog.c
index 44fcc29..b6bcf53 100644
--- a/bthome_phy6222/SDK/components/driver/watchdog/watchdog.c
+++ b/bthome_phy6222/SDK/components/driver/watchdog/watchdog.c
@@ -1,6 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ watchdog.c
+ SDK_LICENSE
+***************/
#include "watchdog.h"
#include "error.h"
#include "clock.h"
diff --git a/bthome_phy6222/SDK/components/driver/watchdog/watchdog.h b/bthome_phy6222/SDK/components/driver/watchdog/watchdog.h
index ba67647..e396627 100644
--- a/bthome_phy6222/SDK/components/driver/watchdog/watchdog.h
+++ b/bthome_phy6222/SDK/components/driver/watchdog/watchdog.h
@@ -1,6 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ watchdog.h
+ SDK_LICENSE
+***************/
#ifndef __WATCHDOG_H__
#define __WATCHDOG_H__
diff --git a/bthome_phy6222/SDK/components/inc/bus_dev.h b/bthome_phy6222/SDK/components/inc/bus_dev.h
index 0aa693c..10195a1 100644
--- a/bthome_phy6222/SDK/components/inc/bus_dev.h
+++ b/bthome_phy6222/SDK/components/inc/bus_dev.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: bus_dev.h
Revised:
@@ -9,6 +5,8 @@
Description: This file contains the SoC MCU relate definitions
+ SDK_LICENSE
+
**************************************************************************************************/
#ifndef __BUS_DEV_H__
diff --git a/bthome_phy6222/SDK/components/inc/error.h b/bthome_phy6222/SDK/components/inc/error.h
index 9ef51d3..27eda4b 100644
--- a/bthome_phy6222/SDK/components/inc/error.h
+++ b/bthome_phy6222/SDK/components/inc/error.h
@@ -1,8 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
/*******************************************************************************
@file error.h
@brief Global error definition
@@ -10,7 +5,7 @@
@date 11. Feb. 2018
@author Eagle.Lao
-
+ SDK_LICENSE
*******************************************************************************/
diff --git a/bthome_phy6222/SDK/components/inc/global_config.h b/bthome_phy6222/SDK/components/inc/global_config.h
index 236d726..e19e264 100644
--- a/bthome_phy6222/SDK/components/inc/global_config.h
+++ b/bthome_phy6222/SDK/components/inc/global_config.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**
****************************************************************************************
@@ -13,6 +9,8 @@
$Rev: $
+ SDK_LICENSE
+
****************************************************************************************
*/
diff --git a/bthome_phy6222/SDK/components/inc/mcu.h b/bthome_phy6222/SDK/components/inc/mcu.h
index 7248e79..aa969e8 100644
--- a/bthome_phy6222/SDK/components/inc/mcu.h
+++ b/bthome_phy6222/SDK/components/inc/mcu.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: bus_dev.h
Revised:
@@ -9,6 +5,7 @@
Description: Describe the purpose and contents of the file.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/inc/mcu_phy_bumbee.h b/bthome_phy6222/SDK/components/inc/mcu_phy_bumbee.h
index b52892f..19a4347 100644
--- a/bthome_phy6222/SDK/components/inc/mcu_phy_bumbee.h
+++ b/bthome_phy6222/SDK/components/inc/mcu_phy_bumbee.h
@@ -1,6 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ mcu_phy_bumbee.h
+ SDK_LICENSE
+***************/
#ifndef __MCU_BUMBEE_M0__
#define __MCU_BUMBEE_M0__
diff --git a/bthome_phy6222/SDK/components/inc/types.h b/bthome_phy6222/SDK/components/inc/types.h
index 990b63f..541526a 100644
--- a/bthome_phy6222/SDK/components/inc/types.h
+++ b/bthome_phy6222/SDK/components/inc/types.h
@@ -1,6 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
#ifndef _TYPES_H_
#define _TYPES_H_
diff --git a/bthome_phy6222/SDK/components/inc/version.h b/bthome_phy6222/SDK/components/inc/version.h
index 9869a77..49b023a 100644
--- a/bthome_phy6222/SDK/components/inc/version.h
+++ b/bthome_phy6222/SDK/components/inc/version.h
@@ -1,12 +1,9 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file sdk_version.h
@brief
@author
+ SDK_LICENSE
*******************************************************************************/
#ifndef __SDK_VER_H__
diff --git a/bthome_phy6222/SDK/components/libraries/console/phy_console.c b/bthome_phy6222/SDK/components/libraries/console/phy_console.c
index aef5e9a..9c4656f 100644
--- a/bthome_phy6222/SDK/components/libraries/console/phy_console.c
+++ b/bthome_phy6222/SDK/components/libraries/console/phy_console.c
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ app_datetime.c
+ SDK_LICENSE
+***************/
#include "phy_console.h"
#include "uart.h"
diff --git a/bthome_phy6222/SDK/components/libraries/console/phy_console.h b/bthome_phy6222/SDK/components/libraries/console/phy_console.h
index d665b3d..a0e5a8e 100644
--- a/bthome_phy6222/SDK/components/libraries/console/phy_console.h
+++ b/bthome_phy6222/SDK/components/libraries/console/phy_console.h
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ phy_console.h
+ SDK_LICENSE
+***************/
#ifndef _PHY_CONSOLE_H
#define _PHY_CONSOLE_H
diff --git a/bthome_phy6222/SDK/components/libraries/crc16/crc16.c b/bthome_phy6222/SDK/components/libraries/crc16/crc16.c
index c0373f3..5e752e7 100644
--- a/bthome_phy6222/SDK/components/libraries/crc16/crc16.c
+++ b/bthome_phy6222/SDK/components/libraries/crc16/crc16.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*
crc16
*/
diff --git a/bthome_phy6222/SDK/components/libraries/crc16/crc16.h b/bthome_phy6222/SDK/components/libraries/crc16/crc16.h
index 6940b56..2cf601f 100644
--- a/bthome_phy6222/SDK/components/libraries/crc16/crc16.h
+++ b/bthome_phy6222/SDK/components/libraries/crc16/crc16.h
@@ -1,8 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
#ifndef _CRC16_H__
#define _CRC16_H__
diff --git a/bthome_phy6222/SDK/components/libraries/datetime/app_datetime.c b/bthome_phy6222/SDK/components/libraries/datetime/app_datetime.c
index 11f989d..32a8c8e 100644
--- a/bthome_phy6222/SDK/components/libraries/datetime/app_datetime.c
+++ b/bthome_phy6222/SDK/components/libraries/datetime/app_datetime.c
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ dma.c
+ SDK_LICENSE
+***************/
#include
#include "OSAL.h"
diff --git a/bthome_phy6222/SDK/components/libraries/datetime/app_datetime.h b/bthome_phy6222/SDK/components/libraries/datetime/app_datetime.h
index a2f05c1..bebfa3c 100644
--- a/bthome_phy6222/SDK/components/libraries/datetime/app_datetime.h
+++ b/bthome_phy6222/SDK/components/libraries/datetime/app_datetime.h
@@ -1,6 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ app_datetime.h
+ SDK_LICENSE
+***************/
#ifndef APP_DATETIME_H
#define APP_DATETIME_H
diff --git a/bthome_phy6222/SDK/components/libraries/fs/fs.c b/bthome_phy6222/SDK/components/libraries/fs/fs.c
index ecafb55..7271d41 100644
--- a/bthome_phy6222/SDK/components/libraries/fs/fs.c
+++ b/bthome_phy6222/SDK/components/libraries/fs/fs.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file fs.c
@brief Contains all functions support for spi driver
@@ -9,7 +5,7 @@
@date 18. Oct. 2017
@author
-
+ SDK_LICENSE
*******************************************************************************/
#include "rom_sym_def.h"
diff --git a/bthome_phy6222/SDK/components/libraries/fs/fs.h b/bthome_phy6222/SDK/components/libraries/fs/fs.h
index a4debb0..eeae42a 100644
--- a/bthome_phy6222/SDK/components/libraries/fs/fs.h
+++ b/bthome_phy6222/SDK/components/libraries/fs/fs.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file fs.h
@brief Contains all functions support for spi driver
@@ -9,7 +5,7 @@
@date 18. Oct. 2017
@author
-
+ SDK_LICENSE
*******************************************************************************/
#ifndef __FS_H__
diff --git a/bthome_phy6222/SDK/components/libraries/fs/fs_test.c b/bthome_phy6222/SDK/components/libraries/fs/fs_test.c
index 0d87a40..eb7a293 100644
--- a/bthome_phy6222/SDK/components/libraries/fs/fs_test.c
+++ b/bthome_phy6222/SDK/components/libraries/fs/fs_test.c
@@ -1,6 +1,8 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ fs_test.c
+ SDK_LICENSE
+***************/
+
#include "rom_sym_def.h"
#include "osal.h"
#include "crc16.h"
diff --git a/bthome_phy6222/SDK/components/libraries/fs/fs_test.h b/bthome_phy6222/SDK/components/libraries/fs/fs_test.h
index e87e799..d9ca604 100644
--- a/bthome_phy6222/SDK/components/libraries/fs/fs_test.h
+++ b/bthome_phy6222/SDK/components/libraries/fs/fs_test.h
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ fs_test.h
+ SDK_LICENSE
+***************/
#ifndef __FS_TEST_H__
#define __FS_TEST_H__
diff --git a/bthome_phy6222/SDK/components/osal/include/OSAL.h b/bthome_phy6222/SDK/components/osal/include/OSAL.h
index 295a4c2..15128ed 100644
--- a/bthome_phy6222/SDK/components/osal/include/OSAL.h
+++ b/bthome_phy6222/SDK/components/osal/include/OSAL.h
@@ -2,6 +2,9 @@
Filename: OSAL.h
Revised:
Revision:
+
+ SDK_LICENSE
+
******************************************************************************/
#ifndef OSAL_H
diff --git a/bthome_phy6222/SDK/components/osal/include/OSAL_Clock.h b/bthome_phy6222/SDK/components/osal/include/OSAL_Clock.h
index d1d900a..6395877 100644
--- a/bthome_phy6222/SDK/components/osal/include/OSAL_Clock.h
+++ b/bthome_phy6222/SDK/components/osal/include/OSAL_Clock.h
@@ -5,6 +5,7 @@
Description: OSAL Clock definition and manipulation functions.
+ SDK_LICENSE
******************************************************************************/
diff --git a/bthome_phy6222/SDK/components/osal/include/OSAL_Memory.h b/bthome_phy6222/SDK/components/osal/include/OSAL_Memory.h
index 6e0440a..d4c25ee 100644
--- a/bthome_phy6222/SDK/components/osal/include/OSAL_Memory.h
+++ b/bthome_phy6222/SDK/components/osal/include/OSAL_Memory.h
@@ -5,6 +5,7 @@
Description: This module defines the OSAL memory control functions.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/osal/include/OSAL_Nv.h b/bthome_phy6222/SDK/components/osal/include/OSAL_Nv.h
index a70ddb1..b2df283 100644
--- a/bthome_phy6222/SDK/components/osal/include/OSAL_Nv.h
+++ b/bthome_phy6222/SDK/components/osal/include/OSAL_Nv.h
@@ -5,6 +5,7 @@
Description: This module defines the OSAL nv control functions.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/osal/include/OSAL_PwrMgr.h b/bthome_phy6222/SDK/components/osal/include/OSAL_PwrMgr.h
index 18d08f1..2ddd4db 100644
--- a/bthome_phy6222/SDK/components/osal/include/OSAL_PwrMgr.h
+++ b/bthome_phy6222/SDK/components/osal/include/OSAL_PwrMgr.h
@@ -5,6 +5,7 @@
Description: This file contains the OSAL Power Management API.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/osal/include/OSAL_Tasks.h b/bthome_phy6222/SDK/components/osal/include/OSAL_Tasks.h
index 2eb50da..87521a9 100644
--- a/bthome_phy6222/SDK/components/osal/include/OSAL_Tasks.h
+++ b/bthome_phy6222/SDK/components/osal/include/OSAL_Tasks.h
@@ -5,6 +5,7 @@
Description: This file contains the OSAL Task definition and manipulation functions.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/osal/include/OSAL_Timers.h b/bthome_phy6222/SDK/components/osal/include/OSAL_Timers.h
index 1b20b13..6a1cdc0 100644
--- a/bthome_phy6222/SDK/components/osal/include/OSAL_Timers.h
+++ b/bthome_phy6222/SDK/components/osal/include/OSAL_Timers.h
@@ -5,6 +5,7 @@
Description: This file contains the OSAL Timer definition and manipulation functions.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/osal/include/comdef.h b/bthome_phy6222/SDK/components/osal/include/comdef.h
index c5c0c37..489e492 100644
--- a/bthome_phy6222/SDK/components/osal/include/comdef.h
+++ b/bthome_phy6222/SDK/components/osal/include/comdef.h
@@ -5,7 +5,7 @@
Description: Type definitions and macros.
-
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/osal/include/osal_bufmgr.h b/bthome_phy6222/SDK/components/osal/include/osal_bufmgr.h
index 089f825..0d4fd22 100644
--- a/bthome_phy6222/SDK/components/osal/include/osal_bufmgr.h
+++ b/bthome_phy6222/SDK/components/osal/include/osal_bufmgr.h
@@ -5,6 +5,7 @@
Description: This file contains the buffer management definitions.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/osal/include/osal_cbtimer.h b/bthome_phy6222/SDK/components/osal/include/osal_cbtimer.h
index bfc16e4..f0b84df 100644
--- a/bthome_phy6222/SDK/components/osal/include/osal_cbtimer.h
+++ b/bthome_phy6222/SDK/components/osal/include/osal_cbtimer.h
@@ -5,6 +5,7 @@
Description: This file contains the Callback Timer definitions.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/osal/include/osal_snv.h b/bthome_phy6222/SDK/components/osal/include/osal_snv.h
index 0168d63..537e10b 100644
--- a/bthome_phy6222/SDK/components/osal/include/osal_snv.h
+++ b/bthome_phy6222/SDK/components/osal/include/osal_snv.h
@@ -5,6 +5,7 @@
Description: This module defines the OSAL snv control functions.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/osal/snv/osal_snv.c b/bthome_phy6222/SDK/components/osal/snv/osal_snv.c
index 0a2ba03..fa2c63e 100644
--- a/bthome_phy6222/SDK/components/osal/snv/osal_snv.c
+++ b/bthome_phy6222/SDK/components/osal/snv/osal_snv.c
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ osal_snv.c
+ SDK_LICENSE
+***************/
#include
#include "OSAL.h"
diff --git a/bthome_phy6222/SDK/components/profiles/AudioProfile/AudioGATTprofile.c b/bthome_phy6222/SDK/components/profiles/AudioProfile/AudioGATTprofile.c
index 4d0376c..4de39e4 100644
--- a/bthome_phy6222/SDK/components/profiles/AudioProfile/AudioGATTprofile.c
+++ b/bthome_phy6222/SDK/components/profiles/AudioProfile/AudioGATTprofile.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: AudioGATTprofile.c
Revised:
@@ -10,7 +6,8 @@
Description: This file contains the Simple GATT profile sample GATT service
profile for use with the BLE sample application.
-
+ SDK_LICENSE
+
**************************************************************************************************/
/*********************************************************************
diff --git a/bthome_phy6222/SDK/components/profiles/AudioProfile/AudioGATTprofile.h b/bthome_phy6222/SDK/components/profiles/AudioProfile/AudioGATTprofile.h
index de17a89..4eac00c 100644
--- a/bthome_phy6222/SDK/components/profiles/AudioProfile/AudioGATTprofile.h
+++ b/bthome_phy6222/SDK/components/profiles/AudioProfile/AudioGATTprofile.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: AudioGATTprofile.h
Revised:
@@ -10,6 +6,8 @@
Description: This file contains the Simple GATT profile definitions and
prototypes.
+ SDK_LICENSE
+
**************************************************************************************************/
#ifndef AUDIOGATTPROFILE_H
diff --git a/bthome_phy6222/SDK/components/profiles/Batt/battservice.c b/bthome_phy6222/SDK/components/profiles/Batt/battservice.c
index b78c92f..83742c6 100644
--- a/bthome_phy6222/SDK/components/profiles/Batt/battservice.c
+++ b/bthome_phy6222/SDK/components/profiles/Batt/battservice.c
@@ -1,9 +1,7 @@
/**************************************************************************************************
-*******
+ SDK_LICENSE
**************************************************************************************************/
-
-
/*********************************************************************
INCLUDES
*/
diff --git a/bthome_phy6222/SDK/components/profiles/Batt/battservice.h b/bthome_phy6222/SDK/components/profiles/Batt/battservice.h
index 4d93f77..1d859bd 100644
--- a/bthome_phy6222/SDK/components/profiles/Batt/battservice.h
+++ b/bthome_phy6222/SDK/components/profiles/Batt/battservice.h
@@ -1,5 +1,5 @@
/**************************************************************************************************
-*******
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/profiles/Batt/hiddev.h b/bthome_phy6222/SDK/components/profiles/Batt/hiddev.h
index 2b32fc1..ce56f04 100644
--- a/bthome_phy6222/SDK/components/profiles/Batt/hiddev.h
+++ b/bthome_phy6222/SDK/components/profiles/Batt/hiddev.h
@@ -1,5 +1,5 @@
/**************************************************************************************************
-*******
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/profiles/DevInfo/devinfoservice.c b/bthome_phy6222/SDK/components/profiles/DevInfo/devinfoservice.c
index 32d3fd4..4cbeb23 100644
--- a/bthome_phy6222/SDK/components/profiles/DevInfo/devinfoservice.c
+++ b/bthome_phy6222/SDK/components/profiles/DevInfo/devinfoservice.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: devinfoservice.c
Revised: $Date $
@@ -9,6 +5,7 @@
Description: This file contains the Device Information service.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/profiles/DevInfo/devinfoservice.h b/bthome_phy6222/SDK/components/profiles/DevInfo/devinfoservice.h
index 7fba6cf..4228c3a 100644
--- a/bthome_phy6222/SDK/components/profiles/DevInfo/devinfoservice.h
+++ b/bthome_phy6222/SDK/components/profiles/DevInfo/devinfoservice.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: devinfoservice.h
Revised: $Date $
@@ -10,6 +6,7 @@
Description: This file contains the Device Information service definitions and
prototypes.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/profiles/GATT/gattservapp.c b/bthome_phy6222/SDK/components/profiles/GATT/gattservapp.c
index 3079416..e31bc4c 100644
--- a/bthome_phy6222/SDK/components/profiles/GATT/gattservapp.c
+++ b/bthome_phy6222/SDK/components/profiles/GATT/gattservapp.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: gattservapp.c
Revised:
@@ -9,7 +5,7 @@
Description: This file contains the GATT Server Application.
-
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/profiles/HID/hiddev.c b/bthome_phy6222/SDK/components/profiles/HID/hiddev.c
index 0067a64..25011c3 100644
--- a/bthome_phy6222/SDK/components/profiles/HID/hiddev.c
+++ b/bthome_phy6222/SDK/components/profiles/HID/hiddev.c
@@ -1,8 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
+/*************
+ hiddev.c
+ SDK_LICENSE
+***************/
/*********************************************************************
INCLUDES
diff --git a/bthome_phy6222/SDK/components/profiles/HID/hiddev.h b/bthome_phy6222/SDK/components/profiles/HID/hiddev.h
index 2b32fc1..1f7d1b1 100644
--- a/bthome_phy6222/SDK/components/profiles/HID/hiddev.h
+++ b/bthome_phy6222/SDK/components/profiles/HID/hiddev.h
@@ -1,8 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
+/*************
+ hiddev.h
+ SDK_LICENSE
+***************/
#ifndef HIDDEV_H
#define HIDDEV_H
diff --git a/bthome_phy6222/SDK/components/profiles/HID/hidkbdservice.c b/bthome_phy6222/SDK/components/profiles/HID/hidkbdservice.c
index 2259ee1..c669770 100644
--- a/bthome_phy6222/SDK/components/profiles/HID/hidkbdservice.c
+++ b/bthome_phy6222/SDK/components/profiles/HID/hidkbdservice.c
@@ -1,10 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-/******************************************************************************
-
- *****************************************************************************/
+/*************
+ hidkbdservice.c
+ SDK_LICENSE
+***************/
/*********************************************************************
INCLUDES
diff --git a/bthome_phy6222/SDK/components/profiles/HID/hidkbdservice.h b/bthome_phy6222/SDK/components/profiles/HID/hidkbdservice.h
index b51dbc2..f129977 100644
--- a/bthome_phy6222/SDK/components/profiles/HID/hidkbdservice.h
+++ b/bthome_phy6222/SDK/components/profiles/HID/hidkbdservice.h
@@ -1,8 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
+/*************
+ hidkbdservice.h
+ SDK_LICENSE
+***************/
#ifndef HIDKBDSERVICE_H
#define HIDKBDSERVICE_H
diff --git a/bthome_phy6222/SDK/components/profiles/HIDVoice/hiddev.c b/bthome_phy6222/SDK/components/profiles/HIDVoice/hiddev.c
index 94486f1..5f1f765 100644
--- a/bthome_phy6222/SDK/components/profiles/HIDVoice/hiddev.c
+++ b/bthome_phy6222/SDK/components/profiles/HIDVoice/hiddev.c
@@ -1,9 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
-
+/*************
+ hiddev.c
+ SDK_LICENSE
+***************/
/*********************************************************************
INCLUDES
*/
diff --git a/bthome_phy6222/SDK/components/profiles/HIDVoice/hiddev.h b/bthome_phy6222/SDK/components/profiles/HIDVoice/hiddev.h
index 57d054e..f00790a 100644
--- a/bthome_phy6222/SDK/components/profiles/HIDVoice/hiddev.h
+++ b/bthome_phy6222/SDK/components/profiles/HIDVoice/hiddev.h
@@ -1,9 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
-
+/*************
+ hiddev.h
+ SDK_LICENSE
+***************/
#ifndef HIDDEV_H
#define HIDDEV_H
diff --git a/bthome_phy6222/SDK/components/profiles/HIDVoice/hidkbdservice.c b/bthome_phy6222/SDK/components/profiles/HIDVoice/hidkbdservice.c
index b174360..9d35612 100644
--- a/bthome_phy6222/SDK/components/profiles/HIDVoice/hidkbdservice.c
+++ b/bthome_phy6222/SDK/components/profiles/HIDVoice/hidkbdservice.c
@@ -1,11 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-/******************************************************************************
-
- *****************************************************************************/
-
+/*************
+ hidkbdservice.c
+ SDK_LICENSE
+***************/
/*********************************************************************
INCLUDES
*/
diff --git a/bthome_phy6222/SDK/components/profiles/HIDVoice/hidkbdservice.h b/bthome_phy6222/SDK/components/profiles/HIDVoice/hidkbdservice.h
index cd5d70f..c41921b 100644
--- a/bthome_phy6222/SDK/components/profiles/HIDVoice/hidkbdservice.h
+++ b/bthome_phy6222/SDK/components/profiles/HIDVoice/hidkbdservice.h
@@ -1,9 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
-
+/*************
+ hidkbdservice.h
+ SDK_LICENSE
+***************/
#ifndef HIDKBDSERVICE_H
#define HIDKBDSERVICE_H
diff --git a/bthome_phy6222/SDK/components/profiles/Keys/simplekeys.c b/bthome_phy6222/SDK/components/profiles/Keys/simplekeys.c
index ae0ccf3..fccb35a 100644
--- a/bthome_phy6222/SDK/components/profiles/Keys/simplekeys.c
+++ b/bthome_phy6222/SDK/components/profiles/Keys/simplekeys.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: simplekey.c
Revised:
@@ -9,7 +5,7 @@
Description: Simple Keys Profile
-
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/profiles/Keys/simplekeys.h b/bthome_phy6222/SDK/components/profiles/Keys/simplekeys.h
index d899e07..f594578 100644
--- a/bthome_phy6222/SDK/components/profiles/Keys/simplekeys.h
+++ b/bthome_phy6222/SDK/components/profiles/Keys/simplekeys.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: simplekeys.h
Revised:
@@ -9,7 +5,7 @@
Description: This file contains the Simple Keys Profile header file.
-
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/profiles/Roles/broadcaster.c b/bthome_phy6222/SDK/components/profiles/Roles/broadcaster.c
index 0c73b46..5211693 100644
--- a/bthome_phy6222/SDK/components/profiles/Roles/broadcaster.c
+++ b/bthome_phy6222/SDK/components/profiles/Roles/broadcaster.c
@@ -1,8 +1,6 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
+/*************
+ SDK_LICENSE
+***************/
/*********************************************************************
INCLUDES
*/
diff --git a/bthome_phy6222/SDK/components/profiles/Roles/broadcaster.h b/bthome_phy6222/SDK/components/profiles/Roles/broadcaster.h
index a9cf64d..79ce017 100644
--- a/bthome_phy6222/SDK/components/profiles/Roles/broadcaster.h
+++ b/bthome_phy6222/SDK/components/profiles/Roles/broadcaster.h
@@ -1,9 +1,6 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
-
+/*************
+ SDK_LICENSE
+***************/
#ifndef BROADCASTER_H
#define BROADCASTER_H
diff --git a/bthome_phy6222/SDK/components/profiles/Roles/central.c b/bthome_phy6222/SDK/components/profiles/Roles/central.c
index 59dd058..2393d6b 100644
--- a/bthome_phy6222/SDK/components/profiles/Roles/central.c
+++ b/bthome_phy6222/SDK/components/profiles/Roles/central.c
@@ -1,6 +1,6 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ SDK_LICENSE
+***************/
/*********************************************************************
INCLUDES
*/
diff --git a/bthome_phy6222/SDK/components/profiles/Roles/central.h b/bthome_phy6222/SDK/components/profiles/Roles/central.h
index b739751..06d7a04 100644
--- a/bthome_phy6222/SDK/components/profiles/Roles/central.h
+++ b/bthome_phy6222/SDK/components/profiles/Roles/central.h
@@ -1,6 +1,6 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ SDK_LICENSE
+***************/
#ifndef CENTRAL_H
#define CENTRAL_H
diff --git a/bthome_phy6222/SDK/components/profiles/Roles/gap.c b/bthome_phy6222/SDK/components/profiles/Roles/gap.c
index 45ab86a..8c5a8e4 100644
--- a/bthome_phy6222/SDK/components/profiles/Roles/gap.c
+++ b/bthome_phy6222/SDK/components/profiles/Roles/gap.c
@@ -1,7 +1,6 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ SDK_LICENSE
+***************/
/*************************************************************************************************
Filename: gap.c
Revised:
diff --git a/bthome_phy6222/SDK/components/profiles/Roles/gapbondmgr.c b/bthome_phy6222/SDK/components/profiles/Roles/gapbondmgr.c
index f81d3c1..811f71a 100644
--- a/bthome_phy6222/SDK/components/profiles/Roles/gapbondmgr.c
+++ b/bthome_phy6222/SDK/components/profiles/Roles/gapbondmgr.c
@@ -1,7 +1,6 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ SDK_LICENSE
+***************/
/**************************************************************************************************
Filename: gapbondmgr.c
Revised:
diff --git a/bthome_phy6222/SDK/components/profiles/Roles/gapbondmgr.h b/bthome_phy6222/SDK/components/profiles/Roles/gapbondmgr.h
index 7b5219a..c40bba2 100644
--- a/bthome_phy6222/SDK/components/profiles/Roles/gapbondmgr.h
+++ b/bthome_phy6222/SDK/components/profiles/Roles/gapbondmgr.h
@@ -1,7 +1,6 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ SDK_LICENSE
+***************/
/**
@headerfile: gapbondmgr.h
$Date:
diff --git a/bthome_phy6222/SDK/components/profiles/Roles/gapgattserver.c b/bthome_phy6222/SDK/components/profiles/Roles/gapgattserver.c
index 1140c33..e787dc5 100644
--- a/bthome_phy6222/SDK/components/profiles/Roles/gapgattserver.c
+++ b/bthome_phy6222/SDK/components/profiles/Roles/gapgattserver.c
@@ -1,7 +1,6 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ SDK_LICENSE
+***************/
/**************************************************************************************************
Filename: gapgattserver.c
Revised:
@@ -23,7 +22,7 @@
#include "gatt.h"
#include "gatt_uuid.h"
#include "gattservapp.h"
-#include "bleperipheral.h"
+//#include "bleperipheral.h"
/*********************************************************************
MACROS
diff --git a/bthome_phy6222/SDK/components/profiles/Roles/observer.c b/bthome_phy6222/SDK/components/profiles/Roles/observer.c
index fb38580..62e62ab 100644
--- a/bthome_phy6222/SDK/components/profiles/Roles/observer.c
+++ b/bthome_phy6222/SDK/components/profiles/Roles/observer.c
@@ -1,6 +1,6 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ SDK_LICENSE
+***************/
/*********************************************************************
INCLUDES
*/
diff --git a/bthome_phy6222/SDK/components/profiles/Roles/observer.h b/bthome_phy6222/SDK/components/profiles/Roles/observer.h
index 6616064..db42b89 100644
--- a/bthome_phy6222/SDK/components/profiles/Roles/observer.h
+++ b/bthome_phy6222/SDK/components/profiles/Roles/observer.h
@@ -1,6 +1,6 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ SDK_LICENSE
+***************/
#ifndef OBSERVER_H
#define OBSERVER_H
diff --git a/bthome_phy6222/SDK/components/profiles/Roles/peripheral.c b/bthome_phy6222/SDK/components/profiles/Roles/peripheral.c
index 256d7db..7f383f2 100644
--- a/bthome_phy6222/SDK/components/profiles/Roles/peripheral.c
+++ b/bthome_phy6222/SDK/components/profiles/Roles/peripheral.c
@@ -1,7 +1,6 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ SDK_LICENSE
+***************/
/**************************************************************************************************
Filename: peripheral.c
Revised:
diff --git a/bthome_phy6222/SDK/components/profiles/Roles/peripheral.h b/bthome_phy6222/SDK/components/profiles/Roles/peripheral.h
index 00e9c01..afe20b5 100644
--- a/bthome_phy6222/SDK/components/profiles/Roles/peripheral.h
+++ b/bthome_phy6222/SDK/components/profiles/Roles/peripheral.h
@@ -1,7 +1,6 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ SDK_LICENSE
+***************/
/**
@headerfile: peripheral.h
$Date:
diff --git a/bthome_phy6222/SDK/components/profiles/Roles/peripheralBroadcaster.c b/bthome_phy6222/SDK/components/profiles/Roles/peripheralBroadcaster.c
index 28351a5..e8993b3 100644
--- a/bthome_phy6222/SDK/components/profiles/Roles/peripheralBroadcaster.c
+++ b/bthome_phy6222/SDK/components/profiles/Roles/peripheralBroadcaster.c
@@ -1,8 +1,6 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
+/*************
+ SDK_LICENSE
+***************/
/*********************************************************************
INCLUDES
*/
diff --git a/bthome_phy6222/SDK/components/profiles/Roles/peripheralBroadcaster.h b/bthome_phy6222/SDK/components/profiles/Roles/peripheralBroadcaster.h
index 23299e2..e4035ae 100644
--- a/bthome_phy6222/SDK/components/profiles/Roles/peripheralBroadcaster.h
+++ b/bthome_phy6222/SDK/components/profiles/Roles/peripheralBroadcaster.h
@@ -1,7 +1,6 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ SDK_LICENSE
+***************/
#ifndef PERIPHERAL_BROADCASTER_H
#define PERIPHERAL_BROADCASTER_H
diff --git a/bthome_phy6222/SDK/components/profiles/ScanParam/scanparamservice.c b/bthome_phy6222/SDK/components/profiles/ScanParam/scanparamservice.c
index 9c51e60..b0d25e3 100644
--- a/bthome_phy6222/SDK/components/profiles/ScanParam/scanparamservice.c
+++ b/bthome_phy6222/SDK/components/profiles/ScanParam/scanparamservice.c
@@ -1,8 +1,6 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
+/*************
+ SDK_LICENSE
+***************/
/*********************************************************************
INCLUDES
*/
diff --git a/bthome_phy6222/SDK/components/profiles/ScanParam/scanparamservice.h b/bthome_phy6222/SDK/components/profiles/ScanParam/scanparamservice.h
index 14ba9d6..14564f9 100644
--- a/bthome_phy6222/SDK/components/profiles/ScanParam/scanparamservice.h
+++ b/bthome_phy6222/SDK/components/profiles/ScanParam/scanparamservice.h
@@ -1,7 +1,6 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ SDK_LICENSE
+***************/
#ifndef SCANPARAMSERVICE_H
#define SCANPARAMSERVICE_H
diff --git a/bthome_phy6222/SDK/components/profiles/SimpleProfile/simpleGATTprofile_ota.c b/bthome_phy6222/SDK/components/profiles/SimpleProfile/simpleGATTprofile_ota.c
index 92ce160..657174d 100644
--- a/bthome_phy6222/SDK/components/profiles/SimpleProfile/simpleGATTprofile_ota.c
+++ b/bthome_phy6222/SDK/components/profiles/SimpleProfile/simpleGATTprofile_ota.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: simpleGATTprofile_ota.c
Revised:
@@ -10,6 +6,7 @@
Description: This file contains the Simple GATT profile sample GATT service
profile for use with the BLE sample application.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/profiles/SimpleProfile/simpleGATTprofile_ota.h b/bthome_phy6222/SDK/components/profiles/SimpleProfile/simpleGATTprofile_ota.h
index 1f8ff26..1499d13 100644
--- a/bthome_phy6222/SDK/components/profiles/SimpleProfile/simpleGATTprofile_ota.h
+++ b/bthome_phy6222/SDK/components/profiles/SimpleProfile/simpleGATTprofile_ota.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: simpleGATTprofile.h
Revised:
@@ -10,6 +6,8 @@
Description: This file contains the Simple GATT profile definitions and
prototypes.
+ SDK_LICENSE
+
**************************************************************************************************/
#ifndef SIMPLEGATTPROFILE_OTA_H
diff --git a/bthome_phy6222/SDK/components/profiles/aliGenie/ali_genie_profile.c b/bthome_phy6222/SDK/components/profiles/aliGenie/ali_genie_profile.c
index 51c2fb7..a7b25fa 100644
--- a/bthome_phy6222/SDK/components/profiles/aliGenie/ali_genie_profile.c
+++ b/bthome_phy6222/SDK/components/profiles/aliGenie/ali_genie_profile.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/*******************************************************************************
@file ali_genie_profile.c
@brief Contains all functions support for ali genie profile
@@ -9,7 +5,7 @@
@date 28. Feb. 2019
@author Zhongqi Yang
-
+ SDK_LICENSE
*******************************************************************************/
#include "sha256.h"
diff --git a/bthome_phy6222/SDK/components/profiles/aliGenie/ali_genie_profile.h b/bthome_phy6222/SDK/components/profiles/aliGenie/ali_genie_profile.h
index 093904a..7a896ff 100644
--- a/bthome_phy6222/SDK/components/profiles/aliGenie/ali_genie_profile.h
+++ b/bthome_phy6222/SDK/components/profiles/aliGenie/ali_genie_profile.h
@@ -1,8 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
/*******************************************************************************
@file ali_genie_profile.h
@brief Contains all functions support for ali genie profile
@@ -10,7 +5,7 @@
@date 28. Feb. 2019
@author Zhongqi Yang
-
+ SDK_LICENSE
*******************************************************************************/
#ifndef _ALI_GENIE_PROFILE_
diff --git a/bthome_phy6222/SDK/components/profiles/ancs/ancs_attr.c b/bthome_phy6222/SDK/components/profiles/ancs/ancs_attr.c
index 5fe5dfe..fdaec2c 100644
--- a/bthome_phy6222/SDK/components/profiles/ancs/ancs_attr.c
+++ b/bthome_phy6222/SDK/components/profiles/ancs/ancs_attr.c
@@ -1,5 +1,5 @@
/**************************************************************************************************
-*******
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/profiles/ancs/ancs_attr.h b/bthome_phy6222/SDK/components/profiles/ancs/ancs_attr.h
index 333c038..d365e84 100644
--- a/bthome_phy6222/SDK/components/profiles/ancs/ancs_attr.h
+++ b/bthome_phy6222/SDK/components/profiles/ancs/ancs_attr.h
@@ -1,5 +1,5 @@
/**************************************************************************************************
-*******
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/profiles/ancs/ble_ancs.c b/bthome_phy6222/SDK/components/profiles/ancs/ble_ancs.c
index 43fff95..a04f8e7 100644
--- a/bthome_phy6222/SDK/components/profiles/ancs/ble_ancs.c
+++ b/bthome_phy6222/SDK/components/profiles/ancs/ble_ancs.c
@@ -1,5 +1,5 @@
/**************************************************************************************************
-*******
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/profiles/ancs/ble_ancs.h b/bthome_phy6222/SDK/components/profiles/ancs/ble_ancs.h
index c8be6c6..a919b87 100644
--- a/bthome_phy6222/SDK/components/profiles/ancs/ble_ancs.h
+++ b/bthome_phy6222/SDK/components/profiles/ancs/ble_ancs.h
@@ -1,5 +1,5 @@
/**************************************************************************************************
-*******
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/profiles/hrs/heartrateservice.c b/bthome_phy6222/SDK/components/profiles/hrs/heartrateservice.c
index c84a377..568a56f 100644
--- a/bthome_phy6222/SDK/components/profiles/hrs/heartrateservice.c
+++ b/bthome_phy6222/SDK/components/profiles/hrs/heartrateservice.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: heartrateservice.c
Revised:
@@ -10,6 +6,8 @@
Description: This file contains the Heart Rate sample service
for use with the Heart Rate sample application.
+ SDK_LICENSE
+
**************************************************************************************************/
/*********************************************************************
diff --git a/bthome_phy6222/SDK/components/profiles/hrs/heartrateservice.h b/bthome_phy6222/SDK/components/profiles/hrs/heartrateservice.h
index b370beb..131a4a7 100644
--- a/bthome_phy6222/SDK/components/profiles/hrs/heartrateservice.h
+++ b/bthome_phy6222/SDK/components/profiles/hrs/heartrateservice.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: heartrateservice.h
Revised:
@@ -10,6 +6,8 @@
Description: This file contains the Heart Rate service definitions and
prototypes.
+ SDK_LICENSE
+
**************************************************************************************************/
#ifndef HEARTRATESERVICE_H
diff --git a/bthome_phy6222/SDK/components/profiles/multiRole/multi.c b/bthome_phy6222/SDK/components/profiles/multiRole/multi.c
index fa959e4..68c6214 100644
--- a/bthome_phy6222/SDK/components/profiles/multiRole/multi.c
+++ b/bthome_phy6222/SDK/components/profiles/multiRole/multi.c
@@ -5,6 +5,9 @@
@brief multi GAPRole profile code
Group: CMCU, SCS
+
+ SDK_LICENSE
+
******************************************************************************/
/*********************************************************************
diff --git a/bthome_phy6222/SDK/components/profiles/multiRole/multi.h b/bthome_phy6222/SDK/components/profiles/multiRole/multi.h
index 9fb61a4..1007204 100644
--- a/bthome_phy6222/SDK/components/profiles/multiRole/multi.h
+++ b/bthome_phy6222/SDK/components/profiles/multiRole/multi.h
@@ -7,6 +7,9 @@
@{
@file multi.h
@brief Multi layer interface
+
+ SDK_LICENSE
+
*/
#ifndef MULTI_H
diff --git a/bthome_phy6222/SDK/components/profiles/multiRole/multiRoleProfile.c b/bthome_phy6222/SDK/components/profiles/multiRole/multiRoleProfile.c
index 9aa8635..ed8a34f 100644
--- a/bthome_phy6222/SDK/components/profiles/multiRole/multiRoleProfile.c
+++ b/bthome_phy6222/SDK/components/profiles/multiRole/multiRoleProfile.c
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: multiRoleProfile.c
Revised:
@@ -10,6 +6,7 @@
Description: This file contains the Simple GATT profile sample GATT service
profile for use with the BLE sample application.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/components/profiles/multiRole/multiRoleProfile.h b/bthome_phy6222/SDK/components/profiles/multiRole/multiRoleProfile.h
index e62bf92..65d3086 100644
--- a/bthome_phy6222/SDK/components/profiles/multiRole/multiRoleProfile.h
+++ b/bthome_phy6222/SDK/components/profiles/multiRole/multiRoleProfile.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: multiRoleProfile.h
Revised:
@@ -10,6 +6,8 @@
Description: This file contains the Simple GATT profile definitions and
prototypes.
+ SDK_LICENSE
+
**************************************************************************************************/
#ifndef MULTIROLE_PROFILE_H
diff --git a/bthome_phy6222/SDK/components/profiles/ota/ota_flash.c b/bthome_phy6222/SDK/components/profiles/ota/ota_flash.c
index 8b8e462..8163bd7 100644
--- a/bthome_phy6222/SDK/components/profiles/ota/ota_flash.c
+++ b/bthome_phy6222/SDK/components/profiles/ota/ota_flash.c
@@ -1,8 +1,8 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
+/*************
+ ota_flash.c
+ SDK_LICENSE
+***************/
+
#include "flash.h"
#include "ota_flash.h"
#include "ota_app_service.h"
@@ -30,21 +30,30 @@ int flash_check_parition(unsigned char* pflash, int size, unsigned char* run_add
AP_PCR->CACHE_BYPASS = 0;\
}while(0);
-uint16_t crc16_table[16] __attribute__((section("ota_app_loader_area"))) =
+#if defined ( __CC_ARM )
+ #define OTA_APP_LOADAREA_T __attribute__((section("ota_app_loader_area")))
+ #define OTA_APP_LOADAREA_D __attribute__((section("ota_app_loader_area")))
+#elif defined ( __GNUC__ )
+ #define OTA_APP_LOADAREA_T __attribute__((section("ota_app_loader_area")))
+ #define OTA_APP_LOADAREA_D __attribute__((section("ota_app_loader_area_d")))
+#endif
+
+uint16_t OTA_APP_LOADAREA_D crc16_table[16] =
{
0x0000, 0xCC01, 0xD801, 0x1400, 0xF001, 0x3C00, 0x2800, 0xE401,
0xA001, 0x6C00, 0x7800, 0xB401, 0x5000, 0x9C01, 0x8801, 0x4400
};
-uint32_t __attribute__((section("ota_app_loader_area"))) ota_load_flash_addr;
-uint32_t __attribute__((section("ota_app_loader_area"))) ota_load_run_addr;
-uint32_t __attribute__((section("ota_app_loader_area"))) ota_load_size;
-uint32_t __attribute__((section("ota_app_loader_area"))) ota_load_checksum;
-uint32_t __attribute__((section("ota_app_loader_area"))) ota_load_crc;
-uint32_t __attribute__((section("ota_app_loader_area"))) ota_boot_bypass_crc;
-//uint32_t __attribute__((section("ota_app_loader_area"))) ota_load_mic;
+uint32_t OTA_APP_LOADAREA_D ota_load_flash_addr;
+uint32_t OTA_APP_LOADAREA_D ota_load_run_addr;
+uint32_t OTA_APP_LOADAREA_D ota_load_size;
+uint32_t OTA_APP_LOADAREA_D ota_load_checksum;
+uint32_t OTA_APP_LOADAREA_D ota_load_crc;
+uint32_t OTA_APP_LOADAREA_D ota_boot_bypass_crc;
+uint32_t OTA_APP_LOADAREA_D ota_slb_xip_addr = 0;
+//uint32_t OTA_APP_LOADAREA_D ota_load_mic;
-static uint16_t __attribute__((section("ota_app_loader_area"))) crc16_byte(uint16_t crc, uint8_t byte)
+static uint16_t OTA_APP_LOADAREA_T crc16_byte(uint16_t crc, uint8_t byte)
{
// static const uint16_t crc16_table[16] =
// {
@@ -63,7 +72,7 @@ static uint16_t __attribute__((section("ota_app_loader_area"))) crc16_byte(uint1
return crc;
}
-// uint16_t __attribute__((section("ota_app_loader_area"))) OTA_crc16(uint16_t seed, const volatile void * p_data, uint32_t size)
+// uint16_t OTA_APP_LOADAREA_T OTA_crc16(uint16_t seed, const volatile void * p_data, uint32_t size)
//{
// uint8_t * p_block = (uint8_t *)p_data;
@@ -76,7 +85,7 @@ static uint16_t __attribute__((section("ota_app_loader_area"))) crc16_byte(uint1
// return seed;
//}
-uint16_t __attribute__((section("ota_app_loader_area"))) $Sub$$crc16(uint16_t seed, const volatile void* p_data, uint32_t size)
+uint16_t OTA_APP_LOADAREA_T crc16(uint16_t seed, const volatile void* p_data, uint32_t size)
{
// OTA_crc16(seed,p_data,size);
uint8_t* p_block = (uint8_t*)p_data;
@@ -91,7 +100,7 @@ uint16_t __attribute__((section("ota_app_loader_area"))) $Sub$$crc16(uint16_t se
return seed;
}
-int __attribute__((section("ota_app_loader_area"))) ota_flash_read(uint32_t* dest, uint32_t addr, uint32_t size)
+int OTA_APP_LOADAREA_T ota_flash_read(uint32_t* dest, uint32_t addr, uint32_t size)
{
int i;
uint32_t cb = AP_PCR->CACHE_BYPASS;
@@ -122,14 +131,15 @@ int __attribute__((section("ota_app_loader_area"))) ota_flash_read(uint32_t* des
}
-int __attribute__((section("ota_app_loader_area"))) ota_flash_load_app(void)
+int OTA_APP_LOADAREA_T ota_flash_load_app(void)
{
int i,ret;
bool is_encrypt = FALSE;
uint32_t partition_num = 0;
uint32_t bank_info = 0;
uint32_t bank_addr = 0;
-// uint32_t ota_sec_flag = 0;
+ uint32_t xip_entry = 0;
+ bool is_not_xip = false;
ota_flash_read(&partition_num, OTAF_2nd_BOOTINFO_ADDR, 4);
if(partition_num == 0xffffffff)
@@ -155,6 +165,11 @@ int __attribute__((section("ota_app_loader_area"))) ota_flash_load_app(void)
// LOG("OTAF_APP_BANK_0_ADDR\r\n");
bank_addr = OTAF_APP_BANK_0_ADDR;
}
+ else if(bank_info == OTAF_DUAL_SLBXIP)
+ {
+ // LOG("OTAF_DUAL_SLBXIP\r\n");
+ bank_addr = 0;
+ }
else
{
// LOG("PPlus_ERR_OTA_BAD_DATA - bank numb > 2\r\n");
@@ -180,6 +195,9 @@ int __attribute__((section("ota_app_loader_area"))) ota_flash_load_app(void)
ota_flash_read(&ota_load_size, OTAF_2nd_BOOTINFO_ADDR + i*4*4 + 8, 4);
ota_flash_read(&ota_load_checksum, OTAF_2nd_BOOTINFO_ADDR + i*4*4 + 12, 4);
+ if(is_not_xip==false && i == 1)
+ xip_entry = ota_load_run_addr;
+
if((ota_load_flash_addr==0xffffffff) || (ota_load_run_addr == 0xffffffff )||(ota_load_size == 0xffffffff )||(ota_load_checksum == 0xffffffff ))
{
return PPlus_ERR_OTA_NO_APP;
@@ -188,7 +206,8 @@ int __attribute__((section("ota_app_loader_area"))) ota_flash_load_app(void)
//ota_sec_flag = ota_load_size&0x80000000;
//case XIP mode, shoud be in single bank and no fct
- if(ota_load_run_addr == ota_load_flash_addr)
+ if((ota_load_run_addr == ota_load_flash_addr ) &&
+ ((ota_load_flash_addr & 0xff000000) == OTAF_BASE_ADDR))
{
// LOG("XIP MODE >>> ");
if(USE_FCT==0 && CFG_OTA_BANK_MODE==OTA_SINGLE_BANK)
@@ -197,12 +216,15 @@ int __attribute__((section("ota_app_loader_area"))) ota_flash_load_app(void)
// continue;
if(is_encrypt)
{
- flash_check_parition((uint8_t*)ota_load_flash_addr,(int)ota_load_size,NULL,(uint8_t*)&ota_load_crc);
-
- if ( ota_load_crc!=ota_load_checksum )
+ if(ota_boot_bypass_crc!=OTA_FAST_BOOT_MAGIC)
{
- write_reg(OTA_MODE_SELECT_REG, OTA_MODE_OTA);
- hal_system_soft_reset();
+ flash_check_parition((uint8_t*)ota_load_flash_addr,(int)ota_load_size,NULL,(uint8_t*)&ota_load_crc);
+
+ if ( ota_load_crc!=ota_load_checksum )
+ {
+ write_reg(OTA_MODE_SELECT_REG, OTA_MODE_OTA);
+ hal_system_soft_reset();
+ }
}
}
else
@@ -230,6 +252,8 @@ int __attribute__((section("ota_app_loader_area"))) ota_flash_load_app(void)
}
}
+ is_not_xip = true;
+
if((ota_load_run_addr&0xffff0000) == 0xffff0000)
{
continue;
@@ -277,6 +301,7 @@ int __attribute__((section("ota_app_loader_area"))) ota_flash_load_app(void)
}
}
+ ota_slb_xip_addr = xip_entry;
// LOG("PPlus_SUCCESS\r\n");
return PPlus_SUCCESS;
}
diff --git a/bthome_phy6222/SDK/components/profiles/ota/ota_flash.h b/bthome_phy6222/SDK/components/profiles/ota/ota_flash.h
index 0f68f82..67c1006 100644
--- a/bthome_phy6222/SDK/components/profiles/ota/ota_flash.h
+++ b/bthome_phy6222/SDK/components/profiles/ota/ota_flash.h
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ ota_flash.h
+ SDK_LICENSE
+***************/
#ifndef _OTA_FLASH_H
#define _OTA_FLASH_H
@@ -12,9 +12,10 @@
enum
{
- OTAF_SINGLE_BANK = 0,
+ OTAF_SINGLE_BANK = 0,
OTAF_DUAL_BANK_0 = 1,
- OTAF_DUAL_BANK_1 = 2
+ OTAF_DUAL_BANK_1 = 2,
+ OTAF_DUAL_SLBXIP = 3
};
#define DBG_BOOT_IO_TOGGLE do{\
@@ -148,6 +149,9 @@ enum
#elif(CFG_FLASH == 512)
#define OTAF_START_ADDR 0x11003000
#define OTAF_END_ADDR 0x1107ffff
+ #elif(CFG_FLASH == 1024)
+ #define OTAF_START_ADDR 0x11003000
+ #define OTAF_END_ADDR 0x11100000
#elif(CFG_FLASH == 4096)
#define OTAF_START_ADDR 0x11003000
#define OTAF_END_ADDR 0x111fffff
diff --git a/bthome_phy6222/SDK/components/profiles/ota/ota_flash_mesh.c b/bthome_phy6222/SDK/components/profiles/ota/ota_flash_mesh.c
index 666731b..0de7b1c 100644
--- a/bthome_phy6222/SDK/components/profiles/ota/ota_flash_mesh.c
+++ b/bthome_phy6222/SDK/components/profiles/ota/ota_flash_mesh.c
@@ -1,3 +1,7 @@
+/*************
+ ota_flash_mesh.c
+ SDK_LICENSE
+***************/
#include "flash.h"
#include "ota_flash.h"
diff --git a/bthome_phy6222/SDK/components/profiles/ota/ota_flash_mesh.h b/bthome_phy6222/SDK/components/profiles/ota/ota_flash_mesh.h
index 88c1484..48fafd9 100644
--- a/bthome_phy6222/SDK/components/profiles/ota/ota_flash_mesh.h
+++ b/bthome_phy6222/SDK/components/profiles/ota/ota_flash_mesh.h
@@ -1,3 +1,8 @@
+/*************
+ ota_flash_mesh.h
+ SDK_LICENSE
+***************/
+
#ifndef __OTA_MESH_FLASH_
#define __OTA_MESH_FLASH_
diff --git a/bthome_phy6222/SDK/components/profiles/ota/ota_protocol.c b/bthome_phy6222/SDK/components/profiles/ota/ota_protocol.c
index 0a35623..a1072f7 100644
--- a/bthome_phy6222/SDK/components/profiles/ota/ota_protocol.c
+++ b/bthome_phy6222/SDK/components/profiles/ota/ota_protocol.c
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ ota_protocol.c
+ SDK_LICENSE
+***************/
#include "bcomdef.h"
#include "OSAL.h"
@@ -116,8 +116,11 @@ typedef struct
} ota_context_t;
#define OTA_PBUF_SIZE (16*1024+16)
-uint8_t ota_patition_buffer[OTA_PBUF_SIZE] __attribute__((section("ota_partition_buffer_area")));
-
+#if defined(__GNUC__)
+ uint8_t* ota_patition_buffer = (uint8_t*)0x1fffb300;
+#else
+ uint8_t ota_patition_buffer[OTA_PBUF_SIZE] __attribute__((section("ota_partition_buffer_area")));
+#endif
static uint16_t s_ota_burst_size = 16;
static bool s_ota_resource = FALSE;
@@ -134,7 +137,7 @@ extern bool finidv(void);
extern llStatus_t LL_Rand( uint8* randData,
uint8 dataLen );
-extern void LL_ENC_AES128_Encrypt0( uint8* key,uint8* plaintext,uint8* ciphertext );
+extern void LL_ENC_AES128_Encrypt( uint8* key,uint8* plaintext,uint8* ciphertext );
bool is_encrypt = FALSE;
static void start_timer(uint32_t timeout)
@@ -405,7 +408,7 @@ void process_ctrl_cmd(uint8_t* cmdbuf, uint8_t size)
osal_memset(s_ota_ctx.m_key,0,sizeof(s_ota_ctx.m_key));
osal_memcpy(s_ota_ctx.m_key, cmd.p.ver_key,sizeof(s_ota_ctx.m_key));
LL_Rand((uint8_t*)s_ota_ctx.s_random, sizeof(s_ota_ctx.s_random));
- LL_ENC_AES128_Encrypt0((uint8_t*)g_ota_sec_key,s_ota_ctx.s_random,s_ota_ctx.s_key);
+ LL_ENC_AES128_Encrypt((uint8_t*)g_ota_sec_key,s_ota_ctx.s_random,s_ota_ctx.s_key);
response_param(OTA_RSP_SEC_CONFIRM,s_ota_ctx.s_key,sizeof(s_ota_ctx.s_key));
break;
@@ -419,7 +422,7 @@ void process_ctrl_cmd(uint8_t* cmdbuf, uint8_t size)
osal_memset(s_ota_ctx.m_random,0,sizeof(s_ota_ctx.m_random));
osal_memcpy(s_ota_ctx.m_random,cmd.p.random,sizeof(s_ota_ctx.m_random));
uint8_t key[16];
- LL_ENC_AES128_Encrypt0((uint8_t*)g_ota_sec_key,s_ota_ctx.m_random,key);
+ LL_ENC_AES128_Encrypt((uint8_t*)g_ota_sec_key,s_ota_ctx.m_random,key);
if(osal_memcmp(key,s_ota_ctx.m_key,sizeof(key))==0)
{
@@ -441,8 +444,8 @@ void process_ctrl_cmd(uint8_t* cmdbuf, uint8_t size)
osal_memset(s_ota_ctx.m_confirm,0,sizeof(s_ota_ctx.m_confirm));
osal_memcpy(s_ota_ctx.m_confirm,cmd.p.confirm,sizeof(s_ota_ctx.m_confirm));
uint8_t random_key[16];
- LL_ENC_AES128_Encrypt0(s_ota_ctx.m_random,s_ota_ctx.s_random,random_key);
- LL_ENC_AES128_Encrypt0((uint8_t*)g_ota_sec_key,random_key,s_ota_ctx.s_confirm);
+ LL_ENC_AES128_Encrypt(s_ota_ctx.m_random,s_ota_ctx.s_random,random_key);
+ LL_ENC_AES128_Encrypt((uint8_t*)g_ota_sec_key,random_key,s_ota_ctx.s_confirm);
if(osal_memcmp(s_ota_ctx.s_confirm,s_ota_ctx.m_confirm,sizeof(s_ota_ctx.s_confirm))==0)
{
@@ -1033,6 +1036,8 @@ void process_service_evt(ota_Evt_t* pev)
break;
}
}
+
+#if defined ( __CC_ARM )
#define __APP_RUN_ADDR__ (0x1FFF1838)
__asm void __attribute__((section("ota_app_loader_area"))) otaProtocol_RunApp(void)
{
@@ -1041,6 +1046,15 @@ __asm void __attribute__((section("ota_app_loader_area"))) otaProtocol_RunApp(vo
BX R1
ALIGN
}
+#elif defined ( __GNUC__ )
+void __attribute__((section("ota_app_loader_area"))) otaProtocol_RunApp(void)
+{
+ __ASM volatile("\tldr r0, =0x1FFF1838\n\t"
+ "ldr r1, [r0, #4]\n\t"
+ "bx r1"
+ );
+}
+#endif
int __attribute__((section("ota_app_loader_area"))) run_application(void)
{
diff --git a/bthome_phy6222/SDK/components/profiles/ota/ota_protocol.h b/bthome_phy6222/SDK/components/profiles/ota/ota_protocol.h
index 6b5afd8..081749a 100644
--- a/bthome_phy6222/SDK/components/profiles/ota/ota_protocol.h
+++ b/bthome_phy6222/SDK/components/profiles/ota/ota_protocol.h
@@ -1,6 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ ota_protocol.h
+ SDK_LICENSE
+***************/
#ifndef _OTA_PROTOCOL_H
#define _OTA_PROTOCOL_H
diff --git a/bthome_phy6222/SDK/components/profiles/ota/ota_service.c b/bthome_phy6222/SDK/components/profiles/ota/ota_service.c
index aa88215..1c03e2b 100644
--- a/bthome_phy6222/SDK/components/profiles/ota/ota_service.c
+++ b/bthome_phy6222/SDK/components/profiles/ota/ota_service.c
@@ -1,6 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ ota_service.c
+ SDK_LICENSE
+***************/
#include "bcomdef.h"
#include "OSAL.h"
diff --git a/bthome_phy6222/SDK/components/profiles/ota/ota_service.h b/bthome_phy6222/SDK/components/profiles/ota/ota_service.h
index 596224a..b3a9401 100644
--- a/bthome_phy6222/SDK/components/profiles/ota/ota_service.h
+++ b/bthome_phy6222/SDK/components/profiles/ota/ota_service.h
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ ota_service.h
+ SDK_LICENSE
+***************/
#ifndef _OTA_SERVICE_H
#define _OTA_SERVICE_H
diff --git a/bthome_phy6222/SDK/components/profiles/ota/otam_protocol.c b/bthome_phy6222/SDK/components/profiles/ota/otam_protocol.c
index 68f2377..76c9350 100644
--- a/bthome_phy6222/SDK/components/profiles/ota/otam_protocol.c
+++ b/bthome_phy6222/SDK/components/profiles/ota/otam_protocol.c
@@ -1,8 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
+/*************
+ otam_protocol.c
+ SDK_LICENSE
+***************/
#include "bcomdef.h"
#include "OSAL.h"
diff --git a/bthome_phy6222/SDK/components/profiles/ota/otam_protocol.h b/bthome_phy6222/SDK/components/profiles/ota/otam_protocol.h
index edff75b..b8beacd 100644
--- a/bthome_phy6222/SDK/components/profiles/ota/otam_protocol.h
+++ b/bthome_phy6222/SDK/components/profiles/ota/otam_protocol.h
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ otam_protocol.h
+ SDK_LICENSE
+***************/
#ifndef __OTA_MAST_PROTO_
#define __OTA_MAST_PROTO_
diff --git a/bthome_phy6222/SDK/components/profiles/ota_app/ota_app_service.c b/bthome_phy6222/SDK/components/profiles/ota_app/ota_app_service.c
index 11165ec..96c3192 100644
--- a/bthome_phy6222/SDK/components/profiles/ota_app/ota_app_service.c
+++ b/bthome_phy6222/SDK/components/profiles/ota_app/ota_app_service.c
@@ -1,6 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
+/*************
+ ota_app_service.c
+ SDK_LICENSE
+***************/
#include "bcomdef.h"
#include
diff --git a/bthome_phy6222/SDK/components/profiles/ota_app/ota_app_service.h b/bthome_phy6222/SDK/components/profiles/ota_app/ota_app_service.h
index 596b2be..9dbea2c 100644
--- a/bthome_phy6222/SDK/components/profiles/ota_app/ota_app_service.h
+++ b/bthome_phy6222/SDK/components/profiles/ota_app/ota_app_service.h
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ ota_app_service.h
+ SDK_LICENSE
+***************/
#ifndef _OTA_APP_SERVICE_H
#define _OTA_APP_SERVICE_H
diff --git a/bthome_phy6222/SDK/components/profiles/slb/slb.c b/bthome_phy6222/SDK/components/profiles/slb/slb.c
index fb0562f..2e80782 100644
--- a/bthome_phy6222/SDK/components/profiles/slb/slb.c
+++ b/bthome_phy6222/SDK/components/profiles/slb/slb.c
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/*************
+ slb.c
+ SDK_LICENSE
+***************/
#include
#include
diff --git a/bthome_phy6222/SDK/components/profiles/slb/slb.h b/bthome_phy6222/SDK/components/profiles/slb/slb.h
index fe96e3d..6cfcd0d 100644
--- a/bthome_phy6222/SDK/components/profiles/slb/slb.h
+++ b/bthome_phy6222/SDK/components/profiles/slb/slb.h
@@ -1,3 +1,8 @@
+/*************
+ slb.h
+ SDK_LICENSE
+***************/
+
#ifndef __SLB_H
#define __SLB_H
diff --git a/bthome_phy6222/SDK/lib/ble_controller/ll.c b/bthome_phy6222/SDK/lib/ble_controller/ll.c
index 0230b41..2419601 100644
--- a/bthome_phy6222/SDK/lib/ble_controller/ll.c
+++ b/bthome_phy6222/SDK/lib/ble_controller/ll.c
@@ -12,6 +12,7 @@
This API is based on the Bluetooth Core Specification,
V4.0.0, Vol. 6.
+ SDK_LICENSE
*******************************************************************************/
//#define DEBUG_LL
diff --git a/bthome_phy6222/SDK/lib/ble_controller/ll_common.c b/bthome_phy6222/SDK/lib/ble_controller/ll_common.c
index d9f4dc3..0d1a9f9 100644
--- a/bthome_phy6222/SDK/lib/ble_controller/ll_common.c
+++ b/bthome_phy6222/SDK/lib/ble_controller/ll_common.c
@@ -6,9 +6,8 @@
Description: This file contains common functions used by the Link Layer
Bluetooth Low Energy (BLE) Controller.
+ SDK_LICENSE
-
- IMPORTANT:
*******************************************************************************/
#include
diff --git a/bthome_phy6222/SDK/lib/ble_controller/ll_enc.c b/bthome_phy6222/SDK/lib/ble_controller/ll_enc.c
index 051dc15..0467df8 100644
--- a/bthome_phy6222/SDK/lib/ble_controller/ll_enc.c
+++ b/bthome_phy6222/SDK/lib/ble_controller/ll_enc.c
@@ -5,6 +5,7 @@
Description: This file contains the BLE encryption API for the LL.
+ SDK_LICENSE
*******************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_controller/ll_hwItf.c b/bthome_phy6222/SDK/lib/ble_controller/ll_hwItf.c
index e50e8c3..2d93d30 100644
--- a/bthome_phy6222/SDK/lib/ble_controller/ll_hwItf.c
+++ b/bthome_phy6222/SDK/lib/ble_controller/ll_hwItf.c
@@ -8,9 +8,8 @@
Description: Interface functions to LL HW.
- Copyright 2017-2020 Phyplus Incorporated. All rights reserved.
+ SDK_LICENSE
- IMPORTANT:
*******************************************************************************/
#include
diff --git a/bthome_phy6222/SDK/lib/ble_controller/ll_hw_drv.c b/bthome_phy6222/SDK/lib/ble_controller/ll_hw_drv.c
index 020f823..7c31309 100644
--- a/bthome_phy6222/SDK/lib/ble_controller/ll_hw_drv.c
+++ b/bthome_phy6222/SDK/lib/ble_controller/ll_hw_drv.c
@@ -5,7 +5,7 @@
@date 26. Mar. 2017
@author Zhongqi Yang
-
+ SDK_LICENSE
***********************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_controller/ll_masterEndCauses.c b/bthome_phy6222/SDK/lib/ble_controller/ll_masterEndCauses.c
index 6c14f70..79a3bf0 100644
--- a/bthome_phy6222/SDK/lib/ble_controller/ll_masterEndCauses.c
+++ b/bthome_phy6222/SDK/lib/ble_controller/ll_masterEndCauses.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*******************************************************************************
Filename: ll_MasterEndCauses.c
Revised: $
@@ -41,6 +9,7 @@
related to connection termination, as well as common
termination routines used by the master.
+ SDK_LICENSE
*******************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_controller/ll_slaveEndCauses.c b/bthome_phy6222/SDK/lib/ble_controller/ll_slaveEndCauses.c
index 143a643..3e929b4 100644
--- a/bthome_phy6222/SDK/lib/ble_controller/ll_slaveEndCauses.c
+++ b/bthome_phy6222/SDK/lib/ble_controller/ll_slaveEndCauses.c
@@ -9,6 +9,7 @@
related to connection termination, as well as common
termination routines used by the slave.
+ SDK_LICENSE
*******************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_controller/ll_sleep.c b/bthome_phy6222/SDK/lib/ble_controller/ll_sleep.c
index a9810cc..ba2f2ad 100644
--- a/bthome_phy6222/SDK/lib/ble_controller/ll_sleep.c
+++ b/bthome_phy6222/SDK/lib/ble_controller/ll_sleep.c
@@ -1,3 +1,7 @@
+/*************
+ ll_sleep.c
+ SDK_LICENSE
+***************/
/*******************************************************************************
diff --git a/bthome_phy6222/SDK/lib/ble_controller/rf_phy_driver.c b/bthome_phy6222/SDK/lib/ble_controller/rf_phy_driver.c
index cd4047f..5804f0d 100644
--- a/bthome_phy6222/SDK/lib/ble_controller/rf_phy_driver.c
+++ b/bthome_phy6222/SDK/lib/ble_controller/rf_phy_driver.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*******************************************************************************
@file rf_phy_driver.c
@brief Contains all functions support for PHYPLUS RF_PHY_DRIVER
@@ -37,7 +5,7 @@
@date 24. Aug. 2017
@author Zhongqi Yang
-
+ SDK_LICENSE
*******************************************************************************/
@@ -697,13 +665,13 @@ uint8_t rf_tp_cal(uint8_t rfChn, uint8_t fDev)
switch (g_system_clk)
{
- case SYS_CLK_XTAL_16M:
- timeOut=timeOut;
- break;
+// case SYS_CLK_XTAL_16M:
+ //timeOut = timeOut;
+// break;
case SYS_CLK_RC_32M:
case SYS_CLK_DBL_32M:
- timeOut=timeOut*2;
+ timeOut <<= 1;
break;
#if (PHY_MCU_TYPE == MCU_BUMBEE_M0 || PHY_MCU_TYPE == MCU_BUMBEE_CK802)
@@ -715,20 +683,20 @@ uint8_t rf_tp_cal(uint8_t rfChn, uint8_t fDev)
#elif ((PHY_MCU_TYPE == MCU_PRIME_A1) ||(PHY_MCU_TYPE == MCU_PRIME_A2))
case SYS_CLK_DBL_32M:
- timeOut=timeOut*2;
+ timeOut <<= 1;
break;
#endif
case SYS_CLK_DLL_48M:
- timeOut=timeOut*3;
+ timeOut = (timeOut << 1) + timeOut;
break;
case SYS_CLK_DLL_64M:
- timeOut=timeOut*4;
+ timeOut <<= 2;
break;
default:
- timeOut=timeOut;
+ //timeOut = timeOut;
break;
}
@@ -851,13 +819,13 @@ void rf_rxDcoc_cfg(uint8_t rfChn, uint8_t bwSet, volatile uint32* dcCal)
switch (g_system_clk)
{
- case SYS_CLK_XTAL_16M:
- cnt=cnt;
- break;
+// case SYS_CLK_XTAL_16M:
+// //cnt=cnt;
+// break;
case SYS_CLK_RC_32M:
case SYS_CLK_DBL_32M:
- cnt=cnt*2;
+ cnt <<= 1;
break;
#if (PHY_MCU_TYPE == MCU_BUMBEE_M0 || PHY_MCU_TYPE == MCU_BUMBEE_CK802)
@@ -874,15 +842,15 @@ void rf_rxDcoc_cfg(uint8_t rfChn, uint8_t bwSet, volatile uint32* dcCal)
#endif
case SYS_CLK_DLL_48M:
- cnt=cnt*3;
+ cnt = (cnt << 1) + cnt;
break;
case SYS_CLK_DLL_64M:
- cnt=cnt*4;
+ cnt <<= 2;
break;
default:
- cnt=cnt;
+ //cnt=cnt;
break;
}
diff --git a/bthome_phy6222/SDK/lib/ble_host/att_client.c b/bthome_phy6222/SDK/lib/ble_host/att_client.c
index 88fd835..874ba83 100644
--- a/bthome_phy6222/SDK/lib/ble_host/att_client.c
+++ b/bthome_phy6222/SDK/lib/ble_host/att_client.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: att_client.c
Revised:
@@ -37,6 +5,7 @@
Description: This file contains the Attribute Protocol Client.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/att_server.c b/bthome_phy6222/SDK/lib/ble_host/att_server.c
index 2d084c9..f01e7c2 100644
--- a/bthome_phy6222/SDK/lib/ble_host/att_server.c
+++ b/bthome_phy6222/SDK/lib/ble_host/att_server.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: att_server.c
Revised:
@@ -37,6 +5,7 @@
Description: This file contains the Attribute Protocol Server.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/att_util.c b/bthome_phy6222/SDK/lib/ble_host/att_util.c
index 1e01429..1c64d34 100644
--- a/bthome_phy6222/SDK/lib/ble_host/att_util.c
+++ b/bthome_phy6222/SDK/lib/ble_host/att_util.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: att_util.c
Revised:
@@ -38,6 +6,7 @@
Description: This file contains the the utility functions used by
the Attribute Protocol Client and Server.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/gap_centdevmgr.c b/bthome_phy6222/SDK/lib/ble_host/gap_centdevmgr.c
index 7648e05..62605f7 100644
--- a/bthome_phy6222/SDK/lib/ble_host/gap_centdevmgr.c
+++ b/bthome_phy6222/SDK/lib/ble_host/gap_centdevmgr.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: gap_centdevmgr.c
Revised:
@@ -37,6 +5,7 @@
Description: This file contains the GAP Central Device Manager.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/gap_centlinkmgr.c b/bthome_phy6222/SDK/lib/ble_host/gap_centlinkmgr.c
index c5ae291..3db1c1e 100644
--- a/bthome_phy6222/SDK/lib/ble_host/gap_centlinkmgr.c
+++ b/bthome_phy6222/SDK/lib/ble_host/gap_centlinkmgr.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: gap_centlinkmgr.c
Revised:
@@ -38,6 +6,8 @@
Description: This file contains the GAP Celntral Link Manager.
+ SDK_LICENSE
+
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/gap_configmgr.c b/bthome_phy6222/SDK/lib/ble_host/gap_configmgr.c
index 1f4dcfc..c98a1f1 100644
--- a/bthome_phy6222/SDK/lib/ble_host/gap_configmgr.c
+++ b/bthome_phy6222/SDK/lib/ble_host/gap_configmgr.c
@@ -1,34 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
/*************************************************************************************************
Filename: gap_configmgr.c
@@ -37,9 +6,9 @@
Description: This file contains the GAP Configuration Manager.
+ SDK_LICENSE
**************************************************************************************************/
-
#include "bcomdef.h"
#include "gap.h"
#include "gap_internal.h"
@@ -241,10 +210,10 @@ static uint16 gapParameters[] =
TGAP_FILTER_ADV_REPORTS_DEFAULT,
(uint16)TGAP_SCAN_RSP_RSSI_MIN_DEFAULT,
TGAP_REJECT_CONN_PARAMS_DEFAULT,
- #if defined ( TESTMODES )
+#if defined ( TESTMODES )
TGAP_GAP_TESTCODE_DEFAULT,
TGAP_SM_TESTCODE_DEFAULT,
- #endif
+#endif
TGAP_AUTH_TASK_ID_DEFAULT
};
@@ -274,7 +243,7 @@ bStatus_t GAP_SetParamValue( gapParamIDs_t paramID, uint16 paramValue )
// Check for invalid parameters
if ( (paramID < TGAP_PARAMID_MAX) && (paramValue != 0xFFFF) )
{
- #if defined ( TESTMODES )
+#if defined ( TESTMODES )
if ( (paramID == TGAP_SM_TESTCODE) && (paramValue == SM_TESTMODE_SEND_CONFIRM) )
{
@@ -285,7 +254,7 @@ bStatus_t GAP_SetParamValue( gapParamIDs_t paramID, uint16 paramValue )
return ( smSendPairingConfirm( 0, &confirmMsg ) );
}
- #endif
+#endif
// Good so far
gapParameters[paramID] = paramValue;
return ( SUCCESS );
diff --git a/bthome_phy6222/SDK/lib/ble_host/gap_devmgr.c b/bthome_phy6222/SDK/lib/ble_host/gap_devmgr.c
index 95034ef..e36a0be 100644
--- a/bthome_phy6222/SDK/lib/ble_host/gap_devmgr.c
+++ b/bthome_phy6222/SDK/lib/ble_host/gap_devmgr.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: gap_devmgr.c
Revised:
@@ -37,6 +5,7 @@
Description: This file contains the GAP Device Manager.
+ SDK_LICENSE
**************************************************************************************************/
#include "bcomdef.h"
diff --git a/bthome_phy6222/SDK/lib/ble_host/gap_linkmgr.c b/bthome_phy6222/SDK/lib/ble_host/gap_linkmgr.c
index ea7e77a..5612d32 100644
--- a/bthome_phy6222/SDK/lib/ble_host/gap_linkmgr.c
+++ b/bthome_phy6222/SDK/lib/ble_host/gap_linkmgr.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: gap_linkmgr.c
Revised:
@@ -38,6 +6,8 @@
Description: This file contains the GAP Link Manager and the GAP Link
Database.
+ SDK_LICENSE
+
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/gap_peridevmgr.c b/bthome_phy6222/SDK/lib/ble_host/gap_peridevmgr.c
index 538e98d..88feb52 100644
--- a/bthome_phy6222/SDK/lib/ble_host/gap_peridevmgr.c
+++ b/bthome_phy6222/SDK/lib/ble_host/gap_peridevmgr.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: gap_peridevmgr.c
Revised:
@@ -37,6 +5,7 @@
Description: This file contains the GAP Peripheral Device Manager.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/gap_perilinkmgr.c b/bthome_phy6222/SDK/lib/ble_host/gap_perilinkmgr.c
index e715bb7..e432a54 100644
--- a/bthome_phy6222/SDK/lib/ble_host/gap_perilinkmgr.c
+++ b/bthome_phy6222/SDK/lib/ble_host/gap_perilinkmgr.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: gap_perilinkmgr.c
Revised:
@@ -37,6 +5,7 @@
Description: This file contains the GAP Peripheral Link Manager.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/gap_simpletask.c b/bthome_phy6222/SDK/lib/ble_host/gap_simpletask.c
index be04a1d..ec1534c 100644
--- a/bthome_phy6222/SDK/lib/ble_host/gap_simpletask.c
+++ b/bthome_phy6222/SDK/lib/ble_host/gap_simpletask.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: gap_simpletask.c
Revised:
@@ -37,6 +5,7 @@
Description: This file contains the GAP Simple Task.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/gap_task.c b/bthome_phy6222/SDK/lib/ble_host/gap_task.c
index 7a9f9dc..6c39826 100644
--- a/bthome_phy6222/SDK/lib/ble_host/gap_task.c
+++ b/bthome_phy6222/SDK/lib/ble_host/gap_task.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: gap_task.c
Revised:
@@ -37,6 +5,7 @@
Description: This file contains the GAP Task.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/gatt_client.c b/bthome_phy6222/SDK/lib/ble_host/gatt_client.c
index c475f3e..e44c704 100644
--- a/bthome_phy6222/SDK/lib/ble_host/gatt_client.c
+++ b/bthome_phy6222/SDK/lib/ble_host/gatt_client.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: gatt_client.c
Revised:
@@ -37,6 +5,7 @@
Description: This file contains the Generic Attribute Profile Client.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/gatt_server.c b/bthome_phy6222/SDK/lib/ble_host/gatt_server.c
index 4e1f496..6f46b7c 100644
--- a/bthome_phy6222/SDK/lib/ble_host/gatt_server.c
+++ b/bthome_phy6222/SDK/lib/ble_host/gatt_server.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: gatt_server.c
Revised:
@@ -37,6 +5,7 @@
Description: This file contains the Generic Attribute Profile Server.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/gatt_task.c b/bthome_phy6222/SDK/lib/ble_host/gatt_task.c
index 9ff939a..9c1f00a 100644
--- a/bthome_phy6222/SDK/lib/ble_host/gatt_task.c
+++ b/bthome_phy6222/SDK/lib/ble_host/gatt_task.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: gatt_task.c
Revised:
@@ -37,6 +5,7 @@
Description: This file contains Generic Attribute Profile (GATT) task.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/gatt_uuid.c b/bthome_phy6222/SDK/lib/ble_host/gatt_uuid.c
index 5fb5a13..7565755 100644
--- a/bthome_phy6222/SDK/lib/ble_host/gatt_uuid.c
+++ b/bthome_phy6222/SDK/lib/ble_host/gatt_uuid.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/**************************************************************************************************
Filename: gatt_uuid.c
Revised:
@@ -38,6 +6,7 @@
Description: This file contains Generic Attribute Profile (GATT)
UUID types.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/l2cap_if.c b/bthome_phy6222/SDK/lib/ble_host/l2cap_if.c
index 9fb8c43..728d115 100644
--- a/bthome_phy6222/SDK/lib/ble_host/l2cap_if.c
+++ b/bthome_phy6222/SDK/lib/ble_host/l2cap_if.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: l2cap_if.c
Revised:
@@ -38,6 +6,7 @@
Description: This file contains the interfaces that L2CAP provides to the
upper layer applications.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/l2cap_task.c b/bthome_phy6222/SDK/lib/ble_host/l2cap_task.c
index e1ee350..83ef186 100644
--- a/bthome_phy6222/SDK/lib/ble_host/l2cap_task.c
+++ b/bthome_phy6222/SDK/lib/ble_host/l2cap_task.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: l2cap_task.c
Revised:
@@ -38,6 +6,7 @@
Description: This file contains the L2CAP Task. It also includes the
L2CAP Channel Manager and Resource Manager components.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/l2cap_util.c b/bthome_phy6222/SDK/lib/ble_host/l2cap_util.c
index c84f36c..b5665e7 100644
--- a/bthome_phy6222/SDK/lib/ble_host/l2cap_util.c
+++ b/bthome_phy6222/SDK/lib/ble_host/l2cap_util.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: l2cap_util.c
Revised:
@@ -38,6 +6,7 @@
Description: This file contains the L2CAP utility funtions. It includes the
L2CAP Encapsulation and Fragmentation/Recombination components.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/linkdb.c b/bthome_phy6222/SDK/lib/ble_host/linkdb.c
index a20d3b8..b93e7bd 100644
--- a/bthome_phy6222/SDK/lib/ble_host/linkdb.c
+++ b/bthome_phy6222/SDK/lib/ble_host/linkdb.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: linkdb.c
Revised:
@@ -39,6 +7,7 @@
These functions are not intended to be used outside of the host base.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/sm_intpairing.c b/bthome_phy6222/SDK/lib/ble_host/sm_intpairing.c
index 71a2fe1..3280244 100644
--- a/bthome_phy6222/SDK/lib/ble_host/sm_intpairing.c
+++ b/bthome_phy6222/SDK/lib/ble_host/sm_intpairing.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: sm_intpairing.c
Revised:
@@ -37,6 +5,7 @@
Description: This file contains the SM Initiator Pairing Manager.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/sm_mgr.c b/bthome_phy6222/SDK/lib/ble_host/sm_mgr.c
index 7b05c2d..6a5f335 100644
--- a/bthome_phy6222/SDK/lib/ble_host/sm_mgr.c
+++ b/bthome_phy6222/SDK/lib/ble_host/sm_mgr.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: sm_mgr.c
Revised:
@@ -37,6 +5,7 @@
Description: This file contains the SM Manager.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/sm_pairing.c b/bthome_phy6222/SDK/lib/ble_host/sm_pairing.c
index 12c0548..11e5ed5 100644
--- a/bthome_phy6222/SDK/lib/ble_host/sm_pairing.c
+++ b/bthome_phy6222/SDK/lib/ble_host/sm_pairing.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: sm_pairing.c
Revised:
@@ -37,6 +5,7 @@
Description: This file contains the SM Pairing Manager.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/sm_rsppairing.c b/bthome_phy6222/SDK/lib/ble_host/sm_rsppairing.c
index 0a8c6b3..9d05134 100644
--- a/bthome_phy6222/SDK/lib/ble_host/sm_rsppairing.c
+++ b/bthome_phy6222/SDK/lib/ble_host/sm_rsppairing.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: sm_rsppairing.c
Revised:
@@ -37,6 +5,7 @@
Description: This file contains the SM Responder Pairing Manager.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/sm_task.c b/bthome_phy6222/SDK/lib/ble_host/sm_task.c
index 36251cd..d8c8408 100644
--- a/bthome_phy6222/SDK/lib/ble_host/sm_task.c
+++ b/bthome_phy6222/SDK/lib/ble_host/sm_task.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: sm_task.c
Revised:
@@ -37,6 +5,7 @@
Description: This file contains the SM Task.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/ble_host/smp.c b/bthome_phy6222/SDK/lib/ble_host/smp.c
index c79b751..ffb518a 100644
--- a/bthome_phy6222/SDK/lib/ble_host/smp.c
+++ b/bthome_phy6222/SDK/lib/ble_host/smp.c
@@ -1,35 +1,3 @@
-/**************************************************************************************************
-
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
-
/*************************************************************************************************
Filename: smp.c
Revised:
@@ -37,6 +5,7 @@
Description: This file contains the Security Manager Protocol.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/lib/rf/patch.c b/bthome_phy6222/SDK/lib/rf/patch.c
index cb37d7b..af6d60b 100644
--- a/bthome_phy6222/SDK/lib/rf/patch.c
+++ b/bthome_phy6222/SDK/lib/rf/patch.c
@@ -1,34 +1,9 @@
-/**************************************************************************************************
+/************************************************************
+ patch.c
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
+ SDK_LICENSE
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
+************************************************************/
#include
#include
diff --git a/bthome_phy6222/SDK/lib/rflib.h b/bthome_phy6222/SDK/lib/rflib.h
index c62bbb7..4efa192 100644
--- a/bthome_phy6222/SDK/lib/rflib.h
+++ b/bthome_phy6222/SDK/lib/rflib.h
@@ -1,7 +1,7 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
+/***********
+ rflib.h
+ SDK_LICENSE
+*************/
#ifndef __RF_LIB_H
#define __RF_LIB_H
diff --git a/bthome_phy6222/SDK/lib/sec/aes.c b/bthome_phy6222/SDK/lib/sec/aes.c
index 448772b..6b70d6f 100644
--- a/bthome_phy6222/SDK/lib/sec/aes.c
+++ b/bthome_phy6222/SDK/lib/sec/aes.c
@@ -1,34 +1,9 @@
-/**************************************************************************************************
+/*****************************************************************************
+ aes.c
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
+ SDK_LICENSE
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
+*****************************************************************************/
#include "aes.h"
#include "flash.h"
diff --git a/bthome_phy6222/SDK/lib/sec/aes.h b/bthome_phy6222/SDK/lib/sec/aes.h
index e6f0c82..da11c85 100644
--- a/bthome_phy6222/SDK/lib/sec/aes.h
+++ b/bthome_phy6222/SDK/lib/sec/aes.h
@@ -1,34 +1,9 @@
-/**************************************************************************************************
+/*************************************************************
+ aes.h
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
+ SDK_LICENSE
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
+**************************************************************/
#ifndef AES_H
#define AES_H
diff --git a/bthome_phy6222/SDK/lib/sec/phy_sec_ext.c b/bthome_phy6222/SDK/lib/sec/phy_sec_ext.c
index 280b3c8..48659c4 100644
--- a/bthome_phy6222/SDK/lib/sec/phy_sec_ext.c
+++ b/bthome_phy6222/SDK/lib/sec/phy_sec_ext.c
@@ -1,34 +1,9 @@
-/**************************************************************************************************
+/***************************
+ phy_sec_ext.c
+
+ SDK_LICENSE
- Phyplus Microelectronics Limited confidential and proprietary.
- All rights reserved.
-
- IMPORTANT: All rights of this software belong to Phyplus Microelectronics
- Limited ("Phyplus"). Your use of this Software is limited to those
- specific rights granted under the terms of the business contract, the
- confidential agreement, the non-disclosure agreement and any other forms
- of agreements as a customer or a partner of Phyplus. You may not use this
- Software unless you agree to abide by the terms of these agreements.
- You acknowledge that the Software may not be modified, copied,
- distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
- (BLE) integrated circuit, either as a product or is integrated into your
- products. Other than for the aforementioned purposes, you may not use,
- reproduce, copy, prepare derivative works of, modify, distribute, perform,
- display or sell this Software and/or its documentation for any purposes.
-
- YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
- PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
- INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
- NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
- PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
- NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
- LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
- INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
- OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
- OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
- (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
-
-**************************************************************************************************/
+***************************/
#include "flash.h"
#include "log.h"
diff --git a/bthome_phy6222/SDK/lib/ui_font.h b/bthome_phy6222/SDK/lib/ui_font.h
index aba4641..187c939 100644
--- a/bthome_phy6222/SDK/lib/ui_font.h
+++ b/bthome_phy6222/SDK/lib/ui_font.h
@@ -1,8 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
/**************************************************************
Module Name: font
@@ -11,6 +6,9 @@
UI display drvier
Author: Eagle.Lao
Revision:V0.01
+
+ SDK_LICENSE
+
****************************************************************/
#ifndef _UI_FONT_HEAD_
diff --git a/bthome_phy6222/SDK/misc/jump_function.h b/bthome_phy6222/SDK/misc/jump_function.h
index bdf219d..ccbad78 100644
--- a/bthome_phy6222/SDK/misc/jump_function.h
+++ b/bthome_phy6222/SDK/misc/jump_function.h
@@ -1,7 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
/**
****************************************************************************************
@@ -14,6 +10,8 @@
$Rev: $
+ SDK_LICENSE
+
****************************************************************************************
*/
diff --git a/bthome_phy6222/SDK/misc/jump_table.c b/bthome_phy6222/SDK/misc/jump_table.c
index 089b2b2..9f3aa5f 100644
--- a/bthome_phy6222/SDK/misc/jump_table.c
+++ b/bthome_phy6222/SDK/misc/jump_table.c
@@ -1,8 +1,3 @@
-/**************************************************************************************************
-*******
-**************************************************************************************************/
-
-
/**************************************************************************************************
Filename: jump_table.c
Revised:
@@ -10,6 +5,7 @@
Description: Jump table that holds function pointers and veriables used in ROM code.
+ SDK_LICENSE
**************************************************************************************************/
diff --git a/bthome_phy6222/SDK/misc/rom_sym_def.h b/bthome_phy6222/SDK/misc/rom_sym_def.h
index ccc9208..30d419e 100644
--- a/bthome_phy6222/SDK/misc/rom_sym_def.h
+++ b/bthome_phy6222/SDK/misc/rom_sym_def.h
@@ -1,5 +1,7 @@
-
-
+/*************
+ rom_sym_def.h
+ SDK_LICENSE
+***************/
#ifndef __ROM_SYM_H__
#define __ROM_SYM_H__
#ifdef USE_ROMSYM_ALIAS
diff --git a/bthome_phy6222/ihex.cmd b/bthome_phy6222/ihex_gcc.cmd
similarity index 100%
rename from bthome_phy6222/ihex.cmd
rename to bthome_phy6222/ihex_gcc.cmd
diff --git a/bthome_phy6222/ihex_keil.cmd b/bthome_phy6222/ihex_keil.cmd
new file mode 100644
index 0000000..f129db4
--- /dev/null
+++ b/bthome_phy6222/ihex_keil.cmd
@@ -0,0 +1 @@
+python3 C:\Python310\Scripts\hexinfo.py .\bin\TestTHB2.hex
\ No newline at end of file
diff --git a/bthome_phy6222/rdwr_phy6222.py b/bthome_phy6222/rdwr_phy62x2.py
similarity index 92%
rename from bthome_phy6222/rdwr_phy6222.py
rename to bthome_phy6222/rdwr_phy62x2.py
index 8bcc16d..2aa1742 100644
--- a/bthome_phy6222/rdwr_phy6222.py
+++ b/bthome_phy6222/rdwr_phy62x2.py
@@ -15,15 +15,16 @@ DEF_RUN_BAUD = 115200
MAX_FLASH_SIZE = 0x200000
EXT_FLASH_ADD = 0x400000
-DEF_START_ADDR = 0x1FFF1838
+DEF_START_RUN_APP_ADDR = 0x1FFF1838
+DEF_START_WR_FLASH_ADDR = 0x05000
PHY_FLASH_SECTOR_SIZE = 4096
PHY_FLASH_SECTOR_MASK = 0xfffff000
PHY_WR_BLK_SIZE = 0x2000
-__progname__ = 'PHY6222 Utility'
-__filename__ = 'rdwr_phy6222.py'
-__version__ = "04.01.24"
+__progname__ = 'PHY62x2 Utility'
+__filename__ = 'rdwr_phy62x2.py'
+__version__ = "09.01.24"
def ParseHexFile(hexfile):
try:
@@ -157,7 +158,7 @@ class phyflasher:
self._port.setRTS(True) #RSTN (lo)
self._port.flushOutput()
self._port.flushInput()
- time.sleep(0.2)
+ time.sleep(0.5)
self._port.setDTR(False) #TM (hi)
self._port.flushOutput()
self._port.flushInput()
@@ -200,7 +201,7 @@ class phyflasher:
print('PHY62x2 - Error init3!')
self._port.close()
exit(4)
- print('PHY6222 - connected Ok')
+ print('PHY62x2 - connected Ok')
return self.SetBaud(baud)
def cmd_era4k(self, offset):
print ('Erase sector Flash at 0x%08x...' % offset, end = ' ')
@@ -378,20 +379,34 @@ class phyflasher:
return True
def HexStartSend(self):
return self.write_cmd('spifs 0 1 3 0 ') and self.write_cmd('sfmod 2 2 ') and self.write_cmd('cpnum ffffffff ')
- def HexfHeader(self, hp, start = DEF_START_ADDR):
+ def HexfHeader(self, hp, start = DEF_START_RUN_APP_ADDR, raddr = DEF_START_WR_FLASH_ADDR):
if len(hp) > 1:
hexf = bytearray(b'\xff')*(0x100)
hexf[0:4] = int.to_bytes(len(hp), 4, byteorder='little')
hexf[8:12] = int.to_bytes(start, 4, byteorder='little')
- sections = 0
- faddr = 0x00020000
- raddr = 0x00005000
+ #sections = 0
+ faddr_min = MAX_FLASH_SIZE-1
+ faddr_max = 0
+ rsize = 0
+ for ihp in hp:
+ if (ihp[0] & 0x1fff0000) == 0x1fff0000: # SRAM
+ rsize += len(ihp[1])
+ elif (ihp[0] & (~(MAX_FLASH_SIZE-1))) == 0x11000000: # Flash
+ offset = ihp[0] & (MAX_FLASH_SIZE-1)
+ if faddr_min > offset:
+ faddr_min = offset
+ send = offset + len(ihp[1])
+ if faddr_max <= send:
+ faddr_max = send
+ if (raddr + rsize) >= faddr_min:
+ raddr = (faddr_max + 3) & 0xfffffffc
+ #print('Test: Flash addr min: %08x, max: %08x, RAM addr: %08x' % (faddr_min, faddr_max, raddr))
print ('---- Segments Table -------------------------------------')
for ihp in hp:
- if (ihp[0] & 0x1fff0000) == 0x1fff0000:
+ if (ihp[0] & 0x1fff0000) == 0x1fff0000: # SRAM
faddr = raddr
raddr += (len(ihp[1])+3) & 0xfffffffc
- elif (ihp[0] & (~(MAX_FLASH_SIZE-1))) == 0x11000000:
+ elif (ihp[0] & (~(MAX_FLASH_SIZE-1))) == 0x11000000: # Flash
faddr = ihp[0] & (MAX_FLASH_SIZE-1)
elif ihp[0] == 0:
continue
@@ -401,7 +416,6 @@ class phyflasher:
ihp[2] = faddr
print('Segment: %08x <- Flash addr: %08x, Size: %08x' % (ihp[0], faddr, len(ihp[1])))
hexf.extend(bytearray(struct.pack(' 1:
hexf = bytearray(b'\xff')*(0x100)
hexf[0:4] = int.to_bytes(len(hp), 4, byteorder='little')
hexf[8:12] = int.to_bytes(start, 4, byteorder='little')
- sections = 0
- faddr = 0x00020000
- raddr = 0x00005000
+ #sections = 0
+ faddr_min = MAX_FLASH_SIZE-1
+ faddr_max = 0
+ rsize = 0
+ for ihp in hp:
+ if (ihp[0] & 0x1fff0000) == 0x1fff0000: # SRAM
+ rsize += len(ihp[1])
+ elif (ihp[0] & (~(MAX_FLASH_SIZE-1))) == 0x11000000: # Flash
+ offset = ihp[0] & (MAX_FLASH_SIZE-1)
+ if faddr_min > offset:
+ faddr_min = offset
+ send = offset + len(ihp[1])
+ if faddr_max <= send:
+ faddr_max = send
+ if (raddr + rsize) >= faddr_min:
+ raddr = (faddr_max + 3) & 0xfffffffc
+ #print('Test: Flash addr min: %08x, max: %08x, RAM addr: %08x' % (faddr_min, faddr_max, raddr))
print ('---- Segments Table -------------------------------------')
for ihp in hp:
- if (ihp[0] & 0x1fff0000) == 0x1fff0000:
+ if (ihp[0] & 0x1fff0000) == 0x1fff0000: # SRAM
faddr = raddr
raddr += (len(ihp[1])+3) & 0xfffffffc
- elif (ihp[0] & (~(MAX_FLASH_SIZE-1))) == 0x11000000:
+ elif (ihp[0] & (~(MAX_FLASH_SIZE-1))) == 0x11000000: # Flash
faddr = ihp[0] & (MAX_FLASH_SIZE-1)
elif ihp[0] == 0:
continue
@@ -401,7 +416,6 @@ class phyflasher:
ihp[2] = faddr
print('Segment: %08x <- Flash addr: %08x, Size: %08x' % (ihp[0], faddr, len(ihp[1])))
hexf.extend(bytearray(struct.pack('