Skip to content

Commit

Permalink
Fix superficial differences between 1050 and 1060
Browse files Browse the repository at this point in the history
These three modules are nearly the same between the 1050 and 1060.
There's only some superficial naming differences. Since the 1060 is
established, let's prefer those names (even if the 1050 names are better
in some cases).

I produced this diff by copying the three modules from the 1060
directory. This is an intermediate diff to show that these peripherals
are effectively the same.
  • Loading branch information
mciantyre authored and Hatim Thayyil committed Nov 29, 2024
1 parent 17abb28 commit fd6d9e0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/imxrt1050/adc.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! ADC pin implementations
//!
//! Implementation derived from Table 64-2: ADC External Signals
//! from the iMXRT1060 Reference Manual, Rev 5. There is a similar
//! Implementation derived from Table 66-2: ADC External Signals
//! from the iMXRT1060 Reference Manual, Rev 2. There is a similar
//! information available in Table 10-1: Muxing Options, in the IOMUXC
//! section of the reference manual.
Expand Down
32 changes: 16 additions & 16 deletions src/imxrt1050/flexcan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ can!(module: U1, alt: 2, pad: GPIO_AD_B1_08, signal: Tx, daisy: None);
can!(module: U1, alt: 2, pad: GPIO_B0_02, signal: Tx, daisy: None);
can!(module: U1, alt: 3, pad: GPIO_EMC_17, signal: Tx, daisy: None);
can!(module: U1, alt: 4, pad: GPIO_SD_B1_02, signal: Tx, daisy: None);
can!(module: U1, alt: 2, pad: GPIO_AD_B1_09, signal: Rx, daisy: Some(DAISY_FLEXCAN1_RX_GPIO_AD_B1_09));
can!(module: U1, alt: 2, pad: GPIO_B0_03, signal: Rx, daisy: Some(DAISY_FLEXCAN1_RX_GPIO_B0_03));
can!(module: U1, alt: 3, pad: GPIO_EMC_18, signal: Rx, daisy: Some(DAISY_FLEXCAN1_RX_GPIO_EMC_18));
can!(module: U1, alt: 4, pad: GPIO_SD_B1_03, signal: Rx, daisy: Some(DAISY_FLEXCAN1_RX_GPIO_SD_B1_03));
can!(module: U1, alt: 2, pad: GPIO_AD_B1_09, signal: Rx, daisy: Some(DAISY_CAN1_RX_GPIO_AD_B1_09));
can!(module: U1, alt: 2, pad: GPIO_B0_03, signal: Rx, daisy: Some(DAISY_CAN1_RX_GPIO_B0_03));
can!(module: U1, alt: 3, pad: GPIO_EMC_18, signal: Rx, daisy: Some(DAISY_CAN1_RX_GPIO_EMC_18));
can!(module: U1, alt: 4, pad: GPIO_SD_B1_03, signal: Rx, daisy: Some(DAISY_CAN1_RX_GPIO_SD_B1_03));

//
// CAN2
Expand All @@ -29,26 +29,26 @@ can!(module: U2, alt: 0, pad: GPIO_AD_B0_02, signal: Tx, daisy: None);
can!(module: U2, alt: 3, pad: GPIO_EMC_09, signal: Tx, daisy: None);
can!(module: U2, alt: 6, pad: GPIO_B1_08, signal: Tx, daisy: None);
can!(module: U2, alt: 6, pad: GPIO_AD_B0_14, signal: Tx, daisy: None);
can!(module: U2, alt: 0, pad: GPIO_AD_B0_03, signal: Rx, daisy: Some(DAISY_FLEXCAN2_RX_GPIO_AD_B0_03));
can!(module: U2, alt: 3, pad: GPIO_EMC_10, signal: Rx, daisy: Some(DAISY_FLEXCAN2_RX_GPIO_EMC_10));
can!(module: U2, alt: 6, pad: GPIO_AD_B0_15, signal: Rx, daisy: Some(DAISY_FLEXCAN2_RX_GPIO_AD_B0_15));
can!(module: U2, alt: 6, pad: GPIO_B1_09, signal: Rx, daisy: Some(DAISY_FLEXCAN2_RX_GPIO_B1_09));
can!(module: U2, alt: 0, pad: GPIO_AD_B0_03, signal: Rx, daisy: Some(DAISY_CAN2_RX_GPIO_AD_B0_03));
can!(module: U2, alt: 3, pad: GPIO_EMC_10, signal: Rx, daisy: Some(DAISY_CAN2_RX_GPIO_EMC_10));
can!(module: U2, alt: 6, pad: GPIO_AD_B0_15, signal: Rx, daisy: Some(DAISY_CAN2_RX_GPIO_AD_B0_15));
can!(module: U2, alt: 6, pad: GPIO_B1_09, signal: Rx, daisy: Some(DAISY_CAN2_RX_GPIO_B1_09));

/// Auto-generated DAISY values
mod daisy {
#![allow(unused)]

use super::Daisy;

pub const DAISY_FLEXCAN1_RX_GPIO_SD_B1_03: Daisy = Daisy::new(0x401f844c as *mut u32, 0);
pub const DAISY_FLEXCAN1_RX_GPIO_EMC_18: Daisy = Daisy::new(0x401f844c as *mut u32, 1);
pub const DAISY_FLEXCAN1_RX_GPIO_AD_B1_09: Daisy = Daisy::new(0x401f844c as *mut u32, 2);
pub const DAISY_FLEXCAN1_RX_GPIO_B0_03: Daisy = Daisy::new(0x401f844c as *mut u32, 3);
pub const DAISY_CAN1_RX_GPIO_SD_B1_03: Daisy = Daisy::new(0x401F_844C as *mut u32, 0);
pub const DAISY_CAN1_RX_GPIO_EMC_18: Daisy = Daisy::new(0x401F_844C as *mut u32, 1);
pub const DAISY_CAN1_RX_GPIO_AD_B1_09: Daisy = Daisy::new(0x401F_844C as *mut u32, 2);
pub const DAISY_CAN1_RX_GPIO_B0_03: Daisy = Daisy::new(0x401F_844C as *mut u32, 3);

pub const DAISY_FLEXCAN2_RX_GPIO_EMC_10: Daisy = Daisy::new(0x401f8450 as *mut u32, 0);
pub const DAISY_FLEXCAN2_RX_GPIO_AD_B0_03: Daisy = Daisy::new(0x401f8450 as *mut u32, 1);
pub const DAISY_FLEXCAN2_RX_GPIO_AD_B0_15: Daisy = Daisy::new(0x401f8450 as *mut u32, 2);
pub const DAISY_FLEXCAN2_RX_GPIO_B1_09: Daisy = Daisy::new(0x401f8450 as *mut u32, 3);
pub const DAISY_CAN2_RX_GPIO_EMC_10: Daisy = Daisy::new(0x401F_8450 as *mut u32, 0);
pub const DAISY_CAN2_RX_GPIO_AD_B0_03: Daisy = Daisy::new(0x401F_8450 as *mut u32, 1);
pub const DAISY_CAN2_RX_GPIO_AD_B0_15: Daisy = Daisy::new(0x401F_8450 as *mut u32, 2);
pub const DAISY_CAN2_RX_GPIO_B1_09: Daisy = Daisy::new(0x401F_8450 as *mut u32, 3);
}

use daisy::*;
4 changes: 2 additions & 2 deletions src/imxrt1050/lpuart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ mod daisy {
pub const DAISY_LPUART2_RX_GPIO_AD_B1_03: Daisy = Daisy::new(0x401f852c as *mut u32, 1);
pub const DAISY_LPUART2_TX_GPIO_SD_B1_11: Daisy = Daisy::new(0x401f8530 as *mut u32, 0);
pub const DAISY_LPUART2_TX_GPIO_AD_B1_02: Daisy = Daisy::new(0x401f8530 as *mut u32, 1);
pub const DAISY_LPUART3_CTS_B_GPIO_EMC_15: Daisy = Daisy::new(0x401f8534 as *mut u32, 0);
pub const DAISY_LPUART3_CTS_B_GPIO_AD_B1_04: Daisy = Daisy::new(0x401f8534 as *mut u32, 1);
pub const DAISY_LPUART3_CT_GPIOS_B_EMC_15: Daisy = Daisy::new(0x401f8534 as *mut u32, 0);
pub const DAISY_LPUART3_CT_GPIOS_B_AD_B1_04: Daisy = Daisy::new(0x401f8534 as *mut u32, 1);
pub const DAISY_LPUART3_RX_GPIO_AD_B1_07: Daisy = Daisy::new(0x401f8538 as *mut u32, 0);
pub const DAISY_LPUART3_RX_GPIO_EMC_14: Daisy = Daisy::new(0x401f8538 as *mut u32, 1);
pub const DAISY_LPUART3_RX_GPIO_B0_09: Daisy = Daisy::new(0x401f8538 as *mut u32, 2);
Expand Down

0 comments on commit fd6d9e0

Please sign in to comment.