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 flag to Ping to expose support for nanoBooter #257

Merged
merged 1 commit into from
Nov 12, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ public class Monitor_Ping
/// </summary>
public const uint Monitor_Ping_c_ConfigBlockRequiresErase = 0x00040000;

/// <summary>
/// This flag indicates that the device has nanoBooter.
/// </summary>
public const uint Monitor_Ping_c_HasNanoBooter = 0x00080000;

///////////////////////////////////////////////////////////////////////

public uint Source;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ public BinaryFormatter CreateBinaryFormatter()
/// This indicates if the device has a proprietary bootloader.
/// </summary>
public bool HasProprietaryBooter { get; private set; }

/// <summary>
/// This indicates if the target device has nanoBooter.
/// </summary>
public bool HasNanoBooter { get; private set; }

/// <summary>
/// This indicates if the target device is IFU capable.
Expand Down Expand Up @@ -237,6 +242,8 @@ public async Task<bool> ConnectAsync(
ConfigBlockRequiresErase = (reply.Flags & Commands.Monitor_Ping.Monitor_Ping_c_ConfigBlockRequiresErase).Equals(Commands.Monitor_Ping.Monitor_Ping_c_ConfigBlockRequiresErase);

HasProprietaryBooter = (reply.Flags & Commands.Monitor_Ping.Monitor_Ping_c_HasProprietaryBooter).Equals(Commands.Monitor_Ping.Monitor_Ping_c_HasProprietaryBooter);

HasNanoBooter = (reply.Flags & Commands.Monitor_Ping.c_Ping_Source_NanoBooter).Equals(Commands.Monitor_Ping.Monitor_Ping_c_HasNanoBooter);

IsIFUCapable = (reply.Flags & Commands.Monitor_Ping.Monitor_Ping_c_IFUCapable).Equals(Commands.Monitor_Ping.Monitor_Ping_c_IFUCapable);

Expand Down