elf2flash_core/boards/rp2040.rs
1use crate::boards::{BoardInfo, UsbDevice};
2
3#[derive(Debug, Default, Clone)]
4pub struct RP2040;
5
6impl BoardInfo for RP2040 {
7 fn is_device_board(&self, device: &UsbDevice) -> bool {
8 if device.vendor_id != 0x2e8a {
9 return false;
10 }
11 match device.product_id {
12 0x0003 => true,
13 _ => false,
14 }
15 }
16
17 fn family_id(&self) -> u32 {
18 0xe48bff56
19 }
20
21 fn board_name(&self) -> String {
22 "rp2040".to_string()
23 }
24}