Skip to content

Commit 9010d72

Browse files
authored
Merge pull request #2 from harp-tech/as_interface_gen
Add automatic interface generation files
2 parents d6416ef + 31aa0ba commit 9010d72

12 files changed

Lines changed: 7225 additions & 7 deletions

File tree

.editorconfig

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
2+
###############################
3+
# Core EditorConfig Options #
4+
###############################
5+
# All files
6+
[*]
7+
indent_style = space
8+
9+
# XML project files
10+
[*.{csproj,vcxproj,vcxproj.filters,proj,projitems,shproj,bonsai}]
11+
indent_size = 2
12+
13+
# XML config files
14+
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
15+
indent_size = 2
16+
17+
# Code files
18+
[*.{cs,csx}]
19+
indent_size = 4
20+
insert_final_newline = true
21+
charset = utf-8-bom
22+
###############################
23+
# .NET Coding Conventions #
24+
###############################
25+
[*.{cs}]
26+
# Organize usings
27+
dotnet_sort_system_directives_first = true

.gitignore

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
12
desktop.ini
2-
**/Downloads
3-
**/downloads
4-
**/Debug
5-
**/debug
6-
*.atsuo
7-
*.o
8-
*.d
3+
4+
# Visual studio files
5+
.vs
6+
.suo
7+
.nuget
8+
bin
9+
obj
10+
Debug
11+
packages
12+
*.componentinfo.xml

Firmware/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Visual studio files
2+
.vs
3+
.suo
4+
.nuget
5+
bin
6+
obj
7+
Debug
8+
packages
9+
*.componentinfo.xml

Generators/Generators.csproj

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
4+
<RootNamespace>Harp.LedArray</RootNamespace>
5+
<TargetFramework>net6.0</TargetFramework>
6+
<LangVersion>latest</LangVersion>
7+
<OutputPath>bin</OutputPath>
8+
</PropertyGroup>
9+
<PropertyGroup>
10+
<DeviceMetadata>..\device.yml</DeviceMetadata>
11+
<IOMetadata>..\ios.yml</IOMetadata>
12+
</PropertyGroup>
13+
<PropertyGroup>
14+
<InterfacePath>..\Interface\Harp.LedArray</InterfacePath>
15+
<FirmwarePath>..\Firmware\Harp.LedArray</FirmwarePath>
16+
</PropertyGroup>
17+
<ItemGroup>
18+
<PackageReference Include="Harp.Generators" Version="0.1.0-build032704" GeneratePathProperty="true" />
19+
</ItemGroup>
20+
<Target Name="TextTransform" BeforeTargets="AfterBuild">
21+
<PropertyGroup>
22+
<InterfaceFlags>-p:MetadataPath=$(DeviceMetadata) -p:Namespace=$(RootNamespace) -P=$(TargetDir)</InterfaceFlags>
23+
<FirmwareFlags>-p:RegisterMetadataPath=$(DeviceMetadata) -p:IOMetadataPath=$(IOMetadata) -P=$(TargetDir)</FirmwareFlags>
24+
</PropertyGroup>
25+
<Exec WorkingDirectory="$(ProjectDir)"
26+
Condition="Exists($(DeviceMetadata)) And $([System.String]::new('%(Content.Link)').EndsWith('Device.tt'))"
27+
Command="t4 %(Content.Identity) $(InterfaceFlags) -o=$(InterfacePath)\%(Content.Link)" />
28+
<Exec WorkingDirectory="$(ProjectDir)"
29+
Condition="Exists($(IOMetadata)) And '%(Content.Link)' == 'Firmware.tt'"
30+
Command="t4 %(Content.Identity) $(FirmwareFlags) -o=$(FirmwarePath)\app_ios_and_regs.h" />
31+
</Target>
32+
</Project>

Interface/Harp.LedArray.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.3.32825.248
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{0A7A57A4-A5B3-4593-B541-3679E6AECDBE}") = "Harp.LedArray", "Harp.LedArray\Harp.LedArray.csproj", "{C579FB15-4EFB-4C52-B403-5A1049498981}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{C579FB15-4EFB-4C52-B403-5A1049498981}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{C579FB15-4EFB-4C52-B403-5A1049498981}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{C579FB15-4EFB-4C52-B403-5A1049498981}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{C579FB15-4EFB-4C52-B403-5A1049498981}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {F5D812FF-2C9D-45DD-ACE4-397D9B23EA75}
24+
EndGlobalSection
25+
EndGlobal

0 commit comments

Comments
 (0)