mediatek-brom

Crates.iomediatek-brom
lib.rsmediatek-brom
version0.1.0
sourcesrc
created_at2024-11-10 21:03:24.945366
updated_at2024-11-10 21:03:24.945366
descriptionMediatek bootrom protocol implementation
homepagehttps://github.com/boardswarm/mediatek-brom
repositoryhttps://github.com/boardswarm/mediatek-brom
max_upload_size
id1443213
size57,151
Sjoerd Simons (sjoerdsimons)

documentation

README

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:

Commit count: 1

cargo fmt