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§
Sourcefn is_device_board(&self, device: &UsbDevice) -> bool
fn is_device_board(&self, device: &UsbDevice) -> bool
Check if the board is connected to the specified UsbDevice
Sourcefn board_name(&self) -> String
fn board_name(&self) -> String
Get the board’s name
Provided Methods§
Sourcefn page_size(&self) -> u32
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
Sourcefn flash_sector_erase_size(&self) -> u64
fn flash_sector_erase_size(&self) -> u64
Optional, with a default erase size of 4096