- call PrintfFlush.flush();
- }
-
- event void PrintfControl.stopDone(error_t error) {
- counter = 0;
- call Leds.led2Toggle();
- printf("This should not be printed...");
- call PrintfFlush.flush();
- }
-
- event void PrintfFlush.flushDone(error_t error) {
- if(counter < NUM_TIMES_TO_PRINT) {
- printf("I am now iterating: %d\n", counter);
- call PrintfFlush.flush();
- }
- else if(counter == NUM_TIMES_TO_PRINT) {
- printf("This is a really short string...\n");
- printf("I am generating this string to have just less than 250\ncharacters since that is the limit of the size I put on my\nmaximum buffer when I instantiated the PrintfC component.\n");
- printf("Only part of this line should get printed because by writing\nthis sentence, I go over my character limit that the internal Printf buffer can hold.\n");
- call PrintfFlush.flush();
- }
- else call PrintfControl.stop();
- counter++;