using System;
using System.Collections;
using System.Collections.Generic;
using MiMic.CsApi;
namespace MiMic.CsApi.LPC1769
{
	
	public class Pin:MiMicClass
	{
		public class Option{
			public UInt32? sel;
			public UInt32? mode;
			public UInt32? od;
			public Option(UInt32? i_sel,UInt32? i_mode,UInt32? i_od)
			{
				this.sel=i_sel;
				this.mode=i_mode;
				this.od=i_od;
			}
			public Option(Option s)
			{
				if(s!=null){
					this.sel=s.sel;
					this.mode=s.mode;
					this.od=s.od;
				}
			}
				
		}
		public static Option Option_DEFAULT=new Option(null,null,null);
		private Port _port;
		public Pin(Mcu i_mcu,PinId i_pin,Option i_opt)
		{
			//1ピンのポートとして実装する。
			this._port = new Port(
            	i_mcu,
            	new PinId[]{i_pin},
				(i_opt==null)?null:new Option[]{i_opt});
		}
		public void setOpt(Option i_opt)
		{
			this._port.setOpts(new Option[]{i_opt});
			return;
		}
	}
		
}
