using Microsoft.SPOT.Hardware;

namespace GrFamily.MainBoard
{
    /// <summary>
    /// LEDNX
    /// </summary>
    public class Led
    {
        /// <summary>LEDªÚ±³ê½s</summary>
        protected readonly OutputPort LedPort;

        /// <summary>
        /// RXgN^
        /// </summary>
        /// <param name="pin">LEDªÚ±³ê½s</param>
        public Led(Cpu.Pin pin)
        {
            LedPort = new OutputPort(pin, false);
        }

        /// <summary>
        /// LEDð_^Á·é
        /// </summary>
        /// <param name="on">LEDð_·éêÍ trueAÁ·éêÍ false</param>
        public void SetLed(bool on)
        {
            LedPort.Write(on);
        }
    }
}
