void Channel::setVal(Signal &sign) { offsetX = sign.getOffsetX(); cycles = sign.getCycles(); period = sign.getPeriod(); mode = sign.getMode(); for (int i = 0; i < diskret; i++) val[i] = sign.getVal(i); }
void LCDScreen::run(ticks_t time) { switch (scheduleReason) { case SCHEDULE_SAMPLING_EDGE: assert(CLKSignal.isClock()); seeSamplingEdge(time); if (time - lastPollForEvents >= minUpdateTicks) { if (screen.pollForEvents()) { throw ExitException(time, 0); } lastPollForEvents = time; } scheduleSamplingEdge(time + CLKSignal.getPeriod()); break; case SCHEDULE_POLL_FOR_EVENTS: if (screen.pollForEvents()) { throw ExitException(time, 0); } schedulePollForEvents(time + minUpdateTicks); lastPollForEvents = time; break; } }