コード例 #1
0
        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);
        }
コード例 #2
0
 public bool Alloc(Device.IResourceManager rManager)
 {
     return(true);
 }
コード例 #3
0
 public bool Alloc(Device.IResourceManager rManager)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 /// <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);
 }
コード例 #5
0
 public bool Alloc(Device.IResourceManager rManager)
 {
     rManager.Free(new Resource(ResourceType.PIN, PinDef.Pin));
     return(true);
 }