/*
    * IntelFirmware.hpp
    * Intel Bluetooth bootloader firmware download path
    * Copyright (c) 2026 Daniel Hammer
*/

#pragma once
#include <cstdint>

namespace Drivers::USB::Bluetooth {

    // Drive the Intel bootloader firmware download sequence for the currently
    // registered adapter:
    //   1. Read the TLV version and decide whether a download is required.
    //   2. Derive the firmware/DDC file names (ibt-<cnvi>-<cnvr>.{sfi,ddc})
    //      and load them from 0:/os/firmware/intel/.
    //   3. Secure-send the signed header + command-buffer payload (0xFC09).
    //   4. Boot the operational firmware (0xFC01) and wait for the bootup
    //      event, then apply DDC parameters (0xFC8B).
    //
    // Returns true if the controller is operational afterwards (either it was
    // already running firmware, or the download completed).  Returns false if
    // the controller is in bootloader mode and the download could not be
    // completed (e.g. firmware file missing).
    bool DownloadIntelFirmware();

}
