public void SetPageFlags(uint pageNumber, MemoryAccessFlag flags)
 {
     _connection.WriteCommand(ProgrammerCommand.SetPageFlags, pageNumber);
     _connection.Write(new[] { (byte)flags });
     _connection.ExpectCommand(ProgrammerCommand.SetPageFlags);
 }
        public void SetPageFlags(uint pageNumber, MemoryAccessFlag flag)
        {
            var packet = ((uint)flag) << 29;

            if (pageNumber > 0x1FFFFFFF)
            {
                throw new InvalidOperationException();
            }

            packet |= pageNumber;

            var aa = _spi.WriteRead(CpuCommand.SetPageFlags);
            var bb = _spi.WriteRead(packet);
            var cc = Nop();
        }