-
Notifications
You must be signed in to change notification settings - Fork 598
/
Copy pathISevenSegmentDisplay.cs
38 lines (33 loc) · 1.36 KB
/
ISevenSegmentDisplay.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
namespace Iot.Device.Display
{
/// <summary>
/// Represents a 7-Segment display that can display multiple digits
/// </summary>
public interface ISevenSegmentDisplay
{
/// <summary>
/// Gets the number of digits supported by the display
/// </summary>
int NumberOfDigits { get; }
/// <summary>
/// Gets or sets a single digit's segments by id
/// </summary>
/// <param name="address">address of digit</param>
Segment this[int address] { get; set; }
/// <summary>
/// Write a series of digits to the display buffer
/// </summary>
/// <param name="digits">a list of digits represented in segments</param>
/// <param name="startAddress">Address to start writing from</param>
void Write(ReadOnlySpan<Segment> digits, int startAddress = 0);
/// <summary>
/// Write a series of characters to the display buffer
/// </summary>
/// <param name="characters">a list of characters represented in fonts</param>
/// <param name="startAddress">Address to start writing from</param>
void Write(ReadOnlySpan<Font> characters, int startAddress = 0);
}
}