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) { return(true); }
public bool Alloc(Device.IResourceManager rManager) { throw new NotImplementedException(); }
/// <summary> /// TODO really needs to be a Free() method in this interface /// this is actually in the wrong order -- should be done AFTER the command /// </summary> /// <param name="rManager"></param> /// <returns></returns> public bool Alloc(Device.IResourceManager rManager) { rManager.Free(new Resource(ResourceType.PIN, PwmDef.PinSpec.Pin)); rManager.Free(new Resource(ResourceType.OUTCOMPARE, this.PwmDef.PwmNumber)); return(true); }
public bool Alloc(Device.IResourceManager rManager) { rManager.Free(new Resource(ResourceType.PIN, PinDef.Pin)); return(true); }