stm32-metapac: change af from string to u8
This commit is contained in:
parent
042e7d6de7
commit
f14cacbf93
@ -76,7 +76,7 @@ pub struct PeripheralRccRegister {
|
|||||||
pub struct PeripheralPin {
|
pub struct PeripheralPin {
|
||||||
pub pin: &'static str,
|
pub pin: &'static str,
|
||||||
pub signal: &'static str,
|
pub signal: &'static str,
|
||||||
pub af: Option<&'static str>,
|
pub af: Option<u8>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Clone)]
|
#[derive(Debug, Eq, PartialEq, Clone)]
|
||||||
|
@ -87,7 +87,7 @@ pub struct PeripheralRccRegister {
|
|||||||
pub struct PeripheralPin {
|
pub struct PeripheralPin {
|
||||||
pub pin: String,
|
pub pin: String,
|
||||||
pub signal: String,
|
pub signal: String,
|
||||||
pub af: Option<String>,
|
pub af: Option<u8>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Clone, Deserialize)]
|
#[derive(Debug, Eq, PartialEq, Clone, Deserialize)]
|
||||||
|
@ -182,7 +182,7 @@ pub fn gen_chip(
|
|||||||
row.push(pin.pin.clone());
|
row.push(pin.pin.clone());
|
||||||
row.push(pin.signal.clone());
|
row.push(pin.signal.clone());
|
||||||
if let Some(ref af) = pin.af {
|
if let Some(ref af) = pin.af {
|
||||||
row.push(af.clone());
|
row.push(format!("{}", af));
|
||||||
}
|
}
|
||||||
peripheral_pins_table.push(row);
|
peripheral_pins_table.push(row);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user