void test0(void) { MeMine me; me.hi_ = "hi there"; me.bye_ = 12; me.Print("Out-1"); callMe(me); me.Print("Out-2"); }
void GizmoGardenIndicator::myTurn() { bool on; int p = phase; if (p == 2 * ggAbs(value) - 1) { on = false; phase = 0; value = nextValue; callMe(LongOffTime); } else { on = (p & 1) == 0; phase = p + 1; callMe(on ? OnTime : ShortOffTime); } digitalWrite(pin, on ^ (value < 0) ? HIGH : LOW); }
void GizmoGardenMenuTask::myTurn() { int buttons = lcd.readButtons(); if (oldButtons == 0 || (holdCounter >= 20 && monitorCounter == 0)) switch (buttons) { case BUTTON_LEFT: action(GizmoGardenMenuItem::Leave); menuRing.backup(); enter(); break; case BUTTON_RIGHT: action(GizmoGardenMenuItem::Leave); menuRing.forward(); enter(); break; case BUTTON_UP: changeAndShow(1); break; case BUTTON_DOWN: changeAndShow(-1); break; case BUTTON_SELECT: action(GizmoGardenMenuItem::Select); break; } if (buttons == oldButtons) ++holdCounter; else holdCounter = 0; oldButtons = buttons; // Do this before the monitor action so that the Task Monitor menu item // shows the menu task as running callMe(50); ++monitorCounter; if (monitorCounter == 5) { lcd.setCursor(2, 1); action(GizmoGardenMenuItem::Monitor); monitorCounter = 0; } }
void makeSomeCalls() { callMe("hello"); }