Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Winc1500 pins #736

Merged
merged 2 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions boards/feather_m0/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Unreleased
- Added 'winc' feature for Feather with a WINC1500 Wifi chip

# v0.14.0

Expand Down
2 changes: 2 additions & 0 deletions boards/feather_m0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ dma = ["atsamd-hal/dma"]
max-channels = ["dma", "atsamd-hal/max-channels"]
# Enable pins for the adalogger SD card reader
adalogger = []
# Enable pins for Feather with WINC1500 wifi
winc = []
sdmmc = ["embedded-sdmmc", "atsamd-hal/sdmmc"]
rtic = ["atsamd-hal/rtic"]
use_semihosting = []
Expand Down
51 changes: 44 additions & 7 deletions boards/feather_m0/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@ pub mod pins {
}
}

#[cfg(all(feature = "rfm", not(feature = "express")))]
#[cfg(all(feature = "rfm", not(feature = "express"), not(feature = "winc")))]
PA06 {
/// SPI chip select for the RFM module
name: rfm_cs
}
#[cfg(all(feature = "rfm", not(feature = "express"), not(feature = "adalogger")))]
#[cfg(all(feature = "rfm", not(feature = "express"), not(feature = "adalogger"), not(feature = "winc")))]
PA08 {
/// Reset for the RFM module
name: rfm_reset
Expand All @@ -185,7 +185,7 @@ pub mod pins {
name: rfm_irq
}

#[cfg(all(feature = "express", not(feature = "rfm")))]
#[cfg(all(feature = "express", not(feature = "rfm"), not(feature = "winc")))]
PA06 {
/// Neopixel data
name: neopixel
Expand All @@ -196,12 +196,12 @@ pub mod pins {
/// SPI clock for the external flash
name: flash_sclk
}
#[cfg(all(feature = "express", not(feature = "rfm"), not(feature = "adalogger")))]
#[cfg(all(feature = "express", not(feature = "rfm"), not(feature = "adalogger"), not(feature = "winc")))]
PA08 {
/// SPI MOSI for the external flash
name: flash_mosi
}
#[cfg(feature = "express")]
#[cfg(all(feature = "express", not(feature= "winc")))]
PA14 {
/// SPI MISO for the external flash
name: flash_miso
Expand All @@ -212,22 +212,59 @@ pub mod pins {
name: flash_cs
}

#[cfg(all(feature = "adalogger", not(feature = "rfm"), not(feature = "express")))]
#[cfg(all(feature = "adalogger", not(feature = "rfm"), not(feature = "express"), not(feature = "winc")))]
PA08 {
/// SD card SPI chip select
name: sd_cs
aliases: {
PushPullOutput: SdCs
}
},
#[cfg(all(feature = "adalogger", not(feature = "rfm"), not(feature = "express")))]
#[cfg(all(feature = "adalogger", not(feature = "rfm"), not(feature = "express") , not(feature = "winc")))]
PA21 {
/// SD card detect
name: sd_cd
aliases: {
PullUpInput: SdCd
}
},

#[cfg(all(feature = "winc", not(feature = "rfm"), not(feature = "express"), not(feature = "adalogger")))]
PA08 {
/// Reset for the WINC1500 module
name: winc_rst
aliases: {
PushPullOutput: WincRst
}
},

#[cfg(all(feature = "winc", not(feature= "express")))]
PA14 {
/// Enable for the WINC1500 module
name: winc_ena
aliases: {
PushPullOutput: WincEna
}
}

#[cfg(all(feature = "winc", not(feature = "adalogger")))]
PA21 {
/// Interrupt for the WINC1500 module
name: winc_irq
aliases: {
PullUpInterrupt: WincIrq
}
},

#[cfg(all(feature = "winc", not(feature = "rfm"), not(feature = "express")))]
PA06 {
/// SPI chip select for the WINC1500 module
name: winc_cs
aliases: {
PushPullOutput: WincCs
}
},

);
}
pub use pins::*;
Expand Down
Loading