Prep for new stm32-data with dmamux differentiation, but not yet using.

This commit is contained in:
Bob McWhirter 2021-07-16 15:44:22 -04:00
parent 0119ea809d
commit 01cc733c61
2 changed files with 10 additions and 3 deletions

@ -1 +1 @@
Subproject commit ddd0f206e22143436230dca6d3fcfc0e02e55dfd Subproject commit d285fced6573703be875436409f8c83dd80ae183

View File

@ -50,7 +50,7 @@ pub struct Peripheral {
#[serde(default)] #[serde(default)]
pub dma_channels: HashMap<String, Vec<PeripheralDmaChannel>>, pub dma_channels: HashMap<String, Vec<PeripheralDmaChannel>>,
#[serde(default)] #[serde(default)]
pub dma_requests: HashMap<String, u32>, pub dma_requests: HashMap<String, PeripheralDmaRequest>,
} }
#[derive(Debug, Eq, PartialEq, Clone, Deserialize)] #[derive(Debug, Eq, PartialEq, Clone, Deserialize)]
@ -72,6 +72,12 @@ pub struct PeripheralDmaChannel {
pub request: Option<u32>, pub request: Option<u32>,
} }
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Hash)]
pub struct PeripheralDmaRequest {
pub dmamux: String,
pub request: u32,
}
struct BlockInfo { struct BlockInfo {
/// usart_v1/USART -> usart /// usart_v1/USART -> usart
module: String, module: String,
@ -335,7 +341,8 @@ pub fn gen(options: Options) {
row.push(bi.module.clone()); row.push(bi.module.clone());
row.push(name.clone()); row.push(name.clone());
row.push(dma_request.0.clone()); row.push(dma_request.0.clone());
row.push(dma_request.1.to_string()); row.push(dma_request.1.request.to_string());
// TODO add the `dmamux` column
dma_requests_table.push(row); dma_requests_table.push(row);
} }