forked from dotnet/iot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
242 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
tools/ArduinoCsCompiler/NanoGenerator/VoidParameterWrapper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using ICSharpCode.Decompiler.TypeSystem; | ||
|
||
namespace ArduinoCsCompiler.NanoGenerator | ||
{ | ||
internal class VoidParameterWrapper : IParameter | ||
{ | ||
private string _name; | ||
|
||
public VoidParameterWrapper() | ||
{ | ||
_name = "void"; | ||
} | ||
|
||
public SymbolKind SymbolKind => SymbolKind.Parameter; | ||
public object? GetConstantValue(bool throwOnInvalidMetadata = false) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
string IVariable.Name => _name; | ||
|
||
public IType Type => SpecialType.NoType; | ||
public bool IsConst => false; | ||
|
||
string ISymbol.Name => _name; | ||
|
||
public IEnumerable<IAttribute> GetAttributes() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public ReferenceKind ReferenceKind => ReferenceKind.None; | ||
public LifetimeAnnotation Lifetime { get; } | ||
public bool IsRef { get; } | ||
public bool IsOut { get; } | ||
public bool IsIn { get; } | ||
public bool IsParams { get; } | ||
public bool IsOptional { get; } | ||
public bool HasConstantValueInSignature { get; } | ||
public IParameterizedMember? Owner { get; } | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
tools/ArduinoCsCompiler/samples/BlinkingLedNano/BlinkingLedNano.nfproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="Current" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup Label="Globals"> | ||
<NanoFrameworkProjectSystemPath>$(MSBuildExtensionsPath)\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath> | ||
</PropertyGroup> | ||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectTypeGuids>{11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
<ProjectGuid>6062496b-4074-4ca3-b254-1bd0eebcd965</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<FileAlignment>512</FileAlignment> | ||
<RootNamespace>BlinkingLedNano</RootNamespace> | ||
<AssemblyName>BlinkingLedNano</AssemblyName> | ||
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion> | ||
</PropertyGroup> | ||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.props')" /> | ||
<ItemGroup> | ||
<Compile Include="generated.cs" /> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Reference Include="mscorlib"> | ||
<HintPath>packages\nanoFramework.CoreLibrary.1.14.2\lib\mscorlib.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" /> | ||
<ProjectExtensions> | ||
<ProjectCapabilities> | ||
<ProjectConfigurationsDeclaredAsItems /> | ||
</ProjectCapabilities> | ||
</ProjectExtensions> | ||
</Project> |
27 changes: 27 additions & 0 deletions
27
tools/ArduinoCsCompiler/samples/BlinkingLedNano/BlinkingLedNano.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.9.34526.213 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "BlinkingLedNano", "BlinkingLedNano.nfproj", "{6062496B-4074-4CA3-B254-1BD0EEBCD965}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{6062496B-4074-4CA3-B254-1BD0EEBCD965}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{6062496B-4074-4CA3-B254-1BD0EEBCD965}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{6062496B-4074-4CA3-B254-1BD0EEBCD965}.Debug|Any CPU.Deploy.0 = Debug|Any CPU | ||
{6062496B-4074-4CA3-B254-1BD0EEBCD965}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{6062496B-4074-4CA3-B254-1BD0EEBCD965}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{6062496B-4074-4CA3-B254-1BD0EEBCD965}.Release|Any CPU.Deploy.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {68D16744-1FD5-4F6D-9EE4-54B829590BDD} | ||
EndGlobalSection | ||
EndGlobal |
20 changes: 20 additions & 0 deletions
20
tools/ArduinoCsCompiler/samples/BlinkingLedNano/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using System.Diagnostics; | ||
using System.Threading; | ||
|
||
namespace BlinkingLedNano | ||
{ | ||
public class Program | ||
{ | ||
public static void OldMain() | ||
{ | ||
Debug.WriteLine("Hello from nanoFramework!"); | ||
|
||
Thread.Sleep(Timeout.Infinite); | ||
|
||
// Browse our samples repository: https://github.com/nanoframework/samples | ||
// Check our documentation online: https://docs.nanoframework.net/ | ||
// Join our lively Discord community: https://discord.gg/gCyBu8T | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
tools/ArduinoCsCompiler/samples/BlinkingLedNano/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("CSharp.BlankApplication")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("CSharp.BlankApplication")] | ||
[assembly: AssemblyCopyright("Copyright © 2024")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
4 changes: 4 additions & 0 deletions
4
tools/ArduinoCsCompiler/samples/BlinkingLedNano/packages.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="nanoFramework.CoreLibrary" version="1.14.2" targetFramework="netnano1.0" /> | ||
</packages> |