-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Share common pads across 1050 and 1060
Before this commit, a diff of the 1050 and 1060 directories, like diff -ur src/imxrt1050 src/imxrt1060 showed that these modules were basically identical. The only differences: 1. The 1060 has additional GPIO_SPI_* pads that aren't on the 1050. 2. The 1060 has FlexIO3. 3. The 1060 has SAI3. We can handle these similarities through the module system, instead of duplicating code. This commit consolidates the common pad definitions and implementations into their own module. We build with that module whenever the user enables a 1050 or 1060 feature. By consolidating most pin implementations here, they'll be available on both MCUs without duplication. The 1050 directory re-exports all common pad modules and defines the top-level `Pads` type. The 1060 does the same, and it also defines those GPIO_SPI_* modules. This handles difference 1. The 1060 defines its own flexio and sai modules where it provides its additional implementations. This handles differences 2 and 3.
- Loading branch information
Showing
24 changed files
with
98 additions
and
2,512 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//! Definitions shared between the 1050 and 1060 MCUs. | ||
//! | ||
//! The 1060 pads are an extension of the 1050 pads. This module contains the | ||
//! definitions common to both MCUs. | ||
mod adc; | ||
mod flexcan; | ||
mod flexio; | ||
mod flexpwm; | ||
mod lpi2c; | ||
mod lpspi; | ||
mod lpuart; | ||
mod sai; | ||
mod usdhc; | ||
|
||
use pads::*; | ||
pub(crate) mod pads; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.