Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add first device schema and corresponding interface #1

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
###############################
# Core EditorConfig Options #
###############################
# All files
[*]
indent_style = space

# XML project files
[*.{csproj,vcxproj,vcxproj.filters,proj,projitems,shproj,bonsai}]
indent_size = 2

# XML config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2

# Code files
[*.{cs,csx}]
indent_size = 4
insert_final_newline = true
charset = utf-8-bom
###############################
# .NET Coding Conventions #
###############################
[*.{cs}]
# Organize usings
dotnet_sort_system_directives_first = true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Visual studio files
.vs
.suo
Expand Down
9 changes: 9 additions & 0 deletions Firmware/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Visual studio files
.vs
.suo
.nuget
bin
obj
Debug
packages
*.componentinfo.xml
File renamed without changes.
32 changes: 32 additions & 0 deletions Generators/Generators.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<RootNamespace>Harp.RgbArray</RootNamespace>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<OutputPath>bin</OutputPath>
</PropertyGroup>
<PropertyGroup>
<DeviceMetadata>..\device.yml</DeviceMetadata>
<IOMetadata>..\ios.yml</IOMetadata>
</PropertyGroup>
<PropertyGroup>
<InterfacePath>..\Interface\Harp.RgbArray</InterfacePath>
<FirmwarePath>..\Firmware\Harp.RgbArray</FirmwarePath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Harp.Generators" Version="0.1.0" GeneratePathProperty="true" />
</ItemGroup>
<Target Name="TextTransform" BeforeTargets="AfterBuild">
<PropertyGroup>
<InterfaceFlags>-p:MetadataPath=$(DeviceMetadata) -p:Namespace=$(RootNamespace) -P=$(TargetDir)</InterfaceFlags>
<FirmwareFlags>-p:RegisterMetadataPath=$(DeviceMetadata) -p:IOMetadataPath=$(IOMetadata) -P=$(TargetDir)</FirmwareFlags>
</PropertyGroup>
<Exec WorkingDirectory="$(ProjectDir)"
Condition="Exists($(DeviceMetadata)) And $([System.String]::new('%(Content.Link)').EndsWith('Device.tt'))"
Command="t4 %(Content.Identity) $(InterfaceFlags) -o=$(InterfacePath)\%(Content.Link)" />
<Exec WorkingDirectory="$(ProjectDir)"
Condition="Exists($(IOMetadata)) And '%(Content.Link)' == 'Firmware.tt'"
Command="t4 %(Content.Identity) $(FirmwareFlags) -o=$(FirmwarePath)\app_ios_and_regs.h" />
</Target>
</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
25 changes: 25 additions & 0 deletions Interface/Harp.RgbArray.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32825.248
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9B2E00B8-401A-48DB-86FB-37B00C8FD508}") = "Harp.RgbArray", "Harp.RgbArray\Harp.RgbArray.csproj", "{EDDF0906-0230-4DD6-9350-7B0CB313D453}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EDDF0906-0230-4DD6-9350-7B0CB313D453}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EDDF0906-0230-4DD6-9350-7B0CB313D453}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EDDF0906-0230-4DD6-9350-7B0CB313D453}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EDDF0906-0230-4DD6-9350-7B0CB313D453}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {22F433E4-A2EC-44E6-8C2E-4D8D8897899A}
EndGlobalSection
EndGlobal
Loading