Skip to content

Commit

Permalink
Added comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
maniglia committed Oct 6, 2023
1 parent 4dfb0bf commit 2a4ad97
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/01/KSociety.SharpCubeProgrammer/CubeProgrammerApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,7 @@ public void UnlockChip()

#region [Util]

/// <inheritdoc />
public uint HexConverterToUint(string hex)
{
IFormatProvider formatProvider = CultureInfo.InvariantCulture.NumberFormat;
Expand All @@ -926,6 +927,7 @@ public uint HexConverterToUint(string hex)
return parseResult ? result : 0;
}

/// <inheritdoc />
public int HexConverterToInt(string hex)
{
IFormatProvider formatProvider = CultureInfo.InvariantCulture.NumberFormat;
Expand All @@ -934,12 +936,14 @@ public int HexConverterToInt(string hex)
return parseResult ? result : 0;
}

/// <inheritdoc />
public string HexConverterToString(uint hex)
{
var output = "0x" + hex.ToString("X");
return output;
}

/// <inheritdoc />
public string HexConverterToString(int hex)
{
var output = "0x" + hex.ToString("X");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,32 @@ public interface ICubeProgrammerApi

#region [Util]

/// <summary>
/// HexConverterToUint
/// </summary>
/// <param name="hex"></param>
/// <returns></returns>
uint HexConverterToUint(string hex);

/// <summary>
/// HexConverterToInt
/// </summary>
/// <param name="hex"></param>
/// <returns></returns>
int HexConverterToInt(string hex);

/// <summary>
/// HexConverterToString
/// </summary>
/// <param name="hex"></param>
/// <returns></returns>
string HexConverterToString(uint hex);

/// <summary>
/// HexConverterToString
/// </summary>
/// <param name="hex"></param>
/// <returns></returns>
string HexConverterToString(int hex);

#endregion
Expand Down

0 comments on commit 2a4ad97

Please sign in to comment.