code: public synchronized void setRegisters(InputRegister[] regs) {
          if (regs == null) {
              registers = null;
              count = 0;
              return;
          }
  
          registers = Arrays.copyOf(regs, regs.length);
          if (regs.length > 31) {
              throw new IllegalArgumentException();
          }
  
          count = regs.length;
      }
docs: setRegisters -- set the device's status.
  
  @param regs Array of registers