1 unstable release

0.1.0 Nov 10, 2024

#954 in Hardware support

Download history 32/week @ 2024-11-04 71/week @ 2024-11-11 6/week @ 2024-11-18 31/week @ 2024-11-25 19/week @ 2024-12-02 333/week @ 2024-12-09

393 downloads per month

MIT/Apache

19KB
507 lines

Mediatek bootrom protocol implementation

Mediatek bootroms implement a simple protocol that can be used over e.g. uart to, among other things, load a Download Agent (DA). This crate contains a sans-io protocol implementation and some small helper traits to build on top of sync or async io implementations.

For example to get the hardware code and version the following can be used over e.g. a sync serial transport implementation:

    use mediatek_brom::{io::BromExecute, Brom};
    # let mut transport = std::io::Cursor::new([0u8; 16]);
    let brom = transport.execute(Brom::handshake(0x201000)).unwrap();
    let hwcode = transport.execute(brom.hwcode()).unwrap();
    println!("Hwcode: {:x?}", hwcode);

Credits

To understand the protocol the following open source implementations were studied:

Dependencies

~0.2–6MB
~37K SLoC