Example #1
0
        private PICDeviceConfigDefs(IPICDescriptor thePIC)
        {
            dcregisters = new SortedList <Address, PICDevConfigRegister>();
            foreach (var fuse in thePIC.ConfigurationFuses)
            {
                var dcreg = new PICDevConfigRegister(fuse);

                foreach (var dcilg in fuse.IllegalSettings)
                {
                    dcreg.AddIllegal(new DevConfigIllegal(dcilg));
                }
                foreach (var dcfld in fuse.ConfigFields.Where(f => !(f.IsHidden || f.IsLangHidden)))
                {
                    var dcrfdef = new DevConfigField(dcfld, dcreg.Address);
                    foreach (var dcsem in dcfld.Semantics)
                    {
                        dcrfdef.AddSemantic(new DevConfigSemantic(dcsem));
                    }
                    dcreg.AddField(dcrfdef);
                }
                dcregisters.Add(dcreg.Address, dcreg);
            }
        }
Example #2
0
 /// <summary>
 /// Adds a bit-field to this device configuration register.
 /// </summary>
 /// <param name="dcf">The <see cref="DevConfigField"/> instance to add.</param>
 public void AddField(DevConfigField dcf) => fields.Add(dcf);