Esempio n. 1
0
 public void ClearAll()
 {
     FlashHexBoard.Clear();
     EepromHexBoard.Clear();
     FusesHexBoard.Clear();
     LocksHexBoard.Clear();
 }
Esempio n. 2
0
        public bool WriteFuses(DeviceOperation op)
        {
            var device = Config.Device;

            var fusesBlocks = FusesHexBoard.SplitBlocks(device.FuseBits.PageSize);

            op.FusesSize += fusesBlocks.TotalBytes;

            using (var programmer = CreateProgrammer(op)) {
                using (programmer.Start()) {
                    foreach (var block in fusesBlocks.Blocks)
                    {
                        programmer.WritePage(block.Address, device.FuseBits.Location ?? AvrMemoryType.FuseBits, block.Data, 0, block.Data.Length);
                    }
                }
            }
            op.CurrentState = "Everything is done";

            return(true);
        }
Esempio n. 3
0
        public bool VerifyFuseBits(DeviceOperation op)
        {
            var device = Config.Device;

            var fuseBlocks = FusesHexBoard.SplitBlocks(1);

            op.FusesSize += fuseBlocks.TotalBytes;

            using (var programmer = CreateProgrammer(op)) {
                using (programmer.Start()) {
                    if (!VerifyBlocks(programmer, fuseBlocks, device.FuseBits.Location ?? AvrMemoryType.FuseBits, op))
                    {
                        return(false);
                    }
                }
            }
            op.Complete();
            op.CurrentState = "Everything is done";

            return(true);
        }