Skip to content

Commit

Permalink
Set PeripheryGPIOKey to Seq()
Browse files Browse the repository at this point in the history
We would like to use `HasPeripheryGPIO` more like `CanHavePeripheryGPIO`. Setting the `PeripheryGPIOKey` default to `Nil` lets us do this without adding a `WithNoGPIO` mixin to all our configurations.
  • Loading branch information
jerryz123 committed Nov 24, 2019
1 parent 9c9dfc2 commit 4bc6ed8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/devices/gpio/GPIOPeriphery.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import freechips.rocketchip.config.Field
import freechips.rocketchip.diplomacy._
import freechips.rocketchip.subsystem.BaseSubsystem

case object PeripheryGPIOKey extends Field[Seq[GPIOParams]]
case object PeripheryGPIOKey extends Field[Seq[GPIOParams]](Nil)

trait HasPeripheryGPIO { this: BaseSubsystem =>
val gpioNodes = p(PeripheryGPIOKey).map { ps => GPIO.attach(GPIOAttachParams(ps, pbus, ibus.fromAsync)).ioNode.makeSink }
Expand Down

0 comments on commit 4bc6ed8

Please sign in to comment.