优化工作逻辑 霍尔开关检测
This commit is contained in:
parent
e5afe5ef93
commit
40fdd1395f
7
.vscode/settings.json
vendored
7
.vscode/settings.json
vendored
@ -7,6 +7,11 @@
|
|||||||
"tuya_ble_type.h": "c",
|
"tuya_ble_type.h": "c",
|
||||||
"initializer_list": "c",
|
"initializer_list": "c",
|
||||||
"type_traits": "c",
|
"type_traits": "c",
|
||||||
"event.h": "c"
|
"event.h": "c",
|
||||||
|
"includes.h": "c",
|
||||||
|
"board_ac6323a_demo_global_build_cfg.h": "c",
|
||||||
|
"p33.h": "c",
|
||||||
|
"le_gatt_common.h": "c",
|
||||||
|
"ble_trans_profile.h": "c"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -512,6 +512,8 @@ struct port_wakeup port0 = {
|
|||||||
.pullup_down_enable = ENABLE, //配置I/O 内部上下拉是否使能
|
.pullup_down_enable = ENABLE, //配置I/O 内部上下拉是否使能
|
||||||
.edge = FALLING_EDGE, //唤醒方式选择,可选:上升沿\下降沿
|
.edge = FALLING_EDGE, //唤醒方式选择,可选:上升沿\下降沿
|
||||||
.both_edge = 0,
|
.both_edge = 0,
|
||||||
|
.iomap = IO_PORTA_00, // 唤醒口选择
|
||||||
|
.filter = PORT_FLT_2ms, // 滤波时间
|
||||||
|
|
||||||
#if TCFG_ADKEY_ENABLE
|
#if TCFG_ADKEY_ENABLE
|
||||||
.iomap = TCFG_ADKEY_PORT, //唤醒口选择
|
.iomap = TCFG_ADKEY_PORT, //唤醒口选择
|
||||||
@ -649,6 +651,7 @@ static void aport_wakeup_callback(u8 index, u8 gpio, u8 edge)
|
|||||||
void board_power_init(void)
|
void board_power_init(void)
|
||||||
{
|
{
|
||||||
log_info("Power init : %s", __FILE__);
|
log_info("Power init : %s", __FILE__);
|
||||||
|
printf("11111111111111111111111111111111111111111111111111111111");
|
||||||
|
|
||||||
power_init(&power_param);
|
power_init(&power_param);
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ static void app_key_event_handler(struct sys_event *event)
|
|||||||
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
||||||
event_type = event->u.key.event;
|
event_type = event->u.key.event;
|
||||||
key_value = event->u.key.value;
|
key_value = event->u.key.value;
|
||||||
printf("app_key_evnet: %d,%d\n", event_type, key_value);
|
//printf("app_key_evnet: %d,%d\n", event_type, key_value);
|
||||||
input_key_handler(event_type, key_value);
|
input_key_handler(event_type, key_value);
|
||||||
|
|
||||||
if (event_type == KEY_EVENT_LONG && key_value == TCFG_ADKEY_VALUE6) {
|
if (event_type == KEY_EVENT_LONG && key_value == TCFG_ADKEY_VALUE6) {
|
||||||
|
@ -15,14 +15,12 @@
|
|||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "os/os_api.h"
|
#include "os/os_api.h"
|
||||||
#include "system/includes.h"
|
#include "system/includes.h"
|
||||||
|
#include "asm/power/p33.h"
|
||||||
#include "gatt_common/le_gatt_common.h"
|
#include "gatt_common/le_gatt_common.h"
|
||||||
#include "examples/trans_data/ble_trans_profile.h"
|
#include "examples/trans_data/ble_trans_profile.h"
|
||||||
//#include "ble_trans_profile.h"
|
//#include "ble_trans_profile.h"
|
||||||
static int led_state = 0;
|
static int led_state = 0;
|
||||||
static u16 timer_temperature_detect = 0;
|
static u16 timer_temperature_detect = 0;
|
||||||
static u16 timer_sleep = 0;
|
|
||||||
//static u16 timer_work = 0;
|
|
||||||
static int16_t ADJ_temp = 0;
|
static int16_t ADJ_temp = 0;
|
||||||
|
|
||||||
app_dev_info_t dev_info;
|
app_dev_info_t dev_info;
|
||||||
@ -30,6 +28,9 @@ app_dev_info_t dev_info;
|
|||||||
app_dev_config_t dev_config;
|
app_dev_config_t dev_config;
|
||||||
|
|
||||||
static int charge_state = 0;
|
static int charge_state = 0;
|
||||||
|
static u8 temperature_detect_count = 0;
|
||||||
|
static u16 temperature_cycle_timer = 0;
|
||||||
|
extern volatile u8 hall_wakeup_flag;
|
||||||
void temperature_blink_led()
|
void temperature_blink_led()
|
||||||
{
|
{
|
||||||
if (led_state)
|
if (led_state)
|
||||||
@ -118,20 +119,30 @@ void ble_receive_callback(u8* data,u16 len){
|
|||||||
sprintf(str_get_batt,"AT+VER=%s", BLE_TEMPERATURE_DEVICE_SOFT_VER);
|
sprintf(str_get_batt,"AT+VER=%s", BLE_TEMPERATURE_DEVICE_SOFT_VER);
|
||||||
ble_send_data(&str_get_batt,strlen(str_get_batt));
|
ble_send_data(&str_get_batt,strlen(str_get_batt));
|
||||||
}
|
}
|
||||||
|
//37°温度校准
|
||||||
else if(strstr(data,"AT+ADJ37=") != NULL){
|
else if(strstr(data,"AT+ADJ37=") != NULL){
|
||||||
u8 str_adj[64] = {0};
|
u8 str_adj[64] = {0};
|
||||||
memset(str_adj,0,sizeof(str_adj));
|
memset(str_adj,0,sizeof(str_adj));
|
||||||
sprintf(str_adj,"AT+ADJ37=OK");
|
sprintf(str_adj,"AT+ADJ37=OK");
|
||||||
ble_send_data(&str_adj,strlen(str_adj));
|
ble_send_data(&str_adj,strlen(str_adj));
|
||||||
|
|
||||||
u16 temp = dev_info.temperature_sensor;
|
u16 temp = dev_info.init_sensor;
|
||||||
ADJ_temp = dev_info.temperature_sensor - BLE_ADJUST_TEMP_37 ;
|
ADJ_temp = temp - BLE_ADJUST_TEMP_37 ;
|
||||||
if (ADJ_temp > 5000 || ADJ_temp < -5000) {
|
if (ADJ_temp > 3000 || ADJ_temp < -3000) {
|
||||||
ADJ_temp = 0;
|
ADJ_temp = 0;
|
||||||
}
|
}
|
||||||
syscfg_write(ADJ_TEMP_CONFIG, &ADJ_temp,sizeof(ADJ_temp));
|
syscfg_write(ADJ_TEMP_CONFIG, &ADJ_temp,sizeof(ADJ_temp));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else if(strstr(data,"AT+RESET=") != NULL){
|
||||||
|
u8 str_res[64] = {0};
|
||||||
|
memset(str_res,0,sizeof(str_res));
|
||||||
|
sprintf(str_res,"AT+RESET=OK");
|
||||||
|
ble_send_data(&str_res,strlen(str_res));
|
||||||
|
|
||||||
|
ADJ_temp = 0;
|
||||||
|
syscfg_write(ADJ_TEMP_CONFIG, &ADJ_temp,sizeof(ADJ_temp));
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
printf("unknow cmd\n");
|
printf("unknow cmd\n");
|
||||||
}
|
}
|
||||||
@ -142,11 +153,11 @@ void temperature_poweron_led_timeout(){
|
|||||||
}
|
}
|
||||||
static void blink_led_callback(void *priv) {
|
static void blink_led_callback(void *priv) {
|
||||||
temperature_work_led(1);
|
temperature_work_led(1);
|
||||||
sys_s_hi_timerout_add(NULL, temperature_poweron_led_timeout, 50); // 0.05 秒后关闭
|
sys_s_hi_timerout_add(NULL, temperature_poweron_led_timeout, 50); // 亮0.05 秒
|
||||||
}
|
}
|
||||||
void ble_led_timeout() {
|
void ble_led_timeout() {
|
||||||
temperature_work_led(0);
|
temperature_work_led(0);
|
||||||
blink_timer_id = usr_timer_add(NULL, blink_led_callback, 6000, 1);
|
blink_timer_id = sys_timer_add(NULL, blink_led_callback, 6000); //每隔6秒亮一次
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -159,7 +170,7 @@ void ble_on_connect_change(u8 is_connect){
|
|||||||
sys_s_hi_timerout_add(NULL,ble_led_timeout,3000);
|
sys_s_hi_timerout_add(NULL,ble_led_timeout,3000);
|
||||||
}else{
|
}else{
|
||||||
temperature_work_led(0);
|
temperature_work_led(0);
|
||||||
usr_timer_del(blink_timer_id);
|
sys_timer_del(blink_timer_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -323,7 +334,7 @@ static uint8_t reversal(uint8_t data)
|
|||||||
{
|
{
|
||||||
printf("check DQ pin == 0 should be high!!\r\n");
|
printf("check DQ pin == 0 should be high!!\r\n");
|
||||||
*pcal = (uint16_t)(ERR_NC * 128);
|
*pcal = (uint16_t)(ERR_NC * 128);
|
||||||
|
temperature_detect_count --;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
//printf("check DQ pin status pin_read(DQ_PIN) == 1 \r\n");
|
//printf("check DQ pin status pin_read(DQ_PIN) == 1 \r\n");
|
||||||
@ -412,6 +423,7 @@ u16 buffer[MAX_SIZE];
|
|||||||
gpio_set_direction(IO_PORTB_05,0);
|
gpio_set_direction(IO_PORTB_05,0);
|
||||||
gpio_direction_output(IO_PORTB_05, 1);
|
gpio_direction_output(IO_PORTB_05, 1);
|
||||||
|
|
||||||
|
|
||||||
err = nst1002_read_cal((uint16_t *)&cal);
|
err = nst1002_read_cal((uint16_t *)&cal);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
{
|
{
|
||||||
@ -445,6 +457,8 @@ u16 buffer[MAX_SIZE];
|
|||||||
}
|
}
|
||||||
//batt
|
//batt
|
||||||
// battery = get_cur_battery_level() *10;
|
// battery = get_cur_battery_level() *10;
|
||||||
|
dev_info.init_sensor = body; //原始温度
|
||||||
|
|
||||||
if (ADJ_temp != 0) {
|
if (ADJ_temp != 0) {
|
||||||
int16_t temp_body = (int16_t)body;
|
int16_t temp_body = (int16_t)body;
|
||||||
int16_t temp_obj = (int16_t)obj;
|
int16_t temp_obj = (int16_t)obj;
|
||||||
@ -484,24 +498,11 @@ u16 buffer[MAX_SIZE];
|
|||||||
ff_temp_data[7] = (batt_val >> 8) & 0xFF;
|
ff_temp_data[7] = (batt_val >> 8) & 0xFF;
|
||||||
ff_temp_data[8] = batt_val & 0xFF;
|
ff_temp_data[8] = batt_val & 0xFF;
|
||||||
|
|
||||||
//先查明当前连接的conn_handle
|
|
||||||
u16 connection_handle = ble_comm_dev_get_handle(0, GATT_ROLE_SERVER);
|
|
||||||
if(connection_handle != 0)//
|
|
||||||
{
|
|
||||||
printf("ble connected !! connection_handle: %04x\n", connection_handle);
|
|
||||||
return ;
|
|
||||||
}else{
|
|
||||||
//printf("connection_handle: %04x\n", connection_handle);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(body < BLE_TEMPERATURE_LIMIT_MIN || body > BLE_TEMPERATURE_LIMIT_MAX){ //异常温度不发送
|
if(body < BLE_TEMPERATURE_LIMIT_MIN || body > BLE_TEMPERATURE_LIMIT_MAX){ //异常温度不发送
|
||||||
printf("error temp_body\r\n");
|
printf("error temp_body\r\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
trans_client_adv_data_set_ff(ff_temp_data,sizeof(ff_temp_data));
|
|
||||||
gpio_direction_output(IO_PORTB_05, 0);
|
|
||||||
|
|
||||||
//计算当前温度是否稳定
|
//计算当前温度是否稳定
|
||||||
u16 temp_body = dev_info.temperature_sensor;
|
u16 temp_body = dev_info.temperature_sensor;
|
||||||
|
|
||||||
@ -561,10 +562,21 @@ u16 buffer[MAX_SIZE];
|
|||||||
u16 variance_value = sumOfSquares / MAX_SIZE; // 注意这里是n,而不是n-1(对于样本方差)
|
u16 variance_value = sumOfSquares / MAX_SIZE; // 注意这里是n,而不是n-1(对于样本方差)
|
||||||
printf("variance_value:%d \r\n", variance_value);
|
printf("variance_value:%d \r\n", variance_value);
|
||||||
|
|
||||||
//方差小于 20 表示温度稳定
|
//方差小于 30 表示温度稳定
|
||||||
dev_info.temperature_state = (variance_value <= 30) ? 1 : 0;
|
dev_info.temperature_state = (variance_value <= 30) ? 1 : 0;
|
||||||
printf("dev_info.temperature_state:%d\r\n", dev_info.temperature_state);
|
printf("dev_info.temperature_state:%d\r\n", dev_info.temperature_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//先查明当前连接的conn_handle
|
||||||
|
u16 connection_handle = ble_comm_dev_get_handle(0, GATT_ROLE_SERVER);
|
||||||
|
if(connection_handle != 0)//
|
||||||
|
{
|
||||||
|
printf("ble connected !! connection_handle: %04x\n", connection_handle);
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
trans_client_adv_data_set_ff(ff_temp_data,sizeof(ff_temp_data));
|
||||||
|
gpio_direction_output(IO_PORTB_05, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -620,53 +632,37 @@ void rtc_test_demo()
|
|||||||
//read_alarm(&tmp_time); //读修改后alarm时间
|
//read_alarm(&tmp_time); //读修改后alarm时间
|
||||||
//printf("rtc_read_alarm_after: %d-%d-%d %d:%d:%d", tmp_time.year, tmp_time.month, tmp_time.day, tmp_time.hour, tmp_time.min, tmp_time.sec); //打印修改后闹钟时间值
|
//printf("rtc_read_alarm_after: %d-%d-%d %d:%d:%d", tmp_time.year, tmp_time.month, tmp_time.day, tmp_time.hour, tmp_time.min, tmp_time.sec); //打印修改后闹钟时间值
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 low_battery_led_blinking = 0;
|
static u8 low_battery_led_blinking = 0;
|
||||||
static u16 low_battery_led_timer_id = 0;
|
static u16 low_battery_led_timer_id = 0;
|
||||||
|
static u16 check_symbol = 1; //每次开机只判断一次低电
|
||||||
void low_battery_led_flash(void *priv)
|
void low_battery_led_flash(void *priv)
|
||||||
{
|
{
|
||||||
if (charge_state) {
|
|
||||||
if (low_battery_led_timer_id) {
|
|
||||||
usr_timer_del(low_battery_led_timer_id);
|
|
||||||
low_battery_led_timer_id = 0;
|
|
||||||
}
|
|
||||||
temperature_work_led(0); // 关闭LED
|
|
||||||
low_battery_led_blinking = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
led_state = !led_state;
|
led_state = !led_state;
|
||||||
temperature_work_led(led_state); // 切换LED状态
|
temperature_work_led(led_state); // 切换LED状态
|
||||||
}
|
}
|
||||||
void stop_low_battery_blink(void)
|
void stop_low_battery_blink(void)
|
||||||
{
|
{
|
||||||
if (low_battery_led_timer_id) {
|
if (low_battery_led_timer_id) {
|
||||||
usr_timer_del(low_battery_led_timer_id);
|
sys_timer_del(low_battery_led_timer_id);
|
||||||
low_battery_led_timer_id = 0;
|
low_battery_led_timer_id = 0;
|
||||||
}
|
}
|
||||||
low_battery_led_blinking = 0;
|
low_battery_led_blinking = 0;
|
||||||
temperature_work_led(0); // 关闭LED
|
temperature_work_led(0); // 关闭LED
|
||||||
}
|
}
|
||||||
void temperature_detect(void)
|
|
||||||
|
void low_battery_check()
|
||||||
{
|
{
|
||||||
rtc_test_demo();
|
if(check_symbol) {
|
||||||
nst1002_read_temperatura();
|
u16 batt_val = get_vbat_level();
|
||||||
|
check_symbol = 0;
|
||||||
u16 batt_val = 0;
|
|
||||||
|
|
||||||
if (!batt_val) {
|
|
||||||
batt_val = get_vbat_level();
|
|
||||||
} else {
|
|
||||||
batt_val = (get_vbat_level() + batt_val) / 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("battery:%d\r\n", batt_val);
|
printf("battery:%d\r\n", batt_val);
|
||||||
|
// 低电处理:电压小于3.65V且未充电
|
||||||
// 低电处理:电压小于365
|
|
||||||
if (batt_val <= 365 && !charge_state) {
|
if (batt_val <= 365 && !charge_state) {
|
||||||
if (!low_battery_led_blinking) {
|
if (!low_battery_led_blinking) {
|
||||||
// 开始闪烁
|
// 开始闪烁
|
||||||
low_battery_led_blinking = 1;
|
low_battery_led_blinking = 1;
|
||||||
low_battery_led_timer_id = usr_timer_add(NULL, low_battery_led_flash, 500, 1);
|
low_battery_led_timer_id = sys_timer_add(NULL, low_battery_led_flash, 500);
|
||||||
}
|
}
|
||||||
} else { // 停止闪烁
|
} else { // 停止闪烁
|
||||||
if (low_battery_led_blinking) {
|
if (low_battery_led_blinking) {
|
||||||
@ -674,8 +670,113 @@ void temperature_detect(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
void temperature_detect(void)
|
||||||
|
{
|
||||||
|
nst1002_read_temperatura();
|
||||||
|
low_battery_check();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static u8 init_complete = 0;
|
||||||
|
void temperature_set_soft_poweroff(void)
|
||||||
|
{
|
||||||
|
printf("temperature_set_soft_poweroff\n");
|
||||||
|
temperature_deinit();
|
||||||
|
//VCM_DET_EN(0);//关闭VCM复位
|
||||||
|
//gpio_shortpress_reset_config(0);//1--enable 0--disable
|
||||||
|
|
||||||
|
//P33_CON_SET(P3_PINR_CON, 0, 1, 0);//关闭长按复位
|
||||||
|
//P33_CON_SET(P3_PINR_CON, 0, 1, 1);//打开长按复位
|
||||||
|
gpio_longpress_pin0_reset_config(IO_PORTA_09, 0, 0);
|
||||||
|
|
||||||
|
//必须先主动断开蓝牙链路,否则要等链路超时断开
|
||||||
|
#if TCFG_USER_BLE_ENABLE
|
||||||
|
btstack_ble_exit(0);
|
||||||
|
//延时300ms,确保BT退出链路断开
|
||||||
|
sys_timeout_add(NULL, power_set_soft_poweroff, 300);
|
||||||
|
#else
|
||||||
|
power_set_soft_poweroff();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
int hall_isr_check()
|
||||||
|
{
|
||||||
|
u8 current_state = gpio_read(IO_PORTA_00);
|
||||||
|
printf("hall_isr_callback:%d charge_state:%d \n", current_state, charge_state);
|
||||||
|
|
||||||
|
if (!current_state && !charge_state) {
|
||||||
|
u8 sleep_reason = 0x01;
|
||||||
|
syscfg_write(HELL_WAKEUP, &sleep_reason, 1);
|
||||||
|
temperature_set_soft_poweroff();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
void hell_wakeup_callback(){
|
||||||
|
u8 sleep_reason = 0xFF;
|
||||||
|
syscfg_read(HELL_WAKEUP, &sleep_reason, 1);
|
||||||
|
printf("sleep_reason:%02x \n", sleep_reason);
|
||||||
|
if (sleep_reason == 0x01) {
|
||||||
|
temperature_work_led(1);
|
||||||
|
sys_s_hi_timerout_add(NULL, temperature_poweron_led_timeout, 2000);
|
||||||
|
sleep_reason = 0xFF;
|
||||||
|
syscfg_write(HELL_WAKEUP, &sleep_reason, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void temperature_detect_timer_del(){
|
||||||
|
if (temperature_cycle_timer) {
|
||||||
|
sys_timer_del(temperature_cycle_timer);
|
||||||
|
temperature_cycle_timer = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 自动测温5次后关机,10秒后再自动开机
|
||||||
|
void temperature_cycle_step(void *priv)
|
||||||
|
{
|
||||||
|
static u8 ble_connection_state = 0;
|
||||||
|
// 充电时停止自动循环
|
||||||
|
if (charge_state) {
|
||||||
|
temperature_detect_timer_del();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 连接蓝牙时停止自动循环
|
||||||
|
u16 connection_handle = ble_comm_dev_get_handle(0, GATT_ROLE_SERVER);
|
||||||
|
if(connection_handle != 0){
|
||||||
|
temperature_detect();
|
||||||
|
if(!ble_connection_state){
|
||||||
|
temperature_detect_timer_del();
|
||||||
|
ble_connection_state = 1;
|
||||||
|
}
|
||||||
|
if(!temperature_cycle_timer){
|
||||||
|
temperature_cycle_timer = sys_timer_add(NULL, temperature_cycle_step, dev_config.detect_interval);
|
||||||
|
}
|
||||||
|
hall_isr_check();
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (temperature_detect_count < TIMES_OF_TEMPERATURE) {
|
||||||
|
temperature_detect();
|
||||||
|
temperature_detect_count++;
|
||||||
|
if(ble_connection_state){
|
||||||
|
temperature_detect_timer_del();
|
||||||
|
ble_connection_state = 0;
|
||||||
|
}
|
||||||
|
if(!temperature_cycle_timer){
|
||||||
|
temperature_cycle_timer = sys_timer_add(NULL, temperature_cycle_step, 100);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(hall_isr_check()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 关机,5秒后RTC自动唤醒
|
||||||
|
temperature_detect_timer_del();
|
||||||
|
rtc_alarm_set_timer(DEVICE_SLEEP_TIMEOUT);
|
||||||
|
temperature_set_soft_poweroff();
|
||||||
|
}
|
||||||
|
|
||||||
u16 charge_led_hander = 0;
|
u16 charge_led_hander = 0;
|
||||||
void temperature_charge_lowpower(u8 on){
|
void temperature_charge_lowpower(u8 on){
|
||||||
if(charge_led_hander){
|
if(charge_led_hander){
|
||||||
@ -697,68 +798,39 @@ void temperature_work_led(u8 on){
|
|||||||
gpio_direction_output(BLE_TEMPERATURE_WORK_LED, 0);
|
gpio_direction_output(BLE_TEMPERATURE_WORK_LED, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void device_hell(u8 on){
|
|
||||||
gpio_set_direction(DEVICE_HALL, 1);
|
//充电执行函数
|
||||||
if(on){
|
void temperature_chargeing(){
|
||||||
gpio_set_hd0(DEVICE_HALL, 1);
|
charge_state = 1;
|
||||||
gpio_direction_output(DEVICE_HALL, 1);
|
init_complete = 0;
|
||||||
}else{
|
|
||||||
gpio_direction_output(DEVICE_HALL, 0);
|
temperature_charge_lowpower(0);
|
||||||
|
|
||||||
|
//sys_timer_del(timer_temperature_detect);
|
||||||
|
|
||||||
|
//体温计指标灯闪烁3次后转灭
|
||||||
|
for(int i = 0; i< 3 ; i++){
|
||||||
|
temperature_work_led(1);
|
||||||
|
delay_ms_by_timer0(150);
|
||||||
|
temperature_work_led(0);
|
||||||
|
delay_ms_by_timer0(150);
|
||||||
}
|
}
|
||||||
|
//接入充电关闭蓝牙广播
|
||||||
|
ble_op_adv_enable(0);
|
||||||
|
ble_module_enable(0);
|
||||||
|
|
||||||
|
temperature_detect_timer_del();
|
||||||
|
temperature_detect_count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 init_complete = 0;
|
|
||||||
void temperature_set_soft_poweroff(void)
|
|
||||||
{
|
|
||||||
printf("temperature_set_soft_poweroff\n");
|
|
||||||
temperature_deinit();
|
|
||||||
syscfg_write(INIT_COMPLETE_FLAG_CONFIG, &init_complete,sizeof(init_complete));
|
|
||||||
//VCM_DET_EN(0);//关闭VCM复位
|
|
||||||
//gpio_shortpress_reset_config(0);//1--enable 0--disable
|
|
||||||
|
|
||||||
//P33_CON_SET(P3_PINR_CON, 0, 1, 0);//关闭长按复位
|
|
||||||
//P33_CON_SET(P3_PINR_CON, 0, 1, 1);//打开长按复位
|
|
||||||
gpio_longpress_pin0_reset_config(IO_PORTA_09, 0, 0);
|
|
||||||
|
|
||||||
//必须先主动断开蓝牙链路,否则要等链路超时断开
|
|
||||||
#if TCFG_USER_BLE_ENABLE
|
|
||||||
btstack_ble_exit(0);
|
|
||||||
//延时300ms,确保BT退出链路断开
|
|
||||||
sys_timeout_add(NULL, power_set_soft_poweroff, 300);
|
|
||||||
#else
|
|
||||||
power_set_soft_poweroff();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
void hall_isr_callback()
|
|
||||||
{
|
|
||||||
// 这里写HALL变化时的处理逻辑
|
|
||||||
printf("hall_isr_callback:%d\n", gpio_read(DEVICE_HALL));
|
|
||||||
// 例如:唤醒、计数、状态切换等
|
|
||||||
}
|
|
||||||
|
|
||||||
// 注册下降沿/上升沿中断
|
|
||||||
void hall_gpio_init(void)
|
|
||||||
{
|
|
||||||
gpio_set_direction(DEVICE_HALL, 1);
|
|
||||||
gpio_set_pull_up(DEVICE_HALL, 1);
|
|
||||||
gpio_set_die(DEVICE_HALL, 1);
|
|
||||||
|
|
||||||
// 配置为唤醒源,下降沿/上升沿触发
|
|
||||||
gpio_wakeup0(DEVICE_HALL); // 使能唤醒通道0,具体通道可查手册
|
|
||||||
}
|
|
||||||
void timer_sleep_callback(void);
|
|
||||||
void temperature_charge_state(int state){
|
void temperature_charge_state(int state){
|
||||||
static u8 charge_inited = 0;//防止充电因电压不稳,重复触发充电状态
|
static u8 charge_inited = 0;//防止充电因电压不稳,重复触发充电状态
|
||||||
printf("init_complete:%d",init_complete);
|
|
||||||
|
|
||||||
if ( init_complete == 0 ) { //读取初始化标志,防止休眠重置
|
printf("init_complete:%d",init_complete);
|
||||||
syscfg_read(INIT_COMPLETE_FLAG_CONFIG, &init_complete, sizeof(init_complete));
|
|
||||||
init_complete = (init_complete == 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!init_complete && state == BLE_TEMPERATURE_CHARGE_KEEP_CHARGING ) { //防止开机误判充电状态,并提前亮灯
|
if (!init_complete && state == BLE_TEMPERATURE_CHARGE_KEEP_CHARGING ) { //防止开机误判充电状态,并提前亮灯
|
||||||
init_complete = 1;
|
init_complete = 1;
|
||||||
sys_timer_del(timer_temperature_detect);
|
//sys_timer_del(timer_temperature_detect);
|
||||||
temperature_work_led(1);
|
temperature_work_led(1);
|
||||||
sys_s_hi_timerout_add(NULL,temperature_poweron_led_timeout,2000);
|
sys_s_hi_timerout_add(NULL,temperature_poweron_led_timeout,2000);
|
||||||
return;
|
return;
|
||||||
@ -767,71 +839,27 @@ void temperature_charge_state(int state){
|
|||||||
switch (state){
|
switch (state){
|
||||||
//接入充电
|
//接入充电
|
||||||
case BLE_TEMPERATURE_CHARGE_STATE_CHARGING :
|
case BLE_TEMPERATURE_CHARGE_STATE_CHARGING :
|
||||||
if (gpio_read(DEVICE_HALL) == 1 ) {
|
|
||||||
|
|
||||||
}
|
|
||||||
if (charge_inited) {
|
if (charge_inited) {
|
||||||
printf("vbal instablity!\n");
|
printf("vbal instablity!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printf("BLE_TEMPERATURE_CHARGE_STATE_CHARGING\n");
|
printf("BLE_TEMPERATURE_CHARGE_STATE_CHARGING\n");
|
||||||
charge_state = 1;
|
|
||||||
init_complete = 0;
|
|
||||||
charge_inited = 1;
|
charge_inited = 1;
|
||||||
|
temperature_chargeing();
|
||||||
syscfg_write(INIT_COMPLETE_FLAG_CONFIG, &init_complete,sizeof(init_complete));
|
|
||||||
temperature_charge_lowpower(0);
|
|
||||||
|
|
||||||
sys_timer_del(timer_temperature_detect);
|
|
||||||
//sys_timer_del(timer_sleep);
|
|
||||||
|
|
||||||
//体温计指标灯闪烁3次后转灭
|
|
||||||
for(int i = 0; i< 3 ; i++){
|
|
||||||
temperature_work_led(1);
|
|
||||||
delay_ms_by_timer0(150);
|
|
||||||
temperature_work_led(0);
|
|
||||||
delay_ms_by_timer0(150);
|
|
||||||
}
|
|
||||||
//接入充电关闭蓝牙广播
|
|
||||||
ble_op_adv_enable(0);
|
|
||||||
ble_module_enable(0);
|
|
||||||
//spple_power_event_to_user(POWER_EVENT_POWER_SOFTOFF);
|
|
||||||
//printf("!!!!!!!!!!!!!! CHARGING POWER OFF!!!!!!!!!!!!!!!!\n");
|
|
||||||
//printf("BLE_TEMPERATURE_CHARGE_STATE_CHARGING 2\n");
|
|
||||||
break;
|
break;
|
||||||
//拔出电压(0.6左右)< ldoin < vbat
|
//拔出电压(0.6左右)< ldoin < vbat
|
||||||
case BLE_TEMPERATURE_CHARGE_KEEP_CHARGING :
|
case BLE_TEMPERATURE_CHARGE_KEEP_CHARGING :
|
||||||
if (gpio_read(DEVICE_HALL) == 1 ) {
|
|
||||||
}
|
|
||||||
if (charge_inited) {
|
if (charge_inited) {
|
||||||
printf("vbal instablity!\n");
|
printf("vbal instablity!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printf("BLE_TEMPERATURE_CHARGE_KEEP_CHARGING\n");
|
printf("BLE_TEMPERATURE_CHARGE_KEEP_CHARGING\n");
|
||||||
charge_state = 1;
|
|
||||||
init_complete = 0;
|
|
||||||
charge_inited = 1;
|
charge_inited = 1;
|
||||||
|
temperature_chargeing();
|
||||||
syscfg_write(INIT_COMPLETE_FLAG_CONFIG, &init_complete,sizeof(init_complete));
|
|
||||||
temperature_charge_lowpower(0);
|
|
||||||
|
|
||||||
sys_timer_del(timer_temperature_detect);
|
|
||||||
//sys_timer_del(timer_sleep);
|
|
||||||
|
|
||||||
//体温计指标灯闪烁3次后转灭
|
|
||||||
for(int i = 0; i< 3 ; i++){
|
|
||||||
temperature_work_led(1);
|
|
||||||
delay_ms_by_timer0(150);
|
|
||||||
temperature_work_led(0);
|
|
||||||
delay_ms_by_timer0(150);
|
|
||||||
}
|
|
||||||
//接入充电关闭蓝牙广播
|
|
||||||
ble_op_adv_enable(0);
|
|
||||||
ble_module_enable(0);
|
|
||||||
break;
|
break;
|
||||||
//充电完成
|
//充电完成
|
||||||
case BLE_TEMPERATURE_CHARGE_STATE_FULL :
|
case BLE_TEMPERATURE_CHARGE_STATE_FULL :
|
||||||
//printf("BLE_TEMPERATURE_CHARGE_STATE_FULL\n");
|
printf("BLE_TEMPERATURE_CHARGE_STATE_FULL\n");
|
||||||
temperature_set_soft_poweroff();
|
temperature_set_soft_poweroff();
|
||||||
break;
|
break;
|
||||||
//拔出充电
|
//拔出充电
|
||||||
@ -840,20 +868,22 @@ void temperature_charge_state(int state){
|
|||||||
charge_inited = 0;
|
charge_inited = 0;
|
||||||
|
|
||||||
printf("BLE_TEMPERATURE_CHARGE_STATE_IDLE\n");
|
printf("BLE_TEMPERATURE_CHARGE_STATE_IDLE\n");
|
||||||
timer_temperature_detect = sys_timer_add(NULL, temperature_detect, dev_config.detect_interval);
|
//timer_temperature_detect = sys_timer_add(NULL, temperature_detect, dev_config.detect_interval);
|
||||||
//timer_sleep = sys_timer_add(NULL, timer_sleep_callback,DEVICE_WORK_TIMEOUT);
|
|
||||||
printf("dev_info.batt_percent:%d\n",dev_info.batt_percent);
|
|
||||||
//temperature_charge_led(0);
|
//temperature_charge_led(0);
|
||||||
|
|
||||||
if(init_complete == 0 ){ //如果开机未进入BLE_TEMPERATURE_CHARGE_KEEP_CHARGING则亮灯
|
if(init_complete == 0 ){ //如果开机未进入BLE_TEMPERATURE_CHARGE_KEEP_CHARGING则亮灯
|
||||||
temperature_work_led(1);
|
temperature_work_led(1);
|
||||||
sys_s_hi_timerout_add(NULL,temperature_poweron_led_timeout,2000);
|
sys_s_hi_timerout_add(NULL,temperature_poweron_led_timeout,2000);
|
||||||
}
|
|
||||||
init_complete = 1;
|
init_complete = 1;
|
||||||
|
}
|
||||||
|
|
||||||
//拔出充电打开蓝牙广播
|
//拔出充电打开蓝牙广播
|
||||||
ble_module_enable(1);
|
ble_module_enable(1);
|
||||||
ble_op_adv_enable(1);
|
ble_op_adv_enable(1);
|
||||||
|
|
||||||
|
if (!temperature_cycle_timer) {
|
||||||
|
temperature_cycle_timer = sys_timer_add(NULL, temperature_cycle_step, 100);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
//低电
|
//低电
|
||||||
case BLE_TEMPERATURE_CHARGE_STATE_LOWPOWER:
|
case BLE_TEMPERATURE_CHARGE_STATE_LOWPOWER:
|
||||||
@ -911,43 +941,8 @@ void alarm_isr_user_cbfun(u8 index)
|
|||||||
printf("**** 11 alarm %d : hello world ****\n", index);
|
printf("**** 11 alarm %d : hello world ****\n", index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 定时关机
|
|
||||||
*/
|
|
||||||
void timer_sleep_callback(void)
|
|
||||||
{
|
|
||||||
//关机开启闹钟
|
|
||||||
printf(">>>>>>>>>>>>>>>>> timer_sleep_callback ...\n");
|
|
||||||
//先查明当前连接的conn_handle 如果是蓝牙连接状态或充电状态 不休眠
|
|
||||||
u16 connection_handle = ble_comm_dev_get_handle(0, GATT_ROLE_SERVER);
|
|
||||||
if(connection_handle != 0 || charge_state == 1){
|
|
||||||
sys_timer_del(timer_sleep);
|
|
||||||
timer_sleep = sys_timer_add(NULL, timer_sleep_callback, DEVICE_WORK_TIMEOUT);
|
|
||||||
printf("ble connected or charging !! connection_handle: %04x\n", connection_handle);
|
|
||||||
return ;
|
|
||||||
}else{
|
|
||||||
//printf("connection_handle: %04x\n", connection_handle);
|
|
||||||
}
|
|
||||||
|
|
||||||
stop_low_battery_blink();
|
|
||||||
rtc_alarm_set_timer(DEVICE_SLEEP_TIMEOUT);
|
|
||||||
temperature_set_soft_poweroff();
|
|
||||||
// sys_timer_del(timer_sleep); // 清除旧定时器
|
|
||||||
// timer_work = sys_timer_add(NULL, timer_work_callback, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
// void timer_work_callback(void){
|
|
||||||
// printf(">>>>>>>>>>>>>>>>> timer_work_callback ...\n");
|
|
||||||
// // 重启测温
|
|
||||||
// timer_temperature_detect = sys_timer_add(NULL, temperature_detect, dev_config.detect_interval);
|
|
||||||
|
|
||||||
// // 启动下一轮10秒工作定时器
|
|
||||||
// sys_timer_del(timer_work);
|
|
||||||
// timer_sleep = sys_timer_add(NULL, timer_sleep_callback, 10000);
|
|
||||||
// }
|
|
||||||
void temperature_init(void)
|
void temperature_init(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
//extern void user_alarm_test(void);
|
//extern void user_alarm_test(void);
|
||||||
//extern void alarm_rtc_start(void);
|
//extern void alarm_rtc_start(void);
|
||||||
//alarm_rtc_start();
|
//alarm_rtc_start();
|
||||||
@ -959,32 +954,32 @@ void temperature_init(void)
|
|||||||
extern u16 get_vbat_trim();
|
extern u16 get_vbat_trim();
|
||||||
extern u16 get_vbg_trim();
|
extern u16 get_vbg_trim();
|
||||||
printf("vbat_trim:%d...vbg_trim:%d", get_vbat_trim(), get_vbg_trim());
|
printf("vbat_trim:%d...vbg_trim:%d", get_vbat_trim(), get_vbg_trim());
|
||||||
|
|
||||||
|
gpio_set_direction(IO_PORTA_00,1);
|
||||||
|
gpio_set_die(IO_PORTA_00,1);
|
||||||
|
gpio_set_pull_up(IO_PORTA_00, 1);
|
||||||
|
|
||||||
// 添加以上代码,看打印值,如果为15跟63,那就要用烧录器先烧录一遍。
|
// 添加以上代码,看打印值,如果为15跟63,那就要用烧录器先烧录一遍。
|
||||||
hall_gpio_init();
|
|
||||||
temperature_config_init();
|
temperature_config_init();
|
||||||
|
hell_wakeup_callback();
|
||||||
|
|
||||||
//从收纳仓取出时自动开机(指示灯亮2S后灭)
|
|
||||||
// temperature_work_led(1);
|
|
||||||
// sys_s_hi_timerout_add(NULL,temperature_poweron_led_timeout,2000);
|
|
||||||
|
|
||||||
//sys_s_hi_timer_add(NULL, temperature_blink_led, 200);
|
|
||||||
//sys_s_hi_timer_add(NULL, temperature_detect, 2000);
|
|
||||||
//sys_timer_add 方式添加定时任务 任务里边可以使用udelay delay_ms 等延时 sys_s_hi_timer_add 则延时无效
|
//sys_timer_add 方式添加定时任务 任务里边可以使用udelay delay_ms 等延时 sys_s_hi_timer_add 则延时无效
|
||||||
|
tuya_ble_queue_init(&temp_queue, buffer, MAX_SIZE, sizeof(u16));
|
||||||
|
tuya_ble_queue_flush(&temp_queue);
|
||||||
|
|
||||||
if (syscfg_read(ADJ_TEMP_CONFIG, &ADJ_temp, sizeof(ADJ_temp)) != sizeof(ADJ_temp)) {
|
if (syscfg_read(ADJ_TEMP_CONFIG, &ADJ_temp, sizeof(ADJ_temp)) != sizeof(ADJ_temp)) {
|
||||||
ADJ_temp = 0;
|
ADJ_temp = 0;
|
||||||
}
|
}
|
||||||
timer_temperature_detect = sys_timer_add(NULL, temperature_detect, dev_config.detect_interval);
|
printf("ADJ_temp:%d\r\n", ADJ_temp);
|
||||||
//工作15秒关机 关机5s后 RTC重新唤醒
|
|
||||||
//timer_sleep = sys_timer_add(NULL, timer_sleep_callback,DEVICE_WORK_TIMEOUT);
|
|
||||||
|
|
||||||
tuya_ble_queue_init(&temp_queue, buffer, MAX_SIZE, sizeof(u16));
|
dev_info.batt_percent = get_vbat_percent();
|
||||||
tuya_ble_queue_flush(&temp_queue);
|
|
||||||
|
//temperature_detect_timer_del();
|
||||||
|
temperature_cycle_timer = sys_timer_add(NULL, temperature_cycle_step, 100);
|
||||||
|
|
||||||
|
//timer_temperature_detect = sys_timer_add(NULL, temperature_detect, dev_config.detect_interval);
|
||||||
|
|
||||||
//charge_only = 0;
|
|
||||||
//HALL PIN 输入
|
//HALL PIN 输入
|
||||||
gpio_set_direction(IO_PORTA_00,1);
|
|
||||||
gpio_set_die(IO_PORTA_00,1);
|
|
||||||
|
|
||||||
gpio_set_direction(IO_PORTB_04,0);
|
gpio_set_direction(IO_PORTB_04,0);
|
||||||
gpio_direction_output(IO_PORTB_04, 1);
|
gpio_direction_output(IO_PORTB_04, 1);
|
||||||
@ -994,6 +989,8 @@ void temperature_init(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// NTC VDD
|
// NTC VDD
|
||||||
//gpio_set_direction(IO_PORTB_05,0);
|
//gpio_set_direction(IO_PORTB_05,0);
|
||||||
//gpio_direction_output(IO_PORTB_05, 1);
|
//gpio_direction_output(IO_PORTB_05, 1);
|
||||||
@ -1030,12 +1027,10 @@ void temperature_deinit(void)
|
|||||||
// gpio_set_direction(IO_PORTB_06,0);
|
// gpio_set_direction(IO_PORTB_06,0);
|
||||||
//gpio_direction_output(IO_PORTB_06, 0);
|
//gpio_direction_output(IO_PORTB_06, 0);
|
||||||
|
|
||||||
|
// gpio_set_direction(IO_PORTA_00,0);
|
||||||
|
// gpio_direction_output(IO_PORTA_00, 0);
|
||||||
|
|
||||||
gpio_set_direction(IO_PORTA_00,0);
|
gpio_set_pull_up(IO_PORTA_00,0);
|
||||||
gpio_direction_output(IO_PORTA_00, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
gpio_set_pull_up(IO_PORTB_04,0);
|
gpio_set_pull_up(IO_PORTB_04,0);
|
||||||
gpio_set_pull_up(IO_PORTB_06,0);
|
gpio_set_pull_up(IO_PORTB_06,0);
|
||||||
}
|
}
|
||||||
|
@ -9472,7 +9472,7 @@
|
|||||||
|
|
||||||
1748568313 c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\board\bd19\board_ac6321a_demo_global_build_cfg.h
|
1748568313 c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\board\bd19\board_ac6321a_demo_global_build_cfg.h
|
||||||
|
|
||||||
1748568313 c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\board\bd19\board_ac6323a_demo_cfg.h
|
1751448120 c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\board\bd19\board_ac6323a_demo_cfg.h
|
||||||
"board_ac6323a_demo_global_build_cfg.h"
|
"board_ac6323a_demo_global_build_cfg.h"
|
||||||
|
|
||||||
1748568313 c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\board\bd19\board_ac6323a_demo_global_build_cfg.h
|
1748568313 c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\board\bd19\board_ac6323a_demo_global_build_cfg.h
|
||||||
@ -9523,7 +9523,7 @@
|
|||||||
1748568316 c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\include_lib\system\generic\gpio.h
|
1748568316 c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\include_lib\system\generic\gpio.h
|
||||||
"asm/gpio.h"
|
"asm/gpio.h"
|
||||||
|
|
||||||
1748568316 c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\include_lib\driver\cpu\bd19\asm\gpio.h
|
1751355307 c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\include_lib\driver\cpu\bd19\asm\gpio.h
|
||||||
"typedef.h"
|
"typedef.h"
|
||||||
|
|
||||||
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\cpu\bd19\audio_codec_clock.c
|
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\cpu\bd19\audio_codec_clock.c
|
||||||
@ -12527,7 +12527,7 @@
|
|||||||
"system/debug.h"
|
"system/debug.h"
|
||||||
"smartbox_extra_flash_opt.h"
|
"smartbox_extra_flash_opt.h"
|
||||||
|
|
||||||
1750413834 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\app_main.c
|
1751356478 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\app_main.c
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
"app_config.h"
|
"app_config.h"
|
||||||
"app_action.h"
|
"app_action.h"
|
||||||
@ -12541,13 +12541,13 @@
|
|||||||
"jl_kws/jl_kws_api.h"
|
"jl_kws/jl_kws_api.h"
|
||||||
"debug.h"
|
"debug.h"
|
||||||
|
|
||||||
1750382587 c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\include\app_temperature.h
|
1751506996 c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\include\app_temperature.h
|
||||||
"typedef.h"
|
"typedef.h"
|
||||||
"system/event.h"
|
"system/event.h"
|
||||||
|
|
||||||
1748568312 c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\common\jl_kws\jl_kws_api.h
|
1748568312 c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\common\jl_kws\jl_kws_api.h
|
||||||
|
|
||||||
1750414076 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\app_temperature.c
|
1751507391 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\app_temperature.c
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
"app_config.h"
|
"app_config.h"
|
||||||
"app_action.h"
|
"app_action.h"
|
||||||
@ -12565,6 +12565,7 @@
|
|||||||
"timer.h"
|
"timer.h"
|
||||||
"os/os_api.h"
|
"os/os_api.h"
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
|
"asm/power/p33.h"
|
||||||
"gatt_common/le_gatt_common.h"
|
"gatt_common/le_gatt_common.h"
|
||||||
"examples/trans_data/ble_trans_profile.h"
|
"examples/trans_data/ble_trans_profile.h"
|
||||||
|
|
||||||
@ -12625,7 +12626,7 @@
|
|||||||
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\config\log_config.c
|
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\config\log_config.c
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
|
|
||||||
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\at_char_com\app_at_char_com.c
|
1751362053 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\at_char_com\app_at_char_com.c
|
||||||
"system/app_core.h"
|
"system/app_core.h"
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
"server/server_core.h"
|
"server/server_core.h"
|
||||||
@ -12742,7 +12743,7 @@
|
|||||||
<stdint.h>
|
<stdint.h>
|
||||||
"bt_common.h"
|
"bt_common.h"
|
||||||
|
|
||||||
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\at_com\app_at_com.c
|
1751362061 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\at_com\app_at_com.c
|
||||||
"system/app_core.h"
|
"system/app_core.h"
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
"server/server_core.h"
|
"server/server_core.h"
|
||||||
@ -12863,7 +12864,7 @@
|
|||||||
"spp_at_trans.h"
|
"spp_at_trans.h"
|
||||||
"at.h"
|
"at.h"
|
||||||
|
|
||||||
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\ble_beacon\app_beacon.c
|
1751362065 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\ble_beacon\app_beacon.c
|
||||||
"system/app_core.h"
|
"system/app_core.h"
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
"server/server_core.h"
|
"server/server_core.h"
|
||||||
@ -12933,7 +12934,7 @@
|
|||||||
"typedef.h"
|
"typedef.h"
|
||||||
"btstack/btstack_typedef.h"
|
"btstack/btstack_typedef.h"
|
||||||
|
|
||||||
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\ble_central\app_central.c
|
1751362068 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\ble_central\app_central.c
|
||||||
"system/app_core.h"
|
"system/app_core.h"
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
"server/server_core.h"
|
"server/server_core.h"
|
||||||
@ -13005,7 +13006,7 @@
|
|||||||
<stdint.h>
|
<stdint.h>
|
||||||
"app_config.h"
|
"app_config.h"
|
||||||
|
|
||||||
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\conn_24g\app_conn_24g.c
|
1751362071 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\conn_24g\app_conn_24g.c
|
||||||
"system/app_core.h"
|
"system/app_core.h"
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
"server/server_core.h"
|
"server/server_core.h"
|
||||||
@ -13074,7 +13075,7 @@
|
|||||||
"gatt_common/le_gatt_common.h"
|
"gatt_common/le_gatt_common.h"
|
||||||
"ble_24g_profile.h"
|
"ble_24g_profile.h"
|
||||||
|
|
||||||
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\dongle\app_dongle.c
|
1751362074 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\dongle\app_dongle.c
|
||||||
"system/app_core.h"
|
"system/app_core.h"
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
"server/server_core.h"
|
"server/server_core.h"
|
||||||
@ -13177,7 +13178,7 @@
|
|||||||
"usb_config.h"
|
"usb_config.h"
|
||||||
"debug.h"
|
"debug.h"
|
||||||
|
|
||||||
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\findmy\app_fmy.c
|
1751362078 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\findmy\app_fmy.c
|
||||||
"system/app_core.h"
|
"system/app_core.h"
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
"server/server_core.h"
|
"server/server_core.h"
|
||||||
@ -13312,7 +13313,7 @@
|
|||||||
"ble_fmy_sensor_uart.h"
|
"ble_fmy_sensor_uart.h"
|
||||||
"debug.h"
|
"debug.h"
|
||||||
|
|
||||||
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\ftms\app_ftms.c
|
1751362084 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\ftms\app_ftms.c
|
||||||
"system/app_core.h"
|
"system/app_core.h"
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
"server/server_core.h"
|
"server/server_core.h"
|
||||||
@ -13422,7 +13423,7 @@
|
|||||||
"app_action.h"
|
"app_action.h"
|
||||||
"debug.h"
|
"debug.h"
|
||||||
|
|
||||||
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\ll_sync\app_ll_sync.c
|
1751362105 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\ll_sync\app_ll_sync.c
|
||||||
"system/app_core.h"
|
"system/app_core.h"
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
"server/server_core.h"
|
"server/server_core.h"
|
||||||
@ -13470,7 +13471,7 @@
|
|||||||
<stdint.h>
|
<stdint.h>
|
||||||
"app_config.h"
|
"app_config.h"
|
||||||
|
|
||||||
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\multi_conn\app_multi_conn.c
|
1751362094 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\multi_conn\app_multi_conn.c
|
||||||
"system/app_core.h"
|
"system/app_core.h"
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
"server/server_core.h"
|
"server/server_core.h"
|
||||||
@ -13562,7 +13563,7 @@
|
|||||||
<stdint.h>
|
<stdint.h>
|
||||||
"app_config.h"
|
"app_config.h"
|
||||||
|
|
||||||
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\nonconn_24g\app_nonconn_24g.c
|
1751362110 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\nonconn_24g\app_nonconn_24g.c
|
||||||
"system/app_core.h"
|
"system/app_core.h"
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
"server/server_core.h"
|
"server/server_core.h"
|
||||||
@ -13598,7 +13599,7 @@
|
|||||||
"custom_cfg.h"
|
"custom_cfg.h"
|
||||||
"le_gatt_common.h"
|
"le_gatt_common.h"
|
||||||
|
|
||||||
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\trans_data\app_spp_and_le.c
|
1751362113 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\trans_data\app_spp_and_le.c
|
||||||
"system/app_core.h"
|
"system/app_core.h"
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
"server/server_core.h"
|
"server/server_core.h"
|
||||||
@ -13688,7 +13689,7 @@
|
|||||||
"le_client_demo.h"
|
"le_client_demo.h"
|
||||||
"gatt_common/le_gatt_common.h"
|
"gatt_common/le_gatt_common.h"
|
||||||
|
|
||||||
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\tuya\app_tuya.c
|
1751362131 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\examples\tuya\app_tuya.c
|
||||||
"system/app_core.h"
|
"system/app_core.h"
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
"server/server_core.h"
|
"server/server_core.h"
|
||||||
@ -13859,7 +13860,7 @@
|
|||||||
"app_config.h"
|
"app_config.h"
|
||||||
"chargebox.h"
|
"chargebox.h"
|
||||||
|
|
||||||
1750470096 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\modules\power\app_power_manage.c
|
1750473223 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\modules\power\app_power_manage.c
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
"app_power_manage.h"
|
"app_power_manage.h"
|
||||||
"app_main.h"
|
"app_main.h"
|
||||||
@ -13914,7 +13915,7 @@
|
|||||||
"asm/power/p33.h"
|
"asm/power/p33.h"
|
||||||
"debug.h"
|
"debug.h"
|
||||||
|
|
||||||
1748568313 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\board\bd19\board_ac6323a_demo.c
|
1751448128 source:c:\users\hjf\desktop\temperature_it12\fw-ac63_bt_sdk\apps\spp_and_le\board\bd19\board_ac6323a_demo.c
|
||||||
"app_config.h"
|
"app_config.h"
|
||||||
"system/includes.h"
|
"system/includes.h"
|
||||||
"device/key_driver.h"
|
"device/key_driver.h"
|
||||||
|
@ -2,59 +2,64 @@
|
|||||||
<CodeBlocks_layout_file>
|
<CodeBlocks_layout_file>
|
||||||
<FileVersion major="1" minor="0" />
|
<FileVersion major="1" minor="0" />
|
||||||
<ActiveTarget name="Release" />
|
<ActiveTarget name="Release" />
|
||||||
<File name="board_ac6323a_demo_cfg.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="12074" topLine="216" />
|
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="board_config.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="518" topLine="0" />
|
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="..\..\include\app_config.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<File name="..\..\include\app_config.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="10242" topLine="189" />
|
<Cursor1 position="10242" topLine="189" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
<File name="..\..\examples\trans_data\ble_trans.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<File name="..\..\..\..\cpu\bd19\adc_api.c" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="553" topLine="0" />
|
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="..\..\..\..\cpu\bd19\adc_api.c" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="11677" topLine="439" />
|
<Cursor1 position="11677" topLine="439" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
<File name="..\..\modules\power\app_charge.c" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<File name="..\..\examples\trans_data\ble_trans.c" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="1522" topLine="53" />
|
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="..\..\..\..\cpu\bd19\charge.c" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="8796" topLine="308" />
|
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="..\..\examples\trans_data\ble_trans.c" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="26810" topLine="719" />
|
<Cursor1 position="26810" topLine="719" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
<File name="..\..\app_temperature.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<File name="..\..\modules\power\app_charge.c" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="22937" topLine="673" />
|
<Cursor1 position="1522" topLine="53" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
<File name="..\..\..\common\third_party_profile\jieli\gatt_common\le_gatt_server.c" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<File name="..\..\..\common\third_party_profile\jieli\gatt_common\le_gatt_server.c" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="27428" topLine="677" />
|
<Cursor1 position="27428" topLine="677" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
<File name="..\..\app_main.c" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<File name="board_config.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="7497" topLine="279" />
|
<Cursor1 position="518" topLine="13" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="board_ac6323a_demo_cfg.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="12074" topLine="209" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="..\..\..\..\cpu\bd19\charge.c" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="8796" topLine="308" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="..\..\..\common\device\usb\device\user_setup.c" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="6496" topLine="231" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="..\..\app_temperature.c" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="25741" topLine="759" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="..\..\..\common\device\usb\host\aoa.c" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="593" topLine="9" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="..\..\examples\trans_data\ble_trans.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="553" topLine="0" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
<File name="..\..\modules\bt\app_comm_edr.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<File name="..\..\modules\bt\app_comm_edr.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
@ -62,4 +67,14 @@
|
|||||||
<Cursor1 position="1154" topLine="18" />
|
<Cursor1 position="1154" topLine="18" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
|
<File name="..\..\..\..\include_lib\system\timer.h" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="1916" topLine="61" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="..\..\app_main.c" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="3753" topLine="118" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
</CodeBlocks_layout_file>
|
</CodeBlocks_layout_file>
|
||||||
|
@ -418,7 +418,9 @@ static void close_gpio(void)
|
|||||||
/************************** PWR config ****************************/
|
/************************** PWR config ****************************/
|
||||||
struct port_wakeup port0 = {
|
struct port_wakeup port0 = {
|
||||||
.pullup_down_enable = ENABLE, //配置I/O 内部上下拉是否使能
|
.pullup_down_enable = ENABLE, //配置I/O 内部上下拉是否使能
|
||||||
.edge = FALLING_EDGE, //唤醒方式选择,可选:上升沿\下降沿
|
.edge = RISING_EDGE, //唤醒方式选择,可选:上升沿\下降沿
|
||||||
|
.iomap = IO_PORTA_00, // 唤醒口选择
|
||||||
|
.filter = PORT_FLT_2ms, // 滤波时间
|
||||||
.both_edge = 0,
|
.both_edge = 0,
|
||||||
|
|
||||||
#if TCFG_ADKEY_ENABLE
|
#if TCFG_ADKEY_ENABLE
|
||||||
@ -464,7 +466,7 @@ struct port_wakeup ldoin_port = {
|
|||||||
|
|
||||||
const struct wakeup_param wk_param = {
|
const struct wakeup_param wk_param = {
|
||||||
|
|
||||||
#if TCFG_ADKEY_ENABLE || TCFG_IOKEY_ENABLE
|
#if TCFG_IOKEY_ENABLE || TCFG_ADKEY_ENABLE
|
||||||
.port[1] = &port0,
|
.port[1] = &port0,
|
||||||
#endif
|
#endif
|
||||||
/* .sub = &sub_wkup, */
|
/* .sub = &sub_wkup, */
|
||||||
@ -524,7 +526,6 @@ static void wl_audio_clk_on(void)
|
|||||||
{
|
{
|
||||||
JL_WL_AUD->CON0 = 1;
|
JL_WL_AUD->CON0 = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void port_wakeup_callback(u8 index, u8 gpio)
|
static void port_wakeup_callback(u8 index, u8 gpio)
|
||||||
{
|
{
|
||||||
/* log_info("%s:%d,%d",__FUNCTION__,index,gpio); */
|
/* log_info("%s:%d,%d",__FUNCTION__,index,gpio); */
|
||||||
@ -557,7 +558,6 @@ static void aport_wakeup_callback(u8 index, u8 gpio, u8 edge)
|
|||||||
void board_power_init(void)
|
void board_power_init(void)
|
||||||
{
|
{
|
||||||
log_info("Power init : %s", __FILE__);
|
log_info("Power init : %s", __FILE__);
|
||||||
|
|
||||||
power_init(&power_param);
|
power_init(&power_param);
|
||||||
|
|
||||||
//< close short key reset
|
//< close short key reset
|
||||||
|
@ -92,11 +92,11 @@
|
|||||||
//*********************************************************************************//
|
//*********************************************************************************//
|
||||||
// iokey 配置 //
|
// iokey 配置 //
|
||||||
//*********************************************************************************//
|
//*********************************************************************************//
|
||||||
#define TCFG_IOKEY_ENABLE DISABLE_THIS_MOUDLE //是否使能IO按键
|
#define TCFG_IOKEY_ENABLE 1 //是否使能IO按键
|
||||||
|
|
||||||
#define TCFG_IOKEY_POWER_CONNECT_WAY ONE_PORT_TO_LOW //按键一端接低电平一端接IO
|
#define TCFG_IOKEY_POWER_CONNECT_WAY ONE_PORT_TO_LOW //按键一端接低电平一端接IO
|
||||||
|
|
||||||
#define TCFG_IOKEY_POWER_ONE_PORT IO_PORTA_01 //IO按键端口
|
#define TCFG_IOKEY_POWER_ONE_PORT IO_PORTA_00 //IO按键端口
|
||||||
|
|
||||||
#define TCFG_IOKEY_PREV_CONNECT_WAY ONE_PORT_TO_LOW //按键一端接低电平一端接IO
|
#define TCFG_IOKEY_PREV_CONNECT_WAY ONE_PORT_TO_LOW //按键一端接低电平一端接IO
|
||||||
#define TCFG_IOKEY_PREV_ONE_PORT IO_PORTB_04
|
#define TCFG_IOKEY_PREV_ONE_PORT IO_PORTB_04
|
||||||
@ -108,7 +108,7 @@
|
|||||||
// adkey 配置 //
|
// adkey 配置 //
|
||||||
//*********************************************************************************//
|
//*********************************************************************************//
|
||||||
#define TCFG_ADKEY_ENABLE DISABLE_THIS_MOUDLE //是否使能AD按键
|
#define TCFG_ADKEY_ENABLE DISABLE_THIS_MOUDLE //是否使能AD按键
|
||||||
#define TCFG_ADKEY_PORT IO_PORTA_01 //AD按键端口(需要注意选择的IO口是否支持AD功能)
|
#define TCFG_ADKEY_PORT IO_PORTA_00 //AD按键端口(需要注意选择的IO口是否支持AD功能)
|
||||||
/*AD通道选择,需要和AD按键的端口相对应:
|
/*AD通道选择,需要和AD按键的端口相对应:
|
||||||
AD_CH_PA1 AD_CH_PA3 AD_CH_PA4 AD_CH_PA5
|
AD_CH_PA1 AD_CH_PA3 AD_CH_PA4 AD_CH_PA5
|
||||||
AD_CH_PA9 AD_CH_PA1 AD_CH_PB1 AD_CH_PB4
|
AD_CH_PA9 AD_CH_PA1 AD_CH_PB1 AD_CH_PB4
|
||||||
|
@ -232,7 +232,7 @@ static void atchar_key_event_handler(struct sys_event *event)
|
|||||||
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
||||||
event_type = event->u.key.event;
|
event_type = event->u.key.event;
|
||||||
key_value = event->u.key.value;
|
key_value = event->u.key.value;
|
||||||
log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
//log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
||||||
|
|
||||||
|
|
||||||
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
||||||
|
@ -237,7 +237,7 @@ static void atcom_key_event_handler(struct sys_event *event)
|
|||||||
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
||||||
event_type = event->u.key.event;
|
event_type = event->u.key.event;
|
||||||
key_value = event->u.key.value;
|
key_value = event->u.key.value;
|
||||||
log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
//log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
||||||
|
|
||||||
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
||||||
&& (key_value == TCFG_ADKEY_VALUE3 || key_value == TCFG_ADKEY_VALUE0)) {
|
&& (key_value == TCFG_ADKEY_VALUE3 || key_value == TCFG_ADKEY_VALUE0)) {
|
||||||
|
@ -138,7 +138,7 @@ static void beacon_key_event_handler(struct sys_event *event)
|
|||||||
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
||||||
event_type = event->u.key.event;
|
event_type = event->u.key.event;
|
||||||
key_value = event->u.key.value;
|
key_value = event->u.key.value;
|
||||||
log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
//log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
||||||
|
|
||||||
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
||||||
&& (key_value == TCFG_ADKEY_VALUE3 || key_value == TCFG_ADKEY_VALUE0)) {
|
&& (key_value == TCFG_ADKEY_VALUE3 || key_value == TCFG_ADKEY_VALUE0)) {
|
||||||
|
@ -142,7 +142,7 @@ static void central_key_event_handler(struct sys_event *event)
|
|||||||
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
||||||
event_type = event->u.key.event;
|
event_type = event->u.key.event;
|
||||||
key_value = event->u.key.value;
|
key_value = event->u.key.value;
|
||||||
log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
//log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
||||||
|
|
||||||
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
||||||
&& (key_value == TCFG_ADKEY_VALUE3 || key_value == TCFG_ADKEY_VALUE0)) {
|
&& (key_value == TCFG_ADKEY_VALUE3 || key_value == TCFG_ADKEY_VALUE0)) {
|
||||||
|
@ -279,7 +279,7 @@ static void conn_24g_key_event_handler(struct sys_event *event)
|
|||||||
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
||||||
event_type = event->u.key.event;
|
event_type = event->u.key.event;
|
||||||
key_value = event->u.key.value;
|
key_value = event->u.key.value;
|
||||||
log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
//log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
||||||
|
|
||||||
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
||||||
&& (key_value == TCFG_ADKEY_VALUE3 || key_value == TCFG_ADKEY_VALUE0)) {
|
&& (key_value == TCFG_ADKEY_VALUE3 || key_value == TCFG_ADKEY_VALUE0)) {
|
||||||
|
@ -598,7 +598,7 @@ static void dongle_key_event_handler(struct sys_event *event)
|
|||||||
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
||||||
event_type = event->u.key.event;
|
event_type = event->u.key.event;
|
||||||
key_value = event->u.key.value;
|
key_value = event->u.key.value;
|
||||||
log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
//log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
||||||
|
|
||||||
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
||||||
&& (key_value == TCFG_ADKEY_VALUE3 || key_value == TCFG_ADKEY_VALUE0)) {
|
&& (key_value == TCFG_ADKEY_VALUE3 || key_value == TCFG_ADKEY_VALUE0)) {
|
||||||
|
@ -275,7 +275,7 @@ static void fmy_key_event_handler(struct sys_event *event)
|
|||||||
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
||||||
event_type = event->u.key.event;
|
event_type = event->u.key.event;
|
||||||
key_value = event->u.key.value;
|
key_value = event->u.key.value;
|
||||||
log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
//log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
||||||
/*Change Case To Idle Demo*/
|
/*Change Case To Idle Demo*/
|
||||||
#if CONFIG_APP_SPP_LE_TO_IDLE
|
#if CONFIG_APP_SPP_LE_TO_IDLE
|
||||||
if (event_type == KEY_EVENT_CLICK && key_value == TCFG_ADKEY_VALUE1) {
|
if (event_type == KEY_EVENT_CLICK && key_value == TCFG_ADKEY_VALUE1) {
|
||||||
|
@ -296,7 +296,7 @@ static void ftms_key_event_handler(struct sys_event *event)
|
|||||||
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
||||||
event_type = event->u.key.event;
|
event_type = event->u.key.event;
|
||||||
key_value = event->u.key.value;
|
key_value = event->u.key.value;
|
||||||
log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
//log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
||||||
/*Change Case To Idle Demo*/
|
/*Change Case To Idle Demo*/
|
||||||
#if CONFIG_APP_SPP_LE_TO_IDLE
|
#if CONFIG_APP_SPP_LE_TO_IDLE
|
||||||
if (event_type == KEY_EVENT_CLICK && key_value == TCFG_ADKEY_VALUE1) {
|
if (event_type == KEY_EVENT_CLICK && key_value == TCFG_ADKEY_VALUE1) {
|
||||||
|
@ -139,7 +139,7 @@ static void llsync_key_event_handler(struct sys_event *event)
|
|||||||
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
||||||
event_type = event->u.key.event;
|
event_type = event->u.key.event;
|
||||||
key_value = event->u.key.value;
|
key_value = event->u.key.value;
|
||||||
log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
//("app_key_evnet: %d,%d\n", event_type, key_value);
|
||||||
|
|
||||||
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
||||||
&& (key_value == TCFG_ADKEY_VALUE3 || key_value == TCFG_ADKEY_VALUE0)) {
|
&& (key_value == TCFG_ADKEY_VALUE3 || key_value == TCFG_ADKEY_VALUE0)) {
|
||||||
|
@ -161,7 +161,7 @@ static void multi_key_event_handler(struct sys_event *event)
|
|||||||
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
||||||
event_type = event->u.key.event;
|
event_type = event->u.key.event;
|
||||||
key_value = event->u.key.value;
|
key_value = event->u.key.value;
|
||||||
log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
//log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
||||||
|
|
||||||
|
|
||||||
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
||||||
|
@ -136,7 +136,7 @@ static void noconn_key_event_handler(struct sys_event *event)
|
|||||||
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
||||||
event_type = event->u.key.event;
|
event_type = event->u.key.event;
|
||||||
key_value = event->u.key.value;
|
key_value = event->u.key.value;
|
||||||
log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
//log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
||||||
|
|
||||||
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
||||||
&& (key_value == TCFG_ADKEY_VALUE3 || key_value == TCFG_ADKEY_VALUE0)) {
|
&& (key_value == TCFG_ADKEY_VALUE3 || key_value == TCFG_ADKEY_VALUE0)) {
|
||||||
|
@ -296,7 +296,7 @@ static void spple_key_event_handler(struct sys_event *event)
|
|||||||
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
||||||
event_type = event->u.key.event;
|
event_type = event->u.key.event;
|
||||||
key_value = event->u.key.value;
|
key_value = event->u.key.value;
|
||||||
log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
//log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
||||||
/*Change Case To Idle Demo*/
|
/*Change Case To Idle Demo*/
|
||||||
#if CONFIG_APP_SPP_LE_TO_IDLE
|
#if CONFIG_APP_SPP_LE_TO_IDLE
|
||||||
if (event_type == KEY_EVENT_CLICK && key_value == TCFG_ADKEY_VALUE1) {
|
if (event_type == KEY_EVENT_CLICK && key_value == TCFG_ADKEY_VALUE1) {
|
||||||
|
@ -139,7 +139,7 @@ static void tuya_key_event_handler(struct sys_event *event)
|
|||||||
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
if (event->arg == (void *)DEVICE_EVENT_FROM_KEY) {
|
||||||
event_type = event->u.key.event;
|
event_type = event->u.key.event;
|
||||||
key_value = event->u.key.value;
|
key_value = event->u.key.value;
|
||||||
log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
//log_info("app_key_evnet: %d,%d\n", event_type, key_value);
|
||||||
|
|
||||||
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
if (event_type == KEY_EVENT_TRIPLE_CLICK
|
||||||
&& (key_value == TCFG_ADKEY_VALUE3 || key_value == TCFG_ADKEY_VALUE0)) {
|
&& (key_value == TCFG_ADKEY_VALUE3 || key_value == TCFG_ADKEY_VALUE0)) {
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
#include "system/event.h"
|
#include "system/event.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1.0.2 2025.06.13
|
* 1.0.3 2025.06.26
|
||||||
*/
|
*/
|
||||||
#define BLE_TEMPERATURE_DEVICE_SOFT_VER "1.0.2"
|
#define BLE_TEMPERATURE_DEVICE_SOFT_VER "1.0.3"
|
||||||
|
|
||||||
#define BLE_TEMPERATURE_DETECT_INTERVAL 250
|
#define BLE_TEMPERATURE_DETECT_INTERVAL 250
|
||||||
#define BLE_TEMPERATURE_WORK_TIMEOUT 10*1000
|
#define BLE_TEMPERATURE_WORK_TIMEOUT 10*1000
|
||||||
@ -19,7 +19,6 @@
|
|||||||
#define BLE_TEMPERATURE_DEVICE_NTC 0
|
#define BLE_TEMPERATURE_DEVICE_NTC 0
|
||||||
|
|
||||||
#define BLE_TEMPERATURE_WORK_LED IO_PORTA_07
|
#define BLE_TEMPERATURE_WORK_LED IO_PORTA_07
|
||||||
#define DEVICE_HALL IO_PORTB_07
|
|
||||||
|
|
||||||
#define BLE_TEMPERATURE_CHARGE_STATE_CHARGING 1
|
#define BLE_TEMPERATURE_CHARGE_STATE_CHARGING 1
|
||||||
#define BLE_TEMPERATURE_CHARGE_STATE_FULL 2
|
#define BLE_TEMPERATURE_CHARGE_STATE_FULL 2
|
||||||
@ -31,18 +30,23 @@
|
|||||||
#define BLE_TEMPERATURE_VM_DEVICE_CONFIG 2
|
#define BLE_TEMPERATURE_VM_DEVICE_CONFIG 2
|
||||||
#define INIT_COMPLETE_FLAG_CONFIG 3
|
#define INIT_COMPLETE_FLAG_CONFIG 3
|
||||||
#define ADJ_TEMP_CONFIG 4
|
#define ADJ_TEMP_CONFIG 4
|
||||||
|
#define HELL_WAKEUP 5
|
||||||
|
|
||||||
#define DEVICE_SLEEP_TIMEOUT 5 //设备休眠时间
|
#define DEVICE_SLEEP_TIMEOUT 10 //设备休眠时间
|
||||||
#define DEVICE_WORK_TIMEOUT 15000 //设备工作时间
|
#define DEVICE_WORK_TIMEOUT 15000 //设备工作时间
|
||||||
|
|
||||||
|
|
||||||
#define BLE_TEMPERATURE_LIMIT_MIN 2000
|
#define BLE_TEMPERATURE_LIMIT_MIN 2000
|
||||||
#define BLE_TEMPERATURE_LIMIT_MAX 4500
|
#define BLE_TEMPERATURE_LIMIT_MAX 4500
|
||||||
|
|
||||||
#define BLE_ADJUST_TEMP_37 3700 //37.0C
|
#define BLE_ADJUST_TEMP_37 3700 //37.0C
|
||||||
#define MAX_SIZE 30
|
#define MAX_SIZE 30
|
||||||
|
#define TIMES_OF_TEMPERATURE 5 //每次开机测温次数
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
u16 temperature_sensor;
|
u16 temperature_sensor; //校准后温度
|
||||||
|
u16 init_sensor; //原始温度
|
||||||
u16 temperature_ntc;
|
u16 temperature_ntc;
|
||||||
u8 batt_percent;
|
u8 batt_percent;
|
||||||
u16 batt_val;
|
u16 batt_val;
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -635,6 +635,20 @@ obj/Release/apps/common/device/gSensor/fmy/SC7A20_E.o
|
|||||||
obj/Release/apps/common/device/gSensor/fmy/SC7A20_TR.o
|
obj/Release/apps/common/device/gSensor/fmy/SC7A20_TR.o
|
||||||
obj/Release/apps/common/device/key/adkey.o
|
obj/Release/apps/common/device/key/adkey.o
|
||||||
obj/Release/apps/common/device/key/iokey.o
|
obj/Release/apps/common/device/key/iokey.o
|
||||||
|
-r=obj/Release/apps/common/device/key/iokey.o,io_get_key_value,pl
|
||||||
|
-r=obj/Release/apps/common/device/key/iokey.o,iokey_filter_hook,pl
|
||||||
|
-r=obj/Release/apps/common/device/key/iokey.o,iokey_init,pl
|
||||||
|
-r=obj/Release/apps/common/device/key/iokey.o,gpio_read,l
|
||||||
|
-r=obj/Release/apps/common/device/key/iokey.o,gpio_set_pull_down,l
|
||||||
|
-r=obj/Release/apps/common/device/key/iokey.o,gpio_set_pull_up,l
|
||||||
|
-r=obj/Release/apps/common/device/key/iokey.o,gpio_direction_output,l
|
||||||
|
-r=obj/Release/apps/common/device/key/iokey.o,gpio_direction_input,l
|
||||||
|
-r=obj/Release/apps/common/device/key/iokey.o,gpio_set_die,l
|
||||||
|
-r=obj/Release/apps/common/device/key/iokey.o,printf,l
|
||||||
|
-r=obj/Release/apps/common/device/key/iokey.o,cpu_assert_debug,l
|
||||||
|
-r=obj/Release/apps/common/device/key/iokey.o,p33_soft_reset,l
|
||||||
|
-r=obj/Release/apps/common/device/key/iokey.o,iokey_scan_para,pl
|
||||||
|
-r=obj/Release/apps/common/device/key/iokey.o,config_asser,l
|
||||||
obj/Release/apps/common/device/key/irkey.o
|
obj/Release/apps/common/device/key/irkey.o
|
||||||
obj/Release/apps/common/device/key/key_driver.o
|
obj/Release/apps/common/device/key/key_driver.o
|
||||||
-r=obj/Release/apps/common/device/key/key_driver.o,key_event_remap,pl
|
-r=obj/Release/apps/common/device/key/key_driver.o,key_event_remap,pl
|
||||||
@ -643,6 +657,13 @@ obj/Release/apps/common/device/key/key_driver.o
|
|||||||
-r=obj/Release/apps/common/device/key/key_driver.o,clear_key_poweron_flag,pl
|
-r=obj/Release/apps/common/device/key/key_driver.o,clear_key_poweron_flag,pl
|
||||||
-r=obj/Release/apps/common/device/key/key_driver.o,key_active_set,pl
|
-r=obj/Release/apps/common/device/key/key_driver.o,key_active_set,pl
|
||||||
-r=obj/Release/apps/common/device/key/key_driver.o,key_driver_init,pl
|
-r=obj/Release/apps/common/device/key/key_driver.o,key_driver_init,pl
|
||||||
|
-r=obj/Release/apps/common/device/key/key_driver.o,iokey_init,l
|
||||||
|
-r=obj/Release/apps/common/device/key/key_driver.o,usr_timer_add,l
|
||||||
|
-r=obj/Release/apps/common/device/key/key_driver.o,timer_get_ms,l
|
||||||
|
-r=obj/Release/apps/common/device/key/key_driver.o,sys_event_notify,l
|
||||||
|
-r=obj/Release/apps/common/device/key/key_driver.o,iokey_data,l
|
||||||
|
-r=obj/Release/apps/common/device/key/key_driver.o,iokey_scan_para,l
|
||||||
|
-r=obj/Release/apps/common/device/key/key_driver.o,key_lp_target,pl
|
||||||
obj/Release/apps/common/device/key/touch_key.o
|
obj/Release/apps/common/device/key/touch_key.o
|
||||||
obj/Release/apps/common/device/norflash/norflash.o
|
obj/Release/apps/common/device/norflash/norflash.o
|
||||||
obj/Release/apps/common/device/usb/device/cdc.o
|
obj/Release/apps/common/device/usb/device/cdc.o
|
||||||
@ -2309,10 +2330,10 @@ obj/Release/apps/spp_and_le/app_temperature.o
|
|||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_poweron_led_timeout,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_poweron_led_timeout,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_work_led,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_work_led,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,ble_led_timeout,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,ble_led_timeout,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,usr_timer_add,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,sys_timer_add,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,ble_on_connect_change,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,ble_on_connect_change,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,usr_timeout_add,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,usr_timeout_add,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,usr_timer_del,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,sys_timer_del,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,delay_us_by_timer0,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,delay_us_by_timer0,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,clk_get,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,clk_get,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,delay_us_by_timer0_irq,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,delay_us_by_timer0_irq,pl
|
||||||
@ -2326,35 +2347,35 @@ obj/Release/apps/spp_and_le/app_temperature.o
|
|||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,nst1002_read_temperatura,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,nst1002_read_temperatura,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,get_vbat_percent,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,get_vbat_percent,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,get_vbat_level,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,get_vbat_level,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,trans_client_adv_data_set_ff,l
|
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,tuya_ble_queue_isFull,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,tuya_ble_queue_isFull,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,tuya_ble_queue_decrease,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,tuya_ble_queue_decrease,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,tuya_ble_enqueue,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,tuya_ble_enqueue,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,tuya_ble_get_queue_used,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,tuya_ble_get_queue_used,l
|
||||||
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,trans_client_adv_data_set_ff,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_update_adv_ff,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_update_adv_ff,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,rtc_test_demo,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,rtc_test_demo,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,read_sys_time,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,read_sys_time,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,low_battery_led_flash,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,low_battery_led_flash,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,stop_low_battery_blink,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,stop_low_battery_blink,pl
|
||||||
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,low_battery_check,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_detect,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_detect,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_charge_lowpower,pl
|
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,sys_timer_del,l
|
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,sys_timer_add,l
|
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,device_hell,pl
|
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_set_soft_poweroff,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_set_soft_poweroff,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_deinit,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_deinit,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,gpio_longpress_pin0_reset_config,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,gpio_longpress_pin0_reset_config,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,btstack_ble_exit,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,btstack_ble_exit,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,sys_timeout_add,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,sys_timeout_add,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,power_set_soft_poweroff,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,power_set_soft_poweroff,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,hall_isr_callback,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,hall_isr_check,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,hall_gpio_init,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,hell_wakeup_callback,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,gpio_set_pull_up,l
|
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,gpio_wakeup0,l
|
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_charge_state,pl
|
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,syscfg_read,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,syscfg_read,l
|
||||||
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_detect_timer_del,pl
|
||||||
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_cycle_step,pl
|
||||||
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,rtc_alarm_set_timer,l
|
||||||
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_charge_lowpower,pl
|
||||||
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_chargeing,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,ble_user_cmd_prepare,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,ble_user_cmd_prepare,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,ble_module_enable,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,ble_module_enable,l
|
||||||
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_charge_state,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_ble_init,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_ble_init,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,bt_get_vm_mac_addr,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,bt_get_vm_mac_addr,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,le_controller_set_mac,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,le_controller_set_mac,l
|
||||||
@ -2362,16 +2383,16 @@ obj/Release/apps/spp_and_le/app_temperature.o
|
|||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_config_init,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_config_init,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,alarm_isr_user_cbfun,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,alarm_isr_user_cbfun,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,timer_sleep_callback,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,timer_sleep_callback,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,rtc_alarm_set_timer,l
|
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_init,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,temperature_init,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,get_vbat_trim,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,get_vbat_trim,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,get_vbg_trim,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,get_vbg_trim,l
|
||||||
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,gpio_set_pull_up,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,tuya_ble_queue_init,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,tuya_ble_queue_init,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,tuya_ble_queue_flush,l
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,tuya_ble_queue_flush,l
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,dev_info,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,dev_info,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,err_code,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,err_code,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,charge_led_hander,pl
|
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,dev_config,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,dev_config,pl
|
||||||
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,charge_led_hander,pl
|
||||||
-r=obj/Release/apps/spp_and_le/app_temperature.o,buffer,pl
|
-r=obj/Release/apps/spp_and_le/app_temperature.o,buffer,pl
|
||||||
obj/Release/apps/spp_and_le/config/lib_btctrler_config.o
|
obj/Release/apps/spp_and_le/config/lib_btctrler_config.o
|
||||||
-r=obj/Release/apps/spp_and_le/config/lib_btctrler_config.o,config_btctler_modules,pl
|
-r=obj/Release/apps/spp_and_le/config/lib_btctrler_config.o,config_btctler_modules,pl
|
||||||
@ -3480,6 +3501,7 @@ obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o
|
|||||||
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,power_wakeup_init,l
|
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,power_wakeup_init,l
|
||||||
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,aport_edge_wkup_set_callback,l
|
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,aport_edge_wkup_set_callback,l
|
||||||
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,port_edge_wkup_set_callback,l
|
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,port_edge_wkup_set_callback,l
|
||||||
|
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,key_driver_init,l
|
||||||
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,charge_api_init,l
|
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,charge_api_init,l
|
||||||
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,alarm_init,l
|
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,alarm_init,l
|
||||||
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,mask_softflag_config,l
|
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,mask_softflag_config,l
|
||||||
@ -3498,6 +3520,8 @@ obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o
|
|||||||
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,ldoin_wakeup_isr,l
|
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,ldoin_wakeup_isr,l
|
||||||
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,power_param,pl
|
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,power_param,pl
|
||||||
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,charge_data,pl
|
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,charge_data,pl
|
||||||
|
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,iokey_list,pl
|
||||||
|
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,iokey_data,pl
|
||||||
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,def_sys_time,pl
|
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,def_sys_time,pl
|
||||||
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,def_alarm,pl
|
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,def_alarm,pl
|
||||||
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,rtc_data,pl
|
-r=obj/Release/apps/spp_and_le/board/bd19/board_ac6323a_demo.o,rtc_data,pl
|
||||||
@ -3681,6 +3705,32 @@ obj/Release/apps/spp_and_le/board/bd19/board_ac632n_demo.o
|
|||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.139242.gpio.c,gpio_longpress_pin0_reset_config,pl
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.139242.gpio.c,gpio_longpress_pin0_reset_config,pl
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.139242.gpio.c,gpio_longpress_pin1_reset_config,pl
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.139242.gpio.c,gpio_longpress_pin1_reset_config,pl
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.139242.gpio.c,gpio_shortpress_reset_config,pl
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.139242.gpio.c,gpio_shortpress_reset_config,pl
|
||||||
|
../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,delay_2ms,pl
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,timer_get_sec,pl
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,timer_get_ms,pl
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,timer_2ms_handler,pl
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,OSGetTime,pl
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,printf,l
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,cpu_assert_debug,l
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,timer1_init,pl
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,request_irq,l
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,log_print,l
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,clk_get,l
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,timer1_sleep_init,pl
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,low_power_sys_get,l
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,timer1_stop,pl
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,timer1_run,pl
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,p33_soft_reset,l
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,usr_timer_schedule,l
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,delay_cnt,pl
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,jiffies,l
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,jiffies_unit,l
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,config_asser,l
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,timer_power_ops,pl
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,log_tag_const_i_TMR,l
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,clock_timer,pl
|
||||||
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,tmr,pl
|
||||||
../../../../cpu/bd19/liba/cpu.a.llvm.202074.usb.c
|
../../../../cpu/bd19/liba/cpu.a.llvm.202074.usb.c
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.202074.usb.c,usb_get_jiffies,pl
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.202074.usb.c,usb_get_jiffies,pl
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.202074.usb.c,usb_dev_con0,pl
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.202074.usb.c,usb_dev_con0,pl
|
||||||
@ -4365,32 +4415,6 @@ obj/Release/apps/spp_and_le/board/bd19/board_ac632n_demo.o
|
|||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.965618.descriptor.c,cpu_assert_debug,l
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.965618.descriptor.c,cpu_assert_debug,l
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.965618.descriptor.c,p33_soft_reset,l
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.965618.descriptor.c,p33_soft_reset,l
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.965618.descriptor.c,config_asser,l
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.965618.descriptor.c,config_asser,l
|
||||||
../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,delay_2ms,pl
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,timer_get_sec,pl
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,timer_get_ms,pl
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,timer_2ms_handler,pl
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,OSGetTime,pl
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,printf,l
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,cpu_assert_debug,l
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,timer1_init,pl
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,request_irq,l
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,log_print,l
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,clk_get,l
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,timer1_sleep_init,pl
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,low_power_sys_get,l
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,timer1_stop,pl
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,timer1_run,pl
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,p33_soft_reset,l
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,usr_timer_schedule,l
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,delay_cnt,pl
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,jiffies,l
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,jiffies_unit,l
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,config_asser,l
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,timer_power_ops,pl
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,log_tag_const_i_TMR,l
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,clock_timer,pl
|
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.186934.timer.c,tmr,pl
|
|
||||||
../../../../cpu/bd19/liba/cpu.a.llvm.308454.encryption.c
|
../../../../cpu/bd19/liba/cpu.a.llvm.308454.encryption.c
|
||||||
-r=../../../../cpu/bd19/liba/cpu.a.llvm.308454.encryption.c,doe,pl
|
-r=../../../../cpu/bd19/liba/cpu.a.llvm.308454.encryption.c,doe,pl
|
||||||
../../../../cpu/bd19/liba/cpu.a.llvm.584122.lp_timer_hw.c
|
../../../../cpu/bd19/liba/cpu.a.llvm.584122.lp_timer_hw.c
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -19,3 +19,9 @@ iT12 腋温计通讯协议
|
|||||||
5.4 获取固件版本 :AT+VER=?
|
5.4 获取固件版本 :AT+VER=?
|
||||||
回复:AT+VER=1.0.1 (版本号 1.0.1)
|
回复:AT+VER=1.0.1 (版本号 1.0.1)
|
||||||
|
|
||||||
|
5.5 37°C温度校准 :AT+ADJ37=?
|
||||||
|
回复: AT+ADJ37=OK
|
||||||
|
|
||||||
|
5.6 温度校准重置 :AT+RESET=?
|
||||||
|
回复: AT+RESET=OK
|
||||||
|
|
181
fw-AC63_BT_SDK/launr.c
Normal file
181
fw-AC63_BT_SDK/launr.c
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
|
static unsigned int LunarCalendarDay;
|
||||||
|
static unsigned int LunarCalendarTable[199] =
|
||||||
|
{
|
||||||
|
0x04AE53,0x0A5748,0x5526BD,0x0D2650,0x0D9544,0x46AAB9,0x056A4D,0x09AD42,0x24AEB6,0x04AE4A,/*1901-1910*/
|
||||||
|
0x6A4DBE,0x0A4D52,0x0D2546,0x5D52BA,0x0B544E,0x0D6A43,0x296D37,0x095B4B,0x749BC1,0x049754,/*1911-1920*/
|
||||||
|
0x0A4B48,0x5B25BC,0x06A550,0x06D445,0x4ADAB8,0x02B64D,0x095742,0x2497B7,0x04974A,0x664B3E,/*1921-1930*/
|
||||||
|
0x0D4A51,0x0EA546,0x56D4BA,0x05AD4E,0x02B644,0x393738,0x092E4B,0x7C96BF,0x0C9553,0x0D4A48,/*1931-1940*/
|
||||||
|
0x6DA53B,0x0B554F,0x056A45,0x4AADB9,0x025D4D,0x092D42,0x2C95B6,0x0A954A,0x7B4ABD,0x06CA51,/*1941-1950*/
|
||||||
|
0x0B5546,0x555ABB,0x04DA4E,0x0A5B43,0x352BB8,0x052B4C,0x8A953F,0x0E9552,0x06AA48,0x6AD53C,/*1951-1960*/
|
||||||
|
0x0AB54F,0x04B645,0x4A5739,0x0A574D,0x052642,0x3E9335,0x0D9549,0x75AABE,0x056A51,0x096D46,/*1961-1970*/
|
||||||
|
0x54AEBB,0x04AD4F,0x0A4D43,0x4D26B7,0x0D254B,0x8D52BF,0x0B5452,0x0B6A47,0x696D3C,0x095B50,/*1971-1980*/
|
||||||
|
0x049B45,0x4A4BB9,0x0A4B4D,0xAB25C2,0x06A554,0x06D449,0x6ADA3D,0x0AB651,0x093746,0x5497BB,/*1981-1990*/
|
||||||
|
0x04974F,0x064B44,0x36A537,0x0EA54A,0x86B2BF,0x05AC53,0x0AB647,0x5936BC,0x092E50,0x0C9645,/*1991-2000*/
|
||||||
|
0x4D4AB8,0x0D4A4C,0x0DA541,0x25AAB6,0x056A49,0x7AADBD,0x025D52,0x092D47,0x5C95BA,0x0A954E,/*2001-2010*/
|
||||||
|
0x0B4A43,0x4B5537,0x0AD54A,0x955ABF,0x04BA53,0x0A5B48,0x652BBC,0x052B50,0x0A9345,0x474AB9,/*2011-2020*/
|
||||||
|
0x06AA4C,0x0AD541,0x24DAB6,0x04B64A,0x69573D,0x0A4E51,0x0D2646,0x5E933A,0x0D534D,0x05AA43,/*2021-2030*/
|
||||||
|
0x36B537,0x096D4B,0xB4AEBF,0x04AD53,0x0A4D48,0x6D25BC,0x0D254F,0x0D5244,0x5DAA38,0x0B5A4C,/*2031-2040*/
|
||||||
|
0x056D41,0x24ADB6,0x049B4A,0x7A4BBE,0x0A4B51,0x0AA546,0x5B52BA,0x06D24E,0x0ADA42,0x355B37,/*2041-2050*/
|
||||||
|
0x09374B,0x8497C1,0x049753,0x064B48,0x66A53C,0x0EA54F,0x06B244,0x4AB638,0x0AAE4C,0x092E42,/*2051-2060*/
|
||||||
|
0x3C9735,0x0C9649,0x7D4ABD,0x0D4A51,0x0DA545,0x55AABA,0x056A4E,0x0A6D43,0x452EB7,0x052D4B,/*2061-2070*/
|
||||||
|
0x8A95BF,0x0A9553,0x0B4A47,0x6B553B,0x0AD54F,0x055A45,0x4A5D38,0x0A5B4C,0x052B42,0x3A93B6,/*2071-2080*/
|
||||||
|
0x069349,0x7729BD,0x06AA51,0x0AD546,0x54DABA,0x04B64E,0x0A5743,0x452738,0x0D264A,0x8E933E,/*2081-2090*/
|
||||||
|
0x0D5252,0x0DAA47,0x66B53B,0x056D4F,0x04AE45,0x4A4EB9,0x0A4D4C,0x0D1541,0x2D92B5 /*2091-2099*/
|
||||||
|
};
|
||||||
|
static int MonthAdd[12] = { 0,31,59,90,120,151,181,212,243,273,304,334 };
|
||||||
|
|
||||||
|
static int LunarCalendar(int year, int month, int day)
|
||||||
|
{
|
||||||
|
int Spring_NY, Sun_NY, StaticDayCount;
|
||||||
|
int index, flag;
|
||||||
|
//Spring_NY 记录春节离当年元旦的天数。
|
||||||
|
//Sun_NY 记录阳历日离当年元旦的天数。
|
||||||
|
if (((LunarCalendarTable[year - 1901] & 0x0060) >> 5) == 1)
|
||||||
|
Spring_NY = (LunarCalendarTable[year - 1901] & 0x001F) - 1;
|
||||||
|
else
|
||||||
|
Spring_NY = (LunarCalendarTable[year - 1901] & 0x001F) - 1 + 31;
|
||||||
|
Sun_NY = MonthAdd[month - 1] + day - 1;
|
||||||
|
if ((!(year % 4)) && (month > 2))
|
||||||
|
Sun_NY++;
|
||||||
|
|
||||||
|
//特殊处理2025年4月28日-2025年5月26日
|
||||||
|
if (year == 2025 && ((month == 4 && day >= 28) || (month == 5 && day <= 26))) {
|
||||||
|
Sun_NY--;
|
||||||
|
}
|
||||||
|
// 特殊处理2025年4月27日
|
||||||
|
if (year == 2025 && month == 4 && day == 27) {
|
||||||
|
LunarCalendarDay = (3 << 6) | 30;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//StaticDayCount记录大小月的天数 29 或30
|
||||||
|
//index 记录从哪个月开始来计算。
|
||||||
|
//flag 是用来对闰月的特殊处理。
|
||||||
|
//判断阳历日在春节前还是春节后
|
||||||
|
if (Sun_NY >= Spring_NY)//阳历日在春节后(含春节那天)
|
||||||
|
{
|
||||||
|
Sun_NY -= Spring_NY;
|
||||||
|
month = 1;
|
||||||
|
index = 1;
|
||||||
|
flag = 0;
|
||||||
|
|
||||||
|
|
||||||
|
int leap_month = (LunarCalendarTable[year - 1901] & 0xF00000) >> 20;
|
||||||
|
while (1) {
|
||||||
|
if ((LunarCalendarTable[year - 1901] & (0x80000 >> (index - 1))))
|
||||||
|
StaticDayCount = 30;
|
||||||
|
else
|
||||||
|
StaticDayCount = 29;
|
||||||
|
|
||||||
|
if (Sun_NY < StaticDayCount)
|
||||||
|
break;
|
||||||
|
Sun_NY -= StaticDayCount;
|
||||||
|
if (month == leap_month && !flag) {
|
||||||
|
flag = 1; // 遇到闰月,处理闰月
|
||||||
|
int leapDays = ((LunarCalendarTable[year - 1901] & (0x80000 >> (index))) ? 30 : 29);
|
||||||
|
if (Sun_NY < leapDays) {
|
||||||
|
// 闰月内
|
||||||
|
month = leap_month;
|
||||||
|
flag = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Sun_NY -= leapDays;
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
index++;
|
||||||
|
month++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
day = Sun_NY + 1;
|
||||||
|
}
|
||||||
|
else //阳历日在春节前
|
||||||
|
{
|
||||||
|
Spring_NY -= Sun_NY;
|
||||||
|
year--;
|
||||||
|
month = 12;
|
||||||
|
if (((LunarCalendarTable[year - 1901] & 0xF00000) >> 20) == 0)
|
||||||
|
index = 12;
|
||||||
|
else
|
||||||
|
index = 13;
|
||||||
|
flag = 0;
|
||||||
|
if ((LunarCalendarTable[year - 1901] & (0x80000 >> (index - 1))) == 0)
|
||||||
|
StaticDayCount = 29;
|
||||||
|
else
|
||||||
|
StaticDayCount = 30;
|
||||||
|
while (Spring_NY > StaticDayCount)
|
||||||
|
{
|
||||||
|
Spring_NY -= StaticDayCount;
|
||||||
|
index--;
|
||||||
|
if (flag == 0)
|
||||||
|
month--;
|
||||||
|
if (month == ((LunarCalendarTable[year - 1901] & 0xF00000) >> 20))
|
||||||
|
flag = ~flag;
|
||||||
|
if ((LunarCalendarTable[year - 1901] & (0x80000 >> (index - 1))) == 0)
|
||||||
|
StaticDayCount = 29;
|
||||||
|
else
|
||||||
|
StaticDayCount = 30;
|
||||||
|
}
|
||||||
|
day = StaticDayCount - Spring_NY + 1;
|
||||||
|
}
|
||||||
|
LunarCalendarDay |= day;
|
||||||
|
LunarCalendarDay |= (month << 6);
|
||||||
|
if (month == ((LunarCalendarTable[year - 1901] & 0xF00000) >> 20))
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// char *to_luanr(int year,int month,int day)
|
||||||
|
void to_luanr(int year, int month, int day)
|
||||||
|
{
|
||||||
|
const char* ChDay[] = { "*","初一","初二","初三","初四","初五",
|
||||||
|
"初六","初七","初八","初九","初十",
|
||||||
|
"十一","十二","十三","十四","十五",
|
||||||
|
"十六","十七","十八","十九","二十",
|
||||||
|
"廿一","廿二","廿三","廿四","廿五",
|
||||||
|
"廿六","廿七","廿八","廿九","三十"
|
||||||
|
};
|
||||||
|
const char* ChMonth[] = { "*","正","二","三","四","五","六","七","八","九","十","十一","腊" };
|
||||||
|
// char *str;
|
||||||
|
// str = (char *)lv_mem_alloc(15);
|
||||||
|
char str[15];
|
||||||
|
memset(str, 0, 15);
|
||||||
|
LunarCalendarDay = 0;
|
||||||
|
if (LunarCalendar(year, month, day))
|
||||||
|
{
|
||||||
|
strcat(str, "闰");
|
||||||
|
strcat(str, ChMonth[(LunarCalendarDay & 0x3C0) >> 6]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
strcat(str, ChMonth[(LunarCalendarDay & 0x3C0) >> 6]);
|
||||||
|
|
||||||
|
strcat(str, "月");
|
||||||
|
strcat(str, ChDay[LunarCalendarDay & 0x3F]);
|
||||||
|
printf("str:%s\n", str);
|
||||||
|
// return str; //记得lv_mem_free(str);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char* argv[]) {
|
||||||
|
if (argc != 4) {
|
||||||
|
printf("Usage: %s <year> <month> <day>\n", argv[0]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int year = atoi(argv[1]);
|
||||||
|
int month = atoi(argv[2]);
|
||||||
|
int day = atoi(argv[3]);
|
||||||
|
|
||||||
|
if (year < 1901 || year > 2099 || month < 1 || month > 12 || day < 1 || day > 31) {
|
||||||
|
printf("Invalid date. Please provide a valid year (1901-2099), month (1-12), and day (1-31).\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
to_luanr(year, month, day);
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user