projects
/
sifive-blocks.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e269550
)
pinctrl: Add the ability to convert EnhancedPin to BasePin
enhanced_to_base_pin
author
Megan Wachs
<megan@sifive.com>
Fri, 6 Oct 2017 20:43:23 +0000
(13:43 -0700)
committer
Megan Wachs
<megan@sifive.com>
Fri, 6 Oct 2017 20:43:23 +0000
(13:43 -0700)
src/main/scala/devices/pinctrl/PinCtrl.scala
patch
|
blob
|
history
diff --git
a/src/main/scala/devices/pinctrl/PinCtrl.scala
b/src/main/scala/devices/pinctrl/PinCtrl.scala
index f487d390963d2e44d7261b27644466b42e97d7b0..aadb4e7525aed4ba628ea5a7d461402d220e3296 100644
(file)
--- a/
src/main/scala/devices/pinctrl/PinCtrl.scala
+++ b/
src/main/scala/devices/pinctrl/PinCtrl.scala
@@
-100,4
+100,11
@@
class EnhancedPin extends Pin() {
this.o.ds := ds
this.o.ie := ie
}
+
+ def toBasePin(): BasePin = {
+
+ val base_pin = Wire(new BasePin())
+ base_pin <> this
+ base_pin
+ }
}