1 #ifndef __SIG_MODEL_TRANSITION_H__
2 #define __SIG_MODEL_TRANSITION_H__
3 
4 #define SIG_MODEL_TRANSITION_INTERVAL 20
5 
6 #define TRANSITION_TIME_UNIT_1 (100)            //Unit:ms
7 #define TRANSITION_TIME_UNIT_2 (1000)           //Unit:ms
8 #define TRANSITION_TIME_UNIT_3 (10 * 1000)      //Unit:ms
9 #define TRANSITION_TIME_UNIT_4 (10 * 60 * 1000) //Unit:ms
10 
11 #define TRANSITION_TIME_UNIT_BIT(unit_value) ((unit_value) << 6)
12 #define TRANSITION_TIME_VALUE_MIN (0)
13 #define TRANSITION_TIME_VALUE_MAX (0x3E)
14 #define TRANSITION_TIME_VALUE_INVALID (0x3F)
15 
16 #define TRANSITION_TIME_VALUE_MASK (0x3F)
17 
18 #define TRANSITION_DEFAULT_VALUE (0x41)
19 #define DELAY_DEFAULT_VAULE (100)
20 #define DELAY_TIME_UNIT (5)
21 
22 void sig_model_transition_timer_stop(sig_model_element_state_t *p_elem);
23 
24 bt_u32_t sig_model_transition_get_transition_time(uint8_t byte);
25 
26 uint8_t sig_model_transition_get_remain_time_byte(sig_model_state_t *p_state, bool is_ack);
27 
28 void sig_model_transition_state_reset(sig_model_element_state_t *p_elem);
29 
30 uint8_t sig_model_transition_update(sig_model_element_state_t *p_elem);
31 
32 #endif
33