but in Visual Studio 2010 happened the misstake as follow:
static OutputPort Keyboard_CP = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.IO72, true);
"GHIElectronics.NETMF.FEZ.FEZ_Pin.Digital" doesn't include the Definition for "IO72".
I can’t change the layout of my board, is it possible, the IO72 as GPIO to define?
I have tired the EMX class for IO, the codes is as follow. but my Visual Studio can’t find the “GHI.Premium.Hardware”, where can I get the reference?
using System;
using Microsoft.SPOT;
using System.Threading;
using Microsoft.SPOT.Hardware;
using GHI.Premium.Hardware;
namespace Outputporttest
{
public class Program
{
public static void Main()
{
int i = 0;
OutputPort LED;
LED = new OutputPort((Cpu.Pin)EMX.Pin.IO47, true);
InterruptPort IntButton = new InterruptPort((Cpu.Pin)EMX.Pin.IO33, false,
Port.ResistorMode.PullUp,
Port.InterruptMode.InterruptEdgeLow);
IntButton.OnInterrupt += new NativeEventHandler(IntButton_OnInterrupt);
while (true)
{
if (i == 0)
{
LED.Write(false);
Thread.Sleep(50);
i = 1;
}
else if (i == 1)
{
LED.Write(true);
Thread.Sleep(50);
i = 0;
}
}
}
static void IntButton_OnInterrupt(uint port, uint state, DateTime time)
{
Debug.Print("Button Pressed");
}
}
}
Just want to check if you’re creating a 4.1 or a 4.2 project? What SDK version do you have installed? When you right click the “References” part of the right pane and add a reference, what GHI/EMX objects can you see there?