BoardInfo

Trait BoardInfo 

Source
pub trait BoardInfo {
    // Required methods
    fn is_device_board(&self, device: &UsbDevice) -> bool;
    fn family_id(&self) -> u32;
    fn board_name(&self) -> String;

    // Provided methods
    fn page_size(&self) -> u32 { ... }
    fn flash_sector_erase_size(&self) -> u64 { ... }
}
Expand description

This trait helps by allowing for definitions of multiple different boards.

Required Methods§

Source

fn is_device_board(&self, device: &UsbDevice) -> bool

Check if the board is connected to the specified UsbDevice

Source

fn family_id(&self) -> u32

Returns the proper family id to use for the uf2 device

Source

fn board_name(&self) -> String

Get the board’s name

Provided Methods§

Source

fn page_size(&self) -> u32

Optional, just sent to a sensible default of 256, as long as it is less than 512 - 32 it should be okay, but boards very, and so does the bootloader firmware

Source

fn flash_sector_erase_size(&self) -> u64

Optional, with a default erase size of 4096

Implementors§