public bool Alloc(Device.IResourceManager rManager) { Resource outPin = new Resource(ResourceType.PIN, this.PwmDef.PinSpec.Pin); Resource pwm = new Resource(ResourceType.OUTCOMPARE); rManager.Alloc(outPin); rManager.Alloc(pwm); // acquires the pwm number // retain the PWM number this.PwmDef = new PwmOutputSpec(this.PwmDef.PinSpec, pwm.Id_); return(true); }
public bool Alloc(Device.IResourceManager rManager) { rManager.Alloc(new Resource(ResourceType.PIN, PinDef.Pin)); return(true); }