Just as an example - in order to be able to create unit tests using the analog input, I must create the following:
using System;
using GHIElectronics.NETMF.Hardware;
namespace GHIElectronics.NETMF.Hardware.UnitTestable
{
public interface IAnalogIn : IDisposable
{
int Read();
void SetLinearScale(int minValue, int maxValue);
}
public class AnalogInTestable : AnalogIn
{
public AnalogInT(AnalogIn.Pin ain) : base(ain)
{
}
public static IAnalogIn CreateInstance(AnalogIn.Pin ain)
{
return (IAnalogIn) new AnalogInT(ain);
}
}
}