Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: fll mbed-rtos mbed
Diff: fll.cpp
- Revision:
- 9:0d6631edfc32
- Parent:
- 8:d16a0fcc2735
- Child:
- 11:21b3b0494baa
--- a/fll.cpp Sat Feb 14 16:51:25 2015 +0000
+++ b/fll.cpp Sat Feb 14 17:10:12 2015 +0000
@@ -9,46 +9,6 @@
// if you want to debug by `printf`, uncomment next line and put `pc.printf("...", ...);` into certain position.
// Serial pc(USBTX, USBRX);
-// --------------
-// RepeaterSource
-// --------------
-RepeaterSource::RepeaterSource(button_t *bs, int s)
-{
- button_seq = bs;
- size = s;
- i = 0;
-}
-
-button_t RepeaterSource::await()
-{
- if(size == 0) {
- return 0;
- } else if(size <= i) {
- i = 0;
- }
- return button_seq[i++];
-}
-
-// --------
-// FoldFlow
-// --------
-FoldFlow::FoldFlow(Producer **srcs, int srcs_size) {
- sources = srcs;
- sources_size = srcs_size;
-}
-
-button_t FoldFlow::await()
-{
- button_t *bs = (button_t*) malloc(sizeof(button_t) * sources_size);
- for (int i = 0; i < sources_size; i++) {
- bs[i] = sources[i]->await();
- }
- button_t b = fold(bs, sources_size);
- free(bs);
- return b;
-}
-
-
// ----
// Sink
// ----
