#ifdef ENABLE_CYWEE
/**G sensor G_INT1 S_AGPIO_L11 G_INT2 S_AGPIO_L19*/
//{ S_AGPIO_L11, HAL_GPIO_DIRECTION_INPUT, HAL_GPIO_LEVEL_LOW, GPIO_INTERRUPT_RISING_EDGE, cywee_int_callback },
- { S_AGPIO_L19, HAL_GPIO_DIRECTION_INPUT, NULL, GPIO_INTERRUPT_DEDGE, cywee_int_callback },
- // { S_AGPIO_L19, HAL_GPIO_DIRECTION_INPUT, HAL_GPIO_LEVEL_LOW, 0, NULL },
+ // { S_AGPIO_L19, HAL_GPIO_DIRECTION_INPUT, NULL, GPIO_INTERRUPT_DEDGE, cywee_int_callback },
+ { S_AGPIO_L19, HAL_GPIO_DIRECTION_INPUT, NULL, GPIO_INTERRUPT_RISING_EDGE, cywee_int_callback },
#endif
/**S_AGPIO_R1 GPO alipay默认resetpin*/
{ S_AGPIO_R1, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_HIGH, 0, NULL },
#ifdef SUPPORT_CAT1_SERVICE
/**cat1 ring input key*/
- { S_AGPIO_L31, HAL_GPIO_DIRECTION_INPUT, NULL, GPIO_INTERRUPT_DEDGE, cat1_ring_isr_callback},
+ // { S_AGPIO_L31, HAL_GPIO_DIRECTION_INPUT, NULL, GPIO_INTERRUPT_DEDGE, cat1_ring_isr_callback},
+ { S_AGPIO_L31, HAL_GPIO_DIRECTION_INPUT, NULL, GPIO_INTERRUPT_RISING_EDGE, cat1_ring_isr_callback},
#endif
};
/**
static bool g_batter_service_initialled = false;
static bool g_bat_timer_is_running = false;
-static unsigned long g_cywee_queue;
static bool cywee_service_running_stat = false;
static void cywee_service_check_timer_callback(void *data);
g_cywee_service_timer = NULL;
g_bat_timer_is_running = false;
}
-
+static unsigned long g_cywee_queue = 0xFFFFFFFF;
+static uint8_t g_cywee_queue_created = 0;
void do_cywee_service_check_msg(int cmd, int data[2])
{
int ret;
+
+ // PRINT("do_cywee_service_check_msg g_cywee_queue %d g_cywee_queue_created %d MSG 0x%02X \r\n",g_cywee_queue,g_cywee_queue_created, cmd);
+ if( g_cywee_queue_created == 0) return ;
cywee_cmd_t mail = {0};
mail.cmd = cmd;
0, sizeof(cywee_cmd_t)) != ERRCODE_SUCC)
{
printf("[cywee][service] app create mail fail\n");
+ g_cywee_queue_created = 0;
+ }else{
+ g_cywee_queue_created = 1;
}
+
}
errcode_t uapi_cywee_service_init(void)
{
static bool g_bat_timer_is_running = false;
static unsigned long g_custom_cmd_queue;
-
+static bool g_custom_cmd_queue_created = 0;
static bool custom_cmd_service_running_stat = false;
void do_custom_cmd_service_check_msg(int cmd, void *params, int paramlen)
{
int ret;
+ if (g_custom_cmd_queue_created == 0 ) return ;
// 检查参数长度是否合法
if (paramlen > sizeof(custom_cmd_cmd_t) - sizeof(uint8_t))
{
0, sizeof(custom_cmd_cmd_t)) != ERRCODE_SUCC)
{
printf("[custom_cmd][service] app create mail fail\n");
+ g_custom_cmd_queue_created = 0;
+ }else{
+ g_custom_cmd_queue_created = 1;
}
}
errcode_t uapi_custom_cmd_service_init(void)