Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/devices/Board/Board.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ public abstract class Board : MarshalByRefObject, IDisposable
private Dictionary<int, PinUsage> _knownUsages;

/// <summary>
/// Constructs a board instance with the given default numbering scheme.
/// All methods will use the given numbering scheme, unless another scheme is explicitly given in a call.
/// Constructs a board instance with the default numbering scheme.
/// </summary>
/// <remarks>
/// The constructor will never throw an exception. Call any other method to initialize the hardware and check
Expand Down
3 changes: 2 additions & 1 deletion src/devices/Card/Ndef/samples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Iot.Device.Card.Mifare;
using Iot.Device.Common;
using Iot.Device.Ft4222;
using Iot.Device.FtCommon;
using Iot.Device.Ndef;
using Iot.Device.Pn5180;
using Iot.Device.Pn532;
Expand Down Expand Up @@ -411,7 +412,7 @@ Pn5180 Ft4222Pn5180()
Console.WriteLine();
}

var (chip, dll) = FtCommon.GetVersions();
var (chip, dll) = Ft4222Common.GetVersions();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could FtCommon enumerate both Ft4222s and Ft232?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because FT4222 have a specific set of API, the GetVersions is only available with FT4222.

Console.WriteLine($"Chip version: {chip}");
Console.WriteLine($"Dll version: {dll}");

Expand Down
3 changes: 2 additions & 1 deletion src/devices/Ccs811/samples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Threading;
using Iot.Device.Ccs811;
using Iot.Device.Ft4222;
using Iot.Device.FtCommon;
using UnitsNet;
using static System.Console;

Expand Down Expand Up @@ -50,7 +51,7 @@
else if (platformChoice.KeyChar == '2')
{
WriteLine("Creating an instance of a CCS811 using FT4222 drivers.");
using (var i2cBus = FtCommon.GetDevices()[0].CreateI2cBus())
using (var i2cBus = Ft4222Device.GetFt4222()[0].CreateOrGetI2cBus(0))
{
int deviceAddress = addressChoice.KeyChar == '1' ? Ccs811Sensor.I2cFirstAddress : Ccs811Sensor.I2cSecondAddress;
var gpioController = new GpioController(PinNumberingScheme.Board, new Ft4222Gpio());
Expand Down
21 changes: 21 additions & 0 deletions src/devices/Ft232H/Ft232H.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(DefaultBindingTfms)</TargetFrameworks>
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>

<ItemGroup>
<Compile Include="Ft232HDevice.cs" />
<Compile Include="Ft232HGpio.cs" />
<Compile Include="Ft232HI2c.cs" />
<Compile Include="Ft232HI2cBus.cs" />
<Compile Include="Ft232HSpi.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Board\Board.csproj" />
</ItemGroup>
<Import Project="..\FtCommon\FtCommon.projitems" Label="Shared" />

</Project>
59 changes: 59 additions & 0 deletions src/devices/Ft232H/Ft232H.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31515.178
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ft232H", "Ft232H.csproj", "{41A5516C-6799-4642-B20D-BEC14CF0B742}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{D476679D-EBC5-406A-B293-93A65C8B58ED}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ft232H.sample", "samples\Ft232H.sample.csproj", "{5E504FC0-D336-4F92-9B4E-666B5C4A1E64}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared projects", "Shared projects", "{07E992C0-1091-4A40-B1A0-71878D58140F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bmxx80", "..\Bmxx80\Bmxx80.csproj", "{7CC23CB9-7276-418B-8085-AA06AD7AC63B}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "FtCommon", "..\FtCommon\FtCommon.shproj", "{2F022801-B558-4395-A995-EF10628447B4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Board", "..\Board\Board.csproj", "{DF7F5D81-1F96-46A6-AB39-977A8522F6FA}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\FtCommon\FtCommon.projitems*{2f022801-b558-4395-a995-ef10628447b4}*SharedItemsImports = 13
..\FtCommon\FtCommon.projitems*{41a5516c-6799-4642-b20d-bec14cf0b742}*SharedItemsImports = 5
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{41A5516C-6799-4642-B20D-BEC14CF0B742}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{41A5516C-6799-4642-B20D-BEC14CF0B742}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41A5516C-6799-4642-B20D-BEC14CF0B742}.Release|Any CPU.ActiveCfg = Release|Any CPU
{41A5516C-6799-4642-B20D-BEC14CF0B742}.Release|Any CPU.Build.0 = Release|Any CPU
{5E504FC0-D336-4F92-9B4E-666B5C4A1E64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5E504FC0-D336-4F92-9B4E-666B5C4A1E64}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E504FC0-D336-4F92-9B4E-666B5C4A1E64}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5E504FC0-D336-4F92-9B4E-666B5C4A1E64}.Release|Any CPU.Build.0 = Release|Any CPU
{7CC23CB9-7276-418B-8085-AA06AD7AC63B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7CC23CB9-7276-418B-8085-AA06AD7AC63B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7CC23CB9-7276-418B-8085-AA06AD7AC63B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7CC23CB9-7276-418B-8085-AA06AD7AC63B}.Release|Any CPU.Build.0 = Release|Any CPU
{DF7F5D81-1F96-46A6-AB39-977A8522F6FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DF7F5D81-1F96-46A6-AB39-977A8522F6FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DF7F5D81-1F96-46A6-AB39-977A8522F6FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DF7F5D81-1F96-46A6-AB39-977A8522F6FA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{5E504FC0-D336-4F92-9B4E-666B5C4A1E64} = {D476679D-EBC5-406A-B293-93A65C8B58ED}
{7CC23CB9-7276-418B-8085-AA06AD7AC63B} = {D476679D-EBC5-406A-B293-93A65C8B58ED}
{2F022801-B558-4395-A995-EF10628447B4} = {07E992C0-1091-4A40-B1A0-71878D58140F}
{DF7F5D81-1F96-46A6-AB39-977A8522F6FA} = {07E992C0-1091-4A40-B1A0-71878D58140F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {ECE390DE-F924-422E-8D21-ABB498BA0D20}
EndGlobalSection
EndGlobal
Loading