-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanager.h
69 lines (58 loc) · 1.36 KB
/
manager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#pragma once
#include "includes.h"
#include <string.h>
#define EMPTY_QUEUE 10
struct proc_union {
act_t action_id;
uint8_t data[MAX_DATA_SIZE];
size_t data_len;
};
/*
* @brief Setup dynamic queue
*
* @return Error status
*/
uint8_t setup_dyn_proc();
/*
* @brief Adds action to dynamic queue
* @usage Action will be added to dynamic FIFO
*
* @param action_id - in - action id
* @param data - in - data (parameters) to be passed for action
* @param data_len - in - data length
*
* @return Error status
*/
uint8_t add_dyn_proc(const proc_union *proc);
uint8_t remove_dyn_proc();
/*
* @brief Removes action to dynamic queue
* @usage Action will be removed from dynamic FIFO
*
* @param index - in - index in the queue (normally = 0)
*
* @return Error status
*/
uint8_t remove_dyn_proc(uint8_t index);
uint8_t next_dyn(proc_union *proc);
/*
* @brief Adds action to regular actions list
* @usage Action will be the add to regular list
*
* @param action_id - in - action id
* @param data - in - data (parameters) to be passed for action
* @param data_len - in - data length
*
* @return Error status
*/
uint8_t add_reg_proc(const proc_union *proc);
uint8_t next_reg(proc_union *proc);
/*
* @brief Pointer to next action
* @usage
*
* @param next_act - out - pointer to next action
*
* @return Error status
*/
uint8_t next_proc(proc_union *proc);