Revision 1581
editing wireless branch, added error codes and constants
wireless.h | ||
---|---|---|
52 | 52 |
* @{ |
53 | 53 |
**/ |
54 | 54 |
|
55 |
/**@defgroup wl_defines Public Constants |
|
56 |
* @{ **/ |
|
55 | 57 |
|
58 |
/**@brief global scope **/ |
|
59 |
#define GLOBAL UINT8_C(0) |
|
60 |
|
|
61 |
/**@brief local pan scope **/ |
|
62 |
#define PAN UINT8_C(1) |
|
63 |
|
|
64 |
/**@brief broadcast address **/ |
|
65 |
#define BROADCAST UINT16_C(0xFFFF) |
|
66 |
|
|
67 |
/**@brief reliable (TCP) mode **/ |
|
68 |
#define RELIABLE UINT8_C(0) |
|
69 |
|
|
70 |
/**@brief fast (UDP) mode **/ |
|
71 |
#define FAST UINT8_C(1) |
|
72 |
|
|
73 |
/**@brief standard priority **/ |
|
74 |
#define NORMAL_PRIORITY UINT8_C(0) |
|
75 |
|
|
76 |
/**@brief high priority, handle immediately **/ |
|
77 |
#define HIGH_PRIORITY UINT8_C(1) |
|
78 |
|
|
79 |
/**@} **/ // end defines group |
|
80 |
|
|
81 |
|
|
82 |
/**@defgroup wl_functions Public API Functions |
|
83 |
* @{ **/ |
|
84 |
|
|
56 | 85 |
// the init function |
57 | 86 |
|
58 | 87 |
/**@brief Initialize wireless. **/ |
... | ... | |
82 | 111 |
|
83 | 112 |
// the ack function |
84 | 113 |
|
85 |
/**@brief Returns the number of acknowledgment errors, and resets number to zero. **/
|
|
114 |
/**@brief Returns the number of acknowledgment errors. **/ |
|
86 | 115 |
int8_t wl_ack_error(void); |
87 | 116 |
|
117 |
/**@brief Checks a specific packet for the acknowledgement status. **/ |
|
118 |
int8_t wl_ack_check(uint8_t packet); |
|
88 | 119 |
|
120 |
/**@brief Resets acknowledgement statistics back to zero. **/ |
|
121 |
void wl_ack_reset(void); |
|
122 |
|
|
123 |
|
|
89 | 124 |
// the receive functions |
90 | 125 |
|
91 | 126 |
/**@brief The main receive function. Dispatches packets for registered handlers and returns next basic packet if available. **/ |
... | ... | |
103 | 138 |
/**@brief Function to register new packet handlers (for non-default groups only). **/ |
104 | 139 |
int8_t wl_register_handler(uint8_t group, void (*func)(void), uint8_t priority); |
105 | 140 |
|
141 |
/**@} **/ //end functions group |
|
106 | 142 |
|
107 |
/**@} **/ //end defgroup
|
|
143 |
/**@} **/ //end wireless group
|
|
108 | 144 |
|
109 | 145 |
#endif |
Also available in: Unified diff