Exemplo n.º 1
0
        public NativeAnalogOutput(Socket socket, Socket.Pin pin, Module module, Hardware.Cpu.AnalogOutputChannel channel)
        {
            if (channel == Hardware.Cpu.AnalogOutputChannel.ANALOG_OUTPUT_NONE)
            {
                Socket.InvalidSocketException.ThrowIfOutOfRange(pin, Socket.Pin.Five, Socket.Pin.Five, "AnalogOutput", module);

                // this is a mainboard error but should not happen since we check for this, but it doesnt hurt to double-check
                throw Socket.InvalidSocketException.FunctionalityException(socket, "AnalogOutput");
            }

            _channel = channel;
            _socket  = socket;
        }
Exemplo n.º 2
0
        public NativeAnalogOutput(Socket socket, Socket.Pin pin, Module module, Hardware.Cpu.AnalogOutputChannel channel)
        {
            if (channel == Hardware.Cpu.AnalogOutputChannel.ANALOG_OUTPUT_NONE)
            {
                Socket.InvalidSocketException.ThrowIfOutOfRange(pin, Socket.Pin.Five, Socket.Pin.Five, "AnalogOutput", module);

                // this is a mainboard error but should not happen since we check for this, but it doesnt hurt to double-check
                throw Socket.InvalidSocketException.FunctionalityException(socket, "AnalogOutput");
            }

            _channel = channel;
            _socket = socket;
        }