Skip to content
Merged
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
13 changes: 7 additions & 6 deletions flasher/src/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,18 @@ export interface FirmwareMessage {
// ready-frame gate is the only guard on the receivers already deployed.
// A receiver refuses a frame whose flasher it did not list, and the id may
// be one a newer opener knows and the receiver does not.
// For 'rtl-ambz2' the parts are the LibreTiny UF2 as one part at address
// 0, which the receiver parses into flash runs itself.
// For 'rtl-ambz2' and 'rp2-picoboot' the parts are the UF2 as one part at
// address 0, which the receiver parses into flash runs itself.
flasher?: HandoffFlasher;
parts: FlashPart[];
}

// The flasher a hand-off is for, by an id both apps share: 'esp' is esptool
// (ESP32 / ESP8266), 'rtl-ambz2' the RTL8720C ROM downloader. Named after the
// flasher, not the platform: rtl87xx covers the RTL8710B too, whose ROM speaks
// another protocol and gets its own id when it lands.
export type HandoffFlasher = "esp" | "rtl-ambz2";
// (ESP32 / ESP8266), 'rtl-ambz2' the RTL8720C ROM downloader, 'rp2-picoboot'
// PICOBOOT for the RP2040. Named after the flasher, not the platform: rtl87xx
// covers the RTL8710B too, whose ROM speaks another protocol and gets its own
// id when it lands.
export type HandoffFlasher = "esp" | "rtl-ambz2" | "rp2-picoboot";

export type FlashState =
| "connecting"
Expand Down
Loading