(osThreadFunc_t)transmit_process_thread, NULL,
(CreateQueueFunction_t)transmit_thread_msg_init, USE_DTCM_MEM },
#endif
-#if defined(SUPPORT_POWER_MANAGER) && !defined(SUPPORT_AT_OHOSFWK)
+#if defined(SUPPORT_POWER_MANAGER) && !defined(SUPPORT_OHOSFWK)
/* OHOS场景,pms不需要独立的队列和线程,事件由UI线程接管处理 */
{ { "power_display", 0, NULL, 0, NULL, PM_DISPLAY_MSG_STACK_SIZE, TASK_PRIORITY_TRANSMIT, 0, 0 },
(osThreadFunc_t)power_display_msg_thread, NULL,
/* nv init and file system init must be before nv_upg_upgrade_task_process */\r
(void)nv_upg_upgrade_task_process();\r
thread_init();\r
-\r
- //尽早显示启动logo ,需要 lcd 驱动,mount file system , power_display 线程管理 lcd背光\r
- // ohos_show_bootup_logo(); \r
- ShowGraphicLogo();\r
+ \r
button_app_init();\r
\r
#ifdef SUPPORT_AT_VIBRATOR\r
#ifdef CUSTOM_UTILS\r
start_custom_ble_service();\r
#endif\r
-#ifdef SUPPORT_ALIPAY_SEC\r
-#if !defined(A5133_DEMO_SERVER) && !defined(A5133_DEMO_CLIENT)\r
- uapi_alipay_svr_init();\r
-#endif\r
-#endif\r
+// #ifdef SUPPORT_ALIPAY_SEC\r
+// #if !defined(A5133_DEMO_SERVER) && !defined(A5133_DEMO_CLIENT)\r
+// uapi_alipay_svr_init();\r
+// #endif\r
+// #endif\r
\r
#ifdef SUPPORT_A5133_SERVICE\r
uapi_a5133_service_init();\r
gnss_uart_init();\r
#endif\r
\r
-#ifdef SUPPORT_AT_OHOSFWK\r
+#ifdef SUPPORT_OHOSFWK\r
//开始播放开机动画,并启动ohos系统\r
ohos_startup();\r
#endif\r
}\r
\r
if (ret != ERRCODE_SUCC) {\r
- MyPrintf("se i2c data read fail! ret=0x%x", ret);\r
+ if (ret != ERRCODE_I2C_TIMEOUT) MyPrintf("se i2c data read fail! and not equal ERRCODE_I2C_TIMEOUT , ret=0x%x", ret);\r
}\r
\r
return;\r
return;
}
-void svr_alipay_exit_lpm(void)
+int svr_alipay_exit_lpm(void)
{
uint32_t data;
- csi_exit_lpm((void *)&data);
- return;
+ return csi_exit_lpm((void *)&data);
}
int32_t svr_alipay_trans_get_last_code(char *title, uint8_t *transitcode, uint32_t *len)
#删除reg/mem dump,写法如下:'-:DUMP_MEM_SUPPORT', '-:DUMP_REG_SUPPORT', '-:SUPPORT_DFX_EXCEPTION'
'brandy-native-js-user': {
'base_target_name': 'brandy-native-js',
- 'defines': ['-:SW_UART_DEBUG', '-:DUMP_MEM_SUPPORT', '-:DUMP_REG_SUPPORT', '-:SUPPORT_DFX_EXCEPTION'],
+ 'defines': [
+ 'BOARD_FD230',
+ 'FT_SINGLE_UART',
+ 'NANDFLASH_DS35X',
+ 'SUPPORT_BAIDU_MAP',
+ 'CFG_FLASH_SIZE=16',
+ 'SINGLE_USER_PARTITION',
+ 'TPTYPE_FT6X46',
+ 'ROTARYENCODER_HX3507',
+ '-:SW_UART_DEBUG', '-:DUMP_MEM_SUPPORT', '-:DUMP_REG_SUPPORT', '-:SUPPORT_DFX_EXCEPTION'
+ ],
},
'brandy-native-js-user-r': {
'base_target_name': 'brandy-native-js-r',
'defines': [
'BOARD_FD230',
'FT_SINGLE_UART',
+ 'CFG_FLASH_SIZE=16',
+ 'SINGLE_USER_PARTITION',
'NANDFLASH_DS35X'
]
},
'defines': [
'BOARD_FD230',
'FT_SINGLE_UART',
+ 'CFG_FLASH_SIZE=16',
+ 'SINGLE_USER_PARTITION',
'NANDFLASH_DS35X'
]
},
'SUPPORT_HID_SERVICE',
'SUPPORT_BAIDU_MAP',
'CFG_FLASH_SIZE=16',
- 'SINGLE_USER_PARTITION'
- # 'SUPPORT_AUTO_OTA_SERVER',
- # 'CONFIG_DFX_SUPPORT_DIAG_UP_MACHINE=1',
+ 'SINGLE_USER_PARTITION',
'TPTYPE_FT6X46',
'ROTARYENCODER_HX3507',
'NANDFLASH_DS35X',
# "producttest",
],
'image_analysis': False,
- 'fs_image_path':'fd230',
+ # 'fs_image_path':'fd230',
+ 'fs_image_path':'evb',
'fs_image': True
},
'brandy-native-js-fd230-r': {
'defines': [
'BOARD_FD230',
'FT_SINGLE_UART',
- 'NANDFLASH_DS35X'
+ 'NANDFLASH_DS35X',
'TPTYPE_FT6X46',
'CFG_FLASH_SIZE=16',
'FD230',
#define EMMC_SD_BUSWIDTH MMCSD_BUSWIDTH_8
#define PARTITION_EXIST YES
#define ALIPAY_SEC_I2C_INDEX I2C_BUS_3
-#define ALIPAY_SEC_GPIO S_AGPIO_L29
+#define ALIPAY_SEC_GPIO S_AGPIO_R1
#endif
\r
uint32_t write_by_cpu_single_line(qspi_data_type_def *qspi_data)\r
{\r
- PRINT("write_by_cpu_single_line !!!\r\n");\r
+ // PRINT("write_by_cpu_single_line !!!\r\n");\r
qspi_busy_wait();\r
uint16_t address = SWAP_U16(qspi_data->address);\r
uint8_t *addr = (uint8_t *)&address;\r
uint8_t buffer_oob_verify[128] __attribute__((aligned(4))); // 128 is one max oob size\r
int has_nandflash_init = 0;\r
\r
-// #ifndef MEMORY_MINI\r
-// #define YF_NAME_STRS "/system/", "/update/", "/music/", "/user/"\r
-// uint32_t yf_volume_percent[YF_VOLUMES_NUM] = { 10, 10, 10, 70 };\r
-// #else\r
+#ifdef SINGLE_USER_PARTITION\r
#define YF_VOLUMES_NUM 1\r
#define YF_NAME_STRS "/user/"\r
uint32_t yf_volume_percent[YF_VOLUMES_NUM] = {100};\r
-// #endif\r
+#else\r
+#define YF_VOLUMES_NUM 4\r
+#define YF_NAME_STRS "/system/", "/update/", "/music/", "/user/"\r
+uint32_t yf_volume_percent[YF_VOLUMES_NUM] = { 10, 10, 10, 70 };\r
+\r
+#endif\r
\r
static const char * const g_volume_names[YF_VOLUMES_NUM] = { YF_NAME_STRS };\r
\r
#ifdef QSPI_DISPLAY
#define IMAGE_OPEN_LOGO_PATH "/user/res/OPEN_LOGO_QSPI.bin"
#else
-#define IMAGE_OPEN_LOGO_PATH "/user/res/OPEN_LOGO.bin"
+//#define IMAGE_OPEN_LOGO_PATH "/user/res/OPEN_LOGO.bin"
+#ifdef SINGLE_USER_PARTITION
+#define IMAGE_OPEN_LOGO_PATH "/user/system/KUMI_LOGO.bin"
+#define IMAGE_OTA_LOGO_PATH "/user/system/OTAUpdata.bin"
+#else
+#define IMAGE_OPEN_LOGO_PATH "/system/KUMI_LOGO.bin"
+#define IMAGE_OTA_LOGO_PATH "/system/OTAUpdata.bin"
+#endif
#endif
static void UikitRTCCallBack(uintptr_t data)
#include "init_data.h"
namespace {
+#ifdef SINGLE_USER_PARTITION
+const char* g_hwDirectory = "/user/system/usr/ohos_icu";
+#else
const char* g_hwDirectory = "/system/usr/ohos_icu";
+#endif
}
/**
#include "bts_gatt_server.h"
#include "securec.h"
#include "wearable_log.h"
-#ifdef SUPPORT_AT_OHOSFWK
+#ifdef SUPPORT_OHOSFWK
#include "BluetoothWrapper.h"
#endif
bts_data_to_uuid_len2(BLE_UUID_CYWEE_REPORT_SERVICE, &cywee_service_uuid);
//只有一个服务,永远是1
errcode_t ret = 0;
-#ifndef SUPPORT_AT_OHOSFWK
+#ifndef SUPPORT_OHOSFWK
ret = gatts_add_service(server_id, &cywee_service_uuid, true);
printf("ble_cywee_add_service gatts_add_service ret: 0x%x serverId = 0x%x uuid.uuid_len:%d\n", ret, server_id,cywee_service_uuid.uuid_len);
#else
#include "bts_gatt_server.h"\r
#include "securec.h"\r
#include "wearable_log.h"\r
-#ifdef SUPPORT_AT_OHOSFWK\r
+#ifdef SUPPORT_OHOSFWK\r
#include "BluetoothWrapper.h"\r
#endif\r
// #include "bts_def.h"\r
bts_data_to_uuid_len2(BLE_UUID_PPG_BLE_SERVICE, &ppgtest_service_uuid);\r
//只有一个服务,永远是1\r
errcode_t ret = 0;\r
-#ifndef SUPPORT_AT_OHOSFWK\r
+#ifndef SUPPORT_OHOSFWK\r
ret = gatts_add_service(server_id, &ppgtest_service_uuid, true);\r
// printf("ble_ppgtest_add_service wrapper_gatts_add_service ret: 0x%x server_id = 0x%x uuid.uuid_len:%d\n", ret, server_id,ppgtest_service_uuid.uuid_len);\r
#else\r
#ifdef BLE_INSTRUCT
#include "bleInstruct.h"
#endif
-#ifdef SUPPORT_AT_OHOSFWK
+#ifdef SUPPORT_OHOSFWK
#include "BluetoothWrapper.h"
#endif
#ifdef SUPPORT_AT_CYWEE\r
#include "cywee_ble_Service.h"\r
#endif\r
-#ifdef SUPPORT_AT_OHOSFWK\r
+#ifdef SUPPORT_OHOSFWK\r
#include "BluetoothWrapper.h"\r
#endif\r
#include "custom_save_runtime.h"\r
g_ble_gapble_cbs.start_adv_cb=svr_ble_adv_start_cb;\r
g_ble_gapble_cbs.stop_adv_cb=svr_ble_adv_stop_cb;\r
g_ble_gapble_cbs.conn_param_update_cb=srv_gap_ble_connect_param_update_callback;\r
-#ifndef SUPPORT_AT_OHOSFWK\r
+#ifndef SUPPORT_OHOSFWK\r
gap_ble_register_callbacks(&g_ble_gapble_cbs);\r
#else\r
wrapper_gap_ble_register_callbacks(&g_ble_gapble_cbs);\r
g_ble_gatts_cbs.write_request_cb = svr_ble_bt_gatts_req_write_cb;\r
g_ble_gatts_cbs.mtu_changed_cb = svr_ble_mtu_exchange;\r
\r
-#ifndef SUPPORT_AT_OHOSFWK\r
+#ifndef SUPPORT_OHOSFWK\r
gatts_register_callbacks(&g_ble_gatts_cbs);\r
#else\r
wrapper_gatts_register_callbacks(&g_ble_gatts_cbs);\r
uuid.uuid_len = (uint8_t)sizeof(ser_id);\r
memcpy_s(uuid.uuid, sizeof(uuid.uuid), (char *)&ser_id, sizeof(ser_id));\r
\r
-#ifndef SUPPORT_AT_OHOSFWK\r
+#ifndef SUPPORT_OHOSFWK\r
ret = gatts_register_server(&uuid, &serverId); /* 注册gatt server */\r
WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "gatts_register_server ret: 0x%x serverId = 0x%x uuid.uuid_len:%d", ret, serverId,uuid.uuid_len);\r
#else\r
bt_uuid_t ble_service_uuid = {0};\r
bts_data_to_uuid_len2(srevr_id, &ble_service_uuid);\r
\r
-#ifndef SUPPORT_AT_OHOSFWK\r
+#ifndef SUPPORT_OHOSFWK\r
ret = gatts_add_service(serverId, &ble_service_uuid, true);\r
WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "gatts_add_service ret: 0x%x", ret);\r
#else\r
#include "bts_gatt_server.h"\r
#include "securec.h"\r
#include "wearable_log.h"\r
-#ifdef SUPPORT_AT_OHOSFWK\r
+#ifdef SUPPORT_OHOSFWK\r
#include "BluetoothWrapper.h"\r
#endif\r
\r
bts_data_to_uuid_len2(BLE_UUID_ATE_FACTORYTEST_SERVICE, &factory_service_uuid);\r
//只有一个服务,永远是1\r
errcode_t ret = 0;\r
-#ifndef SUPPORT_AT_OHOSFWK\r
+#ifndef SUPPORT_OHOSFWK\r
ret = gatts_add_service(server_id, &factory_service_uuid, true);\r
// printf("ble_factorytest_add_service gatts_add_service ret: 0x%x serverId = 0x%x uuid.uuid_len:%d\n", ret, server_id,factory_service_uuid.uuid_len);\r
#else\r