@@ -188,6 +188,32 @@ class Event<void()> {
188
188
return _event->id ;
189
189
}
190
190
191
+ /* * Posts an event onto the underlying event queue, returning void
192
+ *
193
+ * @param a0..a4 Arguments to pass to the event
194
+ */
195
+ void call () {
196
+ int id = post ();
197
+ MBED_ASSERT (id);
198
+ }
199
+
200
+ /* * Posts an event onto the underlying event queue, returning void
201
+ *
202
+ * @param a0..a4 Arguments to pass to the event
203
+ */
204
+ void operator ()() {
205
+ return call ();
206
+ }
207
+
208
+ /* * Static thunk for passing as C-style function
209
+ *
210
+ * @param func Event to call passed as a void pointer
211
+ * @param a0..a4 Arguments to pass to the event
212
+ */
213
+ static void thunk (void *func) {
214
+ return static_cast <Event*>(func)->call ();
215
+ }
216
+
191
217
/* * Cancels the most recently posted event
192
218
*
193
219
* Attempts to cancel the most recently posted event. It is safe to call
@@ -381,6 +407,32 @@ class Event<void(A0)> {
381
407
return _event->id ;
382
408
}
383
409
410
+ /* * Posts an event onto the underlying event queue, returning void
411
+ *
412
+ * @param a0..a4 Arguments to pass to the event
413
+ */
414
+ void call (A0 a0) {
415
+ int id = post (a0);
416
+ MBED_ASSERT (id);
417
+ }
418
+
419
+ /* * Posts an event onto the underlying event queue, returning void
420
+ *
421
+ * @param a0..a4 Arguments to pass to the event
422
+ */
423
+ void operator ()(A0 a0) {
424
+ return call (a0);
425
+ }
426
+
427
+ /* * Static thunk for passing as C-style function
428
+ *
429
+ * @param func Event to call passed as a void pointer
430
+ * @param a0..a4 Arguments to pass to the event
431
+ */
432
+ static void thunk (void *func, A0 a0) {
433
+ return static_cast <Event*>(func)->call (a0);
434
+ }
435
+
384
436
/* * Cancels the most recently posted event
385
437
*
386
438
* Attempts to cancel the most recently posted event. It is safe to call
@@ -574,6 +626,32 @@ class Event<void(A0, A1)> {
574
626
return _event->id ;
575
627
}
576
628
629
+ /* * Posts an event onto the underlying event queue, returning void
630
+ *
631
+ * @param a0..a4 Arguments to pass to the event
632
+ */
633
+ void call (A0 a0, A1 a1) {
634
+ int id = post (a0, a1);
635
+ MBED_ASSERT (id);
636
+ }
637
+
638
+ /* * Posts an event onto the underlying event queue, returning void
639
+ *
640
+ * @param a0..a4 Arguments to pass to the event
641
+ */
642
+ void operator ()(A0 a0, A1 a1) {
643
+ return call (a0, a1);
644
+ }
645
+
646
+ /* * Static thunk for passing as C-style function
647
+ *
648
+ * @param func Event to call passed as a void pointer
649
+ * @param a0..a4 Arguments to pass to the event
650
+ */
651
+ static void thunk (void *func, A0 a0, A1 a1) {
652
+ return static_cast <Event*>(func)->call (a0, a1);
653
+ }
654
+
577
655
/* * Cancels the most recently posted event
578
656
*
579
657
* Attempts to cancel the most recently posted event. It is safe to call
@@ -767,6 +845,32 @@ class Event<void(A0, A1, A2)> {
767
845
return _event->id ;
768
846
}
769
847
848
+ /* * Posts an event onto the underlying event queue, returning void
849
+ *
850
+ * @param a0..a4 Arguments to pass to the event
851
+ */
852
+ void call (A0 a0, A1 a1, A2 a2) {
853
+ int id = post (a0, a1, a2);
854
+ MBED_ASSERT (id);
855
+ }
856
+
857
+ /* * Posts an event onto the underlying event queue, returning void
858
+ *
859
+ * @param a0..a4 Arguments to pass to the event
860
+ */
861
+ void operator ()(A0 a0, A1 a1, A2 a2) {
862
+ return call (a0, a1, a2);
863
+ }
864
+
865
+ /* * Static thunk for passing as C-style function
866
+ *
867
+ * @param func Event to call passed as a void pointer
868
+ * @param a0..a4 Arguments to pass to the event
869
+ */
870
+ static void thunk (void *func, A0 a0, A1 a1, A2 a2) {
871
+ return static_cast <Event*>(func)->call (a0, a1, a2);
872
+ }
873
+
770
874
/* * Cancels the most recently posted event
771
875
*
772
876
* Attempts to cancel the most recently posted event. It is safe to call
@@ -960,6 +1064,32 @@ class Event<void(A0, A1, A2, A3)> {
960
1064
return _event->id ;
961
1065
}
962
1066
1067
+ /* * Posts an event onto the underlying event queue, returning void
1068
+ *
1069
+ * @param a0..a4 Arguments to pass to the event
1070
+ */
1071
+ void call (A0 a0, A1 a1, A2 a2, A3 a3) {
1072
+ int id = post (a0, a1, a2, a3);
1073
+ MBED_ASSERT (id);
1074
+ }
1075
+
1076
+ /* * Posts an event onto the underlying event queue, returning void
1077
+ *
1078
+ * @param a0..a4 Arguments to pass to the event
1079
+ */
1080
+ void operator ()(A0 a0, A1 a1, A2 a2, A3 a3) {
1081
+ return call (a0, a1, a2, a3);
1082
+ }
1083
+
1084
+ /* * Static thunk for passing as C-style function
1085
+ *
1086
+ * @param func Event to call passed as a void pointer
1087
+ * @param a0..a4 Arguments to pass to the event
1088
+ */
1089
+ static void thunk (void *func, A0 a0, A1 a1, A2 a2, A3 a3) {
1090
+ return static_cast <Event*>(func)->call (a0, a1, a2, a3);
1091
+ }
1092
+
963
1093
/* * Cancels the most recently posted event
964
1094
*
965
1095
* Attempts to cancel the most recently posted event. It is safe to call
@@ -1153,6 +1283,32 @@ class Event<void(A0, A1, A2, A3, A4)> {
1153
1283
return _event->id ;
1154
1284
}
1155
1285
1286
+ /* * Posts an event onto the underlying event queue, returning void
1287
+ *
1288
+ * @param a0..a4 Arguments to pass to the event
1289
+ */
1290
+ void call (A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) {
1291
+ int id = post (a0, a1, a2, a3, a4);
1292
+ MBED_ASSERT (id);
1293
+ }
1294
+
1295
+ /* * Posts an event onto the underlying event queue, returning void
1296
+ *
1297
+ * @param a0..a4 Arguments to pass to the event
1298
+ */
1299
+ void operator ()(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) {
1300
+ return call (a0, a1, a2, a3, a4);
1301
+ }
1302
+
1303
+ /* * Static thunk for passing as C-style function
1304
+ *
1305
+ * @param func Event to call passed as a void pointer
1306
+ * @param a0..a4 Arguments to pass to the event
1307
+ */
1308
+ static void thunk (void *func, A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) {
1309
+ return static_cast <Event*>(func)->call (a0, a1, a2, a3, a4);
1310
+ }
1311
+
1156
1312
/* * Cancels the most recently posted event
1157
1313
*
1158
1314
* Attempts to cancel the most recently posted event. It is safe to call
0 commit comments