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
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Assuming the `deviceMetadata` object loaded above is available, device firmware
```csharp
...
using var reader = new StreamReader("ios.yml");
var portPinMetadata = MetadataDeserializer.Instance.Deserialize<PortPinMetadata>(reader);
var portPinMetadata = MetadataDeserializer.Instance.Deserialize<Dictionary<string, PortPinInfo>>(reader);
var generator = new FirmwareGenerator(deviceMetadata, portPinMetadata);

var headers = generator.GenerateHeaders();
Expand Down
4 changes: 4 additions & 0 deletions src/Interface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public class DeviceMetadata
/// <summary>
/// Gets a value indicating whether the metadata describes an application device.
/// </summary>
/// <remarks>
/// Metadata declaring no device name describes the core register set. In this case, the
/// generated interface carries the register classes and the address map only.
/// </remarks>
[YamlIgnore]
public bool IsApplicationDevice => !string.IsNullOrEmpty(Device);
}
Expand Down
4 changes: 4 additions & 0 deletions src/InterfaceGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace Harp.Generators;
/// <summary>
/// Provides automatic generation of reactive device interface implementations.
/// </summary>
/// <remarks>
/// Metadata declaring no device name generates no asynchronous device interface, so
/// enumerating the result yields a single file.
/// </remarks>
public sealed class InterfaceGenerator
{
readonly Device _deviceTemplate = new();
Expand Down
Loading