Skip to content

Commit

Permalink
Add Winc1500 pins (#736)
Browse files Browse the repository at this point in the history
* Add Winc1500 pins to feather_m0 BSP
  • Loading branch information
kaidokert authored Jun 12, 2024
1 parent dda58d6 commit 0fd342e
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 7 deletions.
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

0 comments on commit 0fd342e

Please sign in to comment.