Example #1
0
    void startSwitchingToReadMode(ReadWindow window) {
      readCacheStatus = READ_CACHE_STATUS.SWITCHINGTOREADMODE;
      i2cDevice.enableI2cReadMode(window.getIregFirst(), window.getCreg());
      enabledReadMode = true;

      // Remember what we actually told the controller
      readWindowSentToController = window;
      readWindowSentToControllerInitialized = true;

      setActionFlag = true; // causes an I2C read to happen
      queueFullWrite = true; // for just the mode bytes
      queueRead = true; // read the mode byte so we can tell when the switch is done

      dirtyModeCacheStatus();
    }