Skip to content

Commit fcc7808

Browse files
committed
EventQueue.h Doxygen doc fixed up. Moved overloaded callback arguments documentation to overloaded functions to fix warnings. B0..B4 were not documentated additionally, only bulk docs for a0..a4 and c0..c4 were moved around.
1 parent 1d450f8 commit fcc7808

File tree

1 file changed

+57
-24
lines changed

1 file changed

+57
-24
lines changed

events/EventQueue.h

Lines changed: 57 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ class EventQueue {
167167
* events out of irq contexts.
168168
*
169169
* @param f Function to execute in the context of the dispatch loop
170-
* @param a0..a4 Arguments to pass to the callback
171170
* @return A unique id that represents the posted event and can
172171
* be passed to cancel, or an id of 0 if there is not
173172
* enough memory to allocate the event.
@@ -185,39 +184,49 @@ class EventQueue {
185184
}
186185

187186
/** Calls an event on the queue
188-
* @see EventQueue::call
187+
* @see EventQueue::call
188+
* @param f Function to execute in the context of the dispatch loop
189+
* @param a0 Argument to pass to the callback
189190
*/
190191
template <typename F, typename A0>
191192
int call(F f, A0 a0) {
192193
return call(context10<F, A0>(f, a0));
193194
}
194195

195196
/** Calls an event on the queue
196-
* @see EventQueue::call
197+
* @see EventQueue::call
198+
* @param f Function to execute in the context of the dispatch loop
199+
* @param a0,a1 Arguments to pass to the callback
197200
*/
198201
template <typename F, typename A0, typename A1>
199202
int call(F f, A0 a0, A1 a1) {
200203
return call(context20<F, A0, A1>(f, a0, a1));
201204
}
202205

203206
/** Calls an event on the queue
204-
* @see EventQueue::call
207+
* @see EventQueue::call
208+
* @param f Function to execute in the context of the dispatch loop
209+
* @param a0,a1,a2 Arguments to pass to the callback
205210
*/
206211
template <typename F, typename A0, typename A1, typename A2>
207212
int call(F f, A0 a0, A1 a1, A2 a2) {
208213
return call(context30<F, A0, A1, A2>(f, a0, a1, a2));
209214
}
210215

211216
/** Calls an event on the queue
212-
* @see EventQueue::call
217+
* @see EventQueue::call
218+
* @param f Function to execute in the context of the dispatch loop
219+
* @param a0,a1,a2,a3 Arguments to pass to the callback
213220
*/
214221
template <typename F, typename A0, typename A1, typename A2, typename A3>
215222
int call(F f, A0 a0, A1 a1, A2 a2, A3 a3) {
216223
return call(context40<F, A0, A1, A2, A3>(f, a0, a1, a2, a3));
217224
}
218225

219226
/** Calls an event on the queue
220-
* @see EventQueue::call
227+
* @see EventQueue::call
228+
* @param f Function to execute in the context of the dispatch loop
229+
* @param a0,a1,a2,a3,a4 Arguments to pass to the callback
221230
*/
222231
template <typename F, typename A0, typename A1, typename A2, typename A3, typename A4>
223232
int call(F f, A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) {
@@ -425,7 +434,6 @@ class EventQueue {
425434
* events out of irq contexts.
426435
*
427436
* @param f Function to execute in the context of the dispatch loop
428-
* @param a0..a4 Arguments to pass to the callback
429437
* @param ms Time to delay in milliseconds
430438
* @return A unique id that represents the posted event and can
431439
* be passed to cancel, or an id of 0 if there is not
@@ -445,39 +453,54 @@ class EventQueue {
445453
}
446454

447455
/** Calls an event on the queue after a specified delay
448-
* @see EventQueue::call_in
456+
* @see EventQueue::call_in
457+
* @param ms Time to delay in milliseconds
458+
* @param f Function to execute in the context of the dispatch loop
459+
* @param a0 Argument to pass to the callback
449460
*/
450461
template <typename F, typename A0>
451462
int call_in(int ms, F f, A0 a0) {
452463
return call_in(ms, context10<F, A0>(f, a0));
453464
}
454465

455466
/** Calls an event on the queue after a specified delay
456-
* @see EventQueue::call_in
467+
* @see EventQueue::call_in
468+
* @param ms Time to delay in milliseconds
469+
* @param f Function to execute in the context of the dispatch loop
470+
* @param a0,a1 Arguments to pass to the callback
457471
*/
458472
template <typename F, typename A0, typename A1>
459473
int call_in(int ms, F f, A0 a0, A1 a1) {
460474
return call_in(ms, context20<F, A0, A1>(f, a0, a1));
461475
}
462476

463477
/** Calls an event on the queue after a specified delay
464-
* @see EventQueue::call_in
478+
* @see EventQueue::call_in
479+
* @param ms Time to delay in milliseconds
480+
* @param f Function to execute in the context of the dispatch loop
481+
* @param a0,a1,a2 Arguments to pass to the callback
465482
*/
466483
template <typename F, typename A0, typename A1, typename A2>
467484
int call_in(int ms, F f, A0 a0, A1 a1, A2 a2) {
468485
return call_in(ms, context30<F, A0, A1, A2>(f, a0, a1, a2));
469486
}
470487

471488
/** Calls an event on the queue after a specified delay
472-
* @see EventQueue::call_in
489+
* @see EventQueue::call_in
490+
* @param ms Time to delay in milliseconds
491+
* @param f Function to execute in the context of the dispatch loop
492+
* @param a0,a1,a2,a3 Arguments to pass to the callback
473493
*/
474494
template <typename F, typename A0, typename A1, typename A2, typename A3>
475495
int call_in(int ms, F f, A0 a0, A1 a1, A2 a2, A3 a3) {
476496
return call_in(ms, context40<F, A0, A1, A2, A3>(f, a0, a1, a2, a3));
477497
}
478498

479499
/** Calls an event on the queue after a specified delay
480-
* @see EventQueue::call_in
500+
* @see EventQueue::call_in
501+
* @param ms Time to delay in milliseconds
502+
* @param f Function to execute in the context of the dispatch loop
503+
* @param a0,a1,a2,a3,a4 Arguments to pass to the callback
481504
*/
482505
template <typename F, typename A0, typename A1, typename A2, typename A3, typename A4>
483506
int call_in(int ms, F f, A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) {
@@ -685,7 +708,6 @@ class EventQueue {
685708
* moving events out of irq contexts.
686709
*
687710
* @param f Function to execute in the context of the dispatch loop
688-
* @param a0..a4 Arguments to pass to the callback
689711
* @param ms Period of the event in milliseconds
690712
* @return A unique id that represents the posted event and can
691713
* be passed to cancel, or an id of 0 if there is not
@@ -706,39 +728,54 @@ class EventQueue {
706728
}
707729

708730
/** Calls an event on the queue periodically
709-
* @see EventQueue::call_every
731+
* @see EventQueue::call_every
732+
* @param f Function to execute in the context of the dispatch loop
733+
* @param a0 Argument to pass to the callback
734+
* @param ms Period of the event in milliseconds
710735
*/
711736
template <typename F, typename A0>
712737
int call_every(int ms, F f, A0 a0) {
713738
return call_every(ms, context10<F, A0>(f, a0));
714739
}
715740

716741
/** Calls an event on the queue periodically
717-
* @see EventQueue::call_every
742+
* @see EventQueue::call_every
743+
* @param f Function to execute in the context of the dispatch loop
744+
* @param a0,a1 Arguments to pass to the callback
745+
* @param ms Period of the event in milliseconds
718746
*/
719747
template <typename F, typename A0, typename A1>
720748
int call_every(int ms, F f, A0 a0, A1 a1) {
721749
return call_every(ms, context20<F, A0, A1>(f, a0, a1));
722750
}
723751

724752
/** Calls an event on the queue periodically
725-
* @see EventQueue::call_every
753+
* @see EventQueue::call_every
754+
* @param f Function to execute in the context of the dispatch loop
755+
* @param a0,a1,a2 Arguments to pass to the callback
756+
* @param ms Period of the event in milliseconds
726757
*/
727758
template <typename F, typename A0, typename A1, typename A2>
728759
int call_every(int ms, F f, A0 a0, A1 a1, A2 a2) {
729760
return call_every(ms, context30<F, A0, A1, A2>(f, a0, a1, a2));
730761
}
731762

732763
/** Calls an event on the queue periodically
733-
* @see EventQueue::call_every
764+
* @see EventQueue::call_every
765+
* @param f Function to execute in the context of the dispatch loop
766+
* @param a0,a1,a2,a3 Arguments to pass to the callback
767+
* @param ms Period of the event in milliseconds
734768
*/
735769
template <typename F, typename A0, typename A1, typename A2, typename A3>
736770
int call_every(int ms, F f, A0 a0, A1 a1, A2 a2, A3 a3) {
737771
return call_every(ms, context40<F, A0, A1, A2, A3>(f, a0, a1, a2, a3));
738772
}
739773

740774
/** Calls an event on the queue periodically
741-
* @see EventQueue::call_every
775+
* @see EventQueue::call_every
776+
* @param f Function to execute in the context of the dispatch loop
777+
* @param a0,a1,a2,a3,a4 Arguments to pass to the callback
778+
* @param ms Period of the event in milliseconds
742779
*/
743780
template <typename F, typename A0, typename A1, typename A2, typename A3, typename A4>
744781
int call_every(int ms, F f, A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) {
@@ -943,12 +980,8 @@ class EventQueue {
943980
* callback acts as the target for the event and is executed in the
944981
* context of the event queue's dispatch loop once posted.
945982
*
946-
* @param f Function to execute when the event is dispatched
947-
* @param c0..c4 Arguments to bind to the callback, these arguments are
948-
* allocated on an irq-safe allocator from the event queue's
949-
* memory pool. Must be type-compatible with b0..b4, the
950-
* arguments to the underlying callback.
951-
* @return Event that will dispatch on the specific queue
983+
* @param func Function to execute when the event is dispatched
984+
* @return Event that will dispatch on the specific queue
952985
*/
953986
template <typename R>
954987
Event<void()> event(R (*func)());

0 commit comments

Comments
 (0)