#endif \r
\r
#ifdef ENABLE_BN02\r
+ custom_i2c_init(I2C_BUS_0);\r
uapi_bp_service_init();\r
#endif\r
\r
{DIAL_CLOCK_5, "Custom_5", CUSTOM_CLOCK5_DIALPER_PATH, DEFAULT_TASK_PERIOD}, // 表盘 Id 4\r
};\r
//默认表盘\r
- #if U8_TEST_DIAL\r
+ #ifdef BOARD_U8\r
static const char* DEFAULT_CUSTOM_DIAL_PATH = "/user/dial/res_dial/classic.bin";\r
#else \r
static const char* DEFAULT_CUSTOM_DIAL_PATH = "/user/dial/res_dial/obsidianrhythm.bin";\r
#define SET_DIAL_MODEL_H
#include "AppViewIDs.h"
#include "SetDialInfo.h"
-#define U8_TEST_DIAL 1
+
namespace OHOS
{
// 表盘类型
* @Author: penglei 1624952103@qq.com
* @Date: 2025-05-12 10:00:46
* @LastEditors: penglei 1624952103@qq.com
- * @LastEditTime: 2025-05-12 17:52:36
+ * @LastEditTime: 2025-05-23 14:14:26
* @FilePath: /sdk615/code/sdk/zhihui/drivers/gyro/service/gyro_hal.h
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
#include "stdint.h"
#include "errcode.h"
+#include <stdbool.h>
typedef struct {
float x;
void gyro_check(void);
gyro_data_t gyro_get_data(void);
uint8_t gyro_get_chip_id(void);
+bool gyro_check_exist(void);
#ifdef __cplusplus
#if __cplusplus
}
g_gyro_sensor_exist = true;
+ gyro_power_off();
+
app_task_definition_t taskcfg={0};
taskcfg.create_queue_handle = create_gyro_queue;
taskcfg.attr.name="gyro_service";
if(custom_running_log_state_stat==0 || g_runtime_log_queue_created==0)
{
- PRINT("Error task or queue no ready\r\n");
+ // PRINT("Error task or queue no ready\r\n");
return ERRCODE_FAIL;
}
ret = osal_msg_queue_write_copy(g_custom_runtime_log_cmd_queue, (void *)&mail, sizeof(custom_cmd_t), 0);
errcode_t custom_i2c_init(uint8_t bus_index)
{
- if(i2c_installed == 1)
- return ERRCODE_SUCC;
+ // if(i2c_installed == 1)
+ // return ERRCODE_SUCC;
// #ifdef CONFIG_I2C_SUPPORT_DMA
// #if CONFIG_I2C_SUPPORT_DMA
return ERRCODE_FAIL;
}
- i2c_installed = 1;
+ // i2c_installed = 1;
return ERRCODE_SUCC;
// else