[][src]Crate hf2

Re-exports

pub use command::*;
pub use mock::*;
pub use bininfo::*;
pub use chksumpages::*;
pub use dmesg::*;
pub use info::*;
pub use readwords::*;
pub use resetintoapp::*;
pub use resetintobootloader::*;
pub use startflash::*;
pub use writeflashpage::*;
pub use writewords::*;

Modules

bininfo

This command states the current mode of the device:

chksumpages

Compute checksum of a number of pages. Maximum value for num_pages is max_message_size / 2 - 2. The checksum algorithm used is CRC-16-CCITT.

command

Errors and traits to build a command

dmesg

Return internal log buffer if any. The result is a character array.

info

Various device information. The result is a character array. See INFO_UF2.TXT in UF2 format for details.

mock

trait to implement HID devices

readwords

Read a number of words from memory. Memory is read word by word (and not byte by byte), and target_addr must be suitably aligned. This is to support reading of special IO regions.

resetintoapp

Reset the device into user-space app. Usually, no response at all will arrive for this command.

resetintobootloader

Reset the device into bootloader, usually for flashing. Usually, no response at all will arrive for this command.

startflash

When issued in bootloader mode, it has no effect. In user-space mode it causes handover to bootloader. A BININFO command can be issued to verify that.

writeflashpage

Write a single page of flash memory. No Result.

writewords

Dual of READ WORDS, with the same constraints. No Result.