From 5e6d76b2478869fbc246f50846a8da8f1f455f45 Mon Sep 17 00:00:00 2001
From: zhyinch <zhyinch@gmail.com>
Date: 星期五, 11 十二月 2020 16:44:05 +0800
Subject: [PATCH] V2.14支持手动修改时间片 报警距离1

---
 Inc/main.h |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Inc/main.h b/Inc/main.h
index 03ffb26..a48fd5c 100644
--- a/Inc/main.h
+++ b/Inc/main.h
@@ -50,14 +50,16 @@
 typedef uint32_t  u32;
 typedef uint16_t u16;
 typedef uint8_t  u8;
-extern uint16_t slottime,max_slotpos;
+extern uint16_t slottime,max_slotpos,current_slotnum;
+void SetNextPollTime(u16 time);
 /* USER CODE END ET */
 
 /* Exported constants --------------------------------------------------------*/
 /* USER CODE BEGIN EC */
 #define LPTIMER_LSB 30.518 //1 puls=30.518us
-#define LPTIMER_1S_COUNT 33095
-#define USART_KEEPWAKE_TIME 60
+#define LPTIMER_1S_COUNT 32767
+#define USART_KEEPWAKE_TIME 10
+#define KEY_KEEPRESET_TIME 5
 /* USER CODE END EC */
 
 /* Exported macro ------------------------------------------------------------*/
@@ -104,9 +106,12 @@
 #define LED2_R_GPIO_Port GPIOB
 #define PWR_ON_Pin GPIO_PIN_7
 #define PWR_ON_GPIO_Port GPIOB
+#define PWR_CTL_Pin GPIO_PIN_9
+#define PWR_CTL_GPIO_Port GPIOB
 /* USER CODE BEGIN Private defines */
 #define GET_IMUINT 		HAL_GPIO_ReadPin(GPIOA,GPIO_PIN_0)
 #define GET_USERKEY 	HAL_GPIO_ReadPin(USER_KEY_GPIO_Port,USER_KEY_Pin)
+#define STATIONARY_TIME 120
 /* USER CODE END Private defines */
 
 #ifdef __cplusplus

--
Gitblit v1.9.3