import { flashFileToDrive } from './driveFlasher.js';

export async function flashPicoFirmware(onLog, onProgress, options = {}) {
  await flashFileToDrive(onLog, onProgress, {
    firmwareUrl: options.firmwareUrl,
    outputName: 'firmware.uf2',
    driveHint: 'RPI-RP2 drive',
  });
  onLog?.('The Pico will reboot automatically with MicroPython.\n');
}
