|
@@ -26,21 +26,33 @@
|
26
|
26
|
#include "pdb_conf.h"
|
27
|
27
|
|
28
|
28
|
|
|
29
|
+/*
|
|
30
|
+ * Structure for the protocol layer threads and variables
|
|
31
|
+ */
|
29
|
32
|
struct pdb_prl {
|
|
33
|
+ /* RX thread and working area */
|
30
|
34
|
THD_WORKING_AREA(_rx_wa, PDB_PRLRX_WA_SIZE);
|
31
|
35
|
thread_t *rx_thread;
|
|
36
|
+ /* TX thread and working area */
|
32
|
37
|
THD_WORKING_AREA(_tx_wa, PDB_PRLTX_WA_SIZE);
|
33
|
38
|
thread_t *tx_thread;
|
|
39
|
+ /* Hard reset thread and working area */
|
34
|
40
|
THD_WORKING_AREA(_hardrst_wa, PDB_HARDRST_WA_SIZE);
|
35
|
41
|
thread_t *hardrst_thread;
|
36
|
42
|
|
|
43
|
+ /* TX mailbox for PD messages to be transmitted */
|
37
|
44
|
mailbox_t tx_mailbox;
|
38
|
45
|
|
|
46
|
+ /* The ID of the last message received */
|
39
|
47
|
int8_t _rx_messageid;
|
|
48
|
+ /* The message being worked with by the RX thread */
|
40
|
49
|
union pd_msg *_rx_message;
|
41
|
50
|
|
|
51
|
+ /* The ID of the next message we will transmit */
|
42
|
52
|
int8_t _tx_messageidcounter;
|
|
53
|
+ /* The message being worked with by the TX thread */
|
43
|
54
|
union pd_msg *_tx_message;
|
|
55
|
+ /* Queue for the TX mailbox */
|
44
|
56
|
msg_t _tx_mailbox_queue[PDB_MSG_POOL_SIZE];
|
45
|
57
|
};
|
46
|
58
|
|