@@ -12,8 +12,8 @@ static struct Button* head_handle = NULL;
12
12
13
13
/**
14
14
* @brief Initializes the button struct handle.
15
- * @param handle: the button handle strcut .
16
- * @param pin_level: read the HAL GPIO of the connet button level.
15
+ * @param handle: the button handle struct .
16
+ * @param pin_level: read the HAL GPIO of the connected button level.
17
17
* @param active_level: pressed GPIO level.
18
18
* @param button_id: the button id.
19
19
* @retval None
@@ -30,7 +30,7 @@ void button_init(struct Button* handle, uint8_t(*pin_level)(uint8_t), uint8_t ac
30
30
31
31
/**
32
32
* @brief Attach the button event callback function.
33
- * @param handle: the button handle strcut .
33
+ * @param handle: the button handle struct .
34
34
* @param event: trigger event type.
35
35
* @param cb: callback function.
36
36
* @retval None
@@ -42,7 +42,7 @@ void button_attach(struct Button* handle, PressEvent event, BtnCallback cb)
42
42
43
43
/**
44
44
* @brief Inquire the button event happen.
45
- * @param handle: the button handle strcut .
45
+ * @param handle: the button handle struct .
46
46
* @retval button event.
47
47
*/
48
48
PressEvent get_button_event (struct Button * handle )
@@ -52,7 +52,7 @@ PressEvent get_button_event(struct Button* handle)
52
52
53
53
/**
54
54
* @brief Button driver core function, driver state machine.
55
- * @param handle: the button handle strcut .
55
+ * @param handle: the button handle struct .
56
56
* @retval None
57
57
*/
58
58
void button_handler (struct Button * handle )
@@ -69,7 +69,7 @@ void button_handler(struct Button* handle)
69
69
handle -> button_level = read_gpio_level ;
70
70
handle -> debounce_cnt = 0 ;
71
71
}
72
- } else { //leved not change ,counter reset.
72
+ } else { //level not change ,counter reset.
73
73
handle -> debounce_cnt = 0 ;
74
74
}
75
75
@@ -156,7 +156,7 @@ void button_handler(struct Button* handle)
156
156
157
157
/**
158
158
* @brief Start the button work, add the handle into work list.
159
- * @param handle: target handle strcut .
159
+ * @param handle: target handle struct .
160
160
* @retval 0: succeed. -1: already exist.
161
161
*/
162
162
int button_start (struct Button * handle )
@@ -173,7 +173,7 @@ int button_start(struct Button* handle)
173
173
174
174
/**
175
175
* @brief Stop the button work, remove the handle off work list.
176
- * @param handle: target handle strcut .
176
+ * @param handle: target handle struct .
177
177
* @retval None
178
178
*/
179
179
void button_stop (struct Button * handle )
0 commit comments