连上叫一下亮灯300ms
This commit is contained in:
parent
c138885fdc
commit
c102d12976
|
@ -661,6 +661,13 @@ static void peripheralStateNotificationCB(gapRole_States_t newState, gapRoleEven
|
|||
};
|
||||
GATT_ExchangeMTU(peripheralConnList.connHandle, &req, Peripheral_TaskID);
|
||||
// Peripheral_SetMacName();
|
||||
// BSP_BlockSleep();
|
||||
// BSP_RequestBoost();
|
||||
// DelayMs(1);
|
||||
// // ShowLed();
|
||||
// BEEP_ON;
|
||||
// DelayMs(500);
|
||||
tmos_set_event(led_task_id, CONNECT_BEEP_START_EVT);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -25,6 +25,9 @@ extern tmosTaskID led_task_id;
|
|||
#define LOW_VBAT_EVT (0x0001 << 4)
|
||||
#define HIGH_TEMP_EVT (0x0001 << 5)
|
||||
|
||||
#define CONNECT_BEEP_START_EVT (0x0001 << 6)
|
||||
#define CONNECT_BEEP_END_EVT (0x0001 << 7)
|
||||
|
||||
|
||||
/**********************BOOST 12V_EN PA1************************ */
|
||||
#define BOOST_EN \
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @Author : stark1898y 1658608470@qq.com
|
||||
* @Date : 2024-12-12 15:55:38
|
||||
* @LastEditors : stark1898y 1658608470@qq.com
|
||||
* @LastEditTime : 2025-02-24 16:39:07
|
||||
* @LastEditTime : 2025-04-14 00:18:32
|
||||
* @FilePath : \BLE_TYQ_CH584M\BSP\inc\bsp_valve.h
|
||||
* @Description :
|
||||
*
|
||||
|
@ -32,14 +32,11 @@ extern tmosTaskID vavle_task_id;
|
|||
|
||||
#define VAVLE_DECT_SWITCH_CALIB_EVT (0x0001 << 9) // 标定电磁铁
|
||||
|
||||
|
||||
|
||||
#define VALVE_LOW_VBAT_ALARM_PERIOD_MS (1600 * 60 * 10)
|
||||
|
||||
#define VALVE_DECT_PERIOD_MS (1600 * 60 * 10)
|
||||
|
||||
|
||||
|
||||
#define CHARGE_TIME_MS (1500)
|
||||
|
||||
// 2.2V
|
||||
|
|
|
@ -63,7 +63,7 @@ static tmosEvents LED_Task_ProcessEvent(tmosTaskID taskID, tmosEvents event)
|
|||
DelayMs(3);
|
||||
ShowLed();
|
||||
tmos_stop_task(led_task_id, LED_SHOW_ONCE_EVT);
|
||||
tmos_start_task(led_task_id, LED_SHOW_ONCE_EVT, 1000);
|
||||
tmos_start_task(led_task_id, LED_SHOW_ONCE_EVT, MS1_TO_SYSTEM_TIME(1000));
|
||||
return (event ^ LED_SHOW_START_EVT);
|
||||
}
|
||||
if (event & LED_SHOW_ONCE_EVT)
|
||||
|
@ -99,8 +99,34 @@ static tmosEvents LED_Task_ProcessEvent(tmosTaskID taskID, tmosEvents event)
|
|||
LED_Y_ON;
|
||||
return (event ^ LOW_VBAT_EVT);
|
||||
}
|
||||
if (event & CONNECT_BEEP_START_EVT)
|
||||
{
|
||||
logDebug("CONNECT_BEEP_START_EVT");
|
||||
LED_G_ON;
|
||||
BSP_BlockSleep();
|
||||
BSP_RequestBoost();
|
||||
BEEP_ON;
|
||||
|
||||
tmos_start_task(led_task_id, CONNECT_BEEP_END_EVT, MS1_TO_SYSTEM_TIME(300));
|
||||
|
||||
return (event ^ CONNECT_BEEP_START_EVT);
|
||||
}
|
||||
if(event & CONNECT_BEEP_END_EVT)
|
||||
{
|
||||
logDebug("CONNECT_BEEP_END_EVT");
|
||||
|
||||
LED_ALL_OFF_DEINIT;
|
||||
BEEP_OFF_DEINIT;
|
||||
|
||||
BSP_NoNeedBoost();
|
||||
BSP_RequestSleep();
|
||||
|
||||
// BEEP_OFF_DEINIT;
|
||||
// EMV_CHARGE_OFF_DEINIT;
|
||||
// EMV_OFF_DEINIT;
|
||||
|
||||
return (event ^ CONNECT_BEEP_END_EVT);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @Author : stark1898y 1658608470@qq.com
|
||||
* @Date : 2024-12-15 15:01:15
|
||||
* @LastEditors : stark1898y 1658608470@qq.com
|
||||
* @LastEditTime : 2025-02-24 17:58:40
|
||||
* @LastEditTime : 2025-04-14 00:16:50
|
||||
* @FilePath : \BLE_TYQ_CH584M\BSP\src\bsp_valve.c
|
||||
* @Description :
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue