pinctrl: Add the ability to convert EnhancedPin to BasePin enhanced_to_base_pin
authorMegan Wachs <megan@sifive.com>
Fri, 6 Oct 2017 20:43:23 +0000 (13:43 -0700)
committerMegan Wachs <megan@sifive.com>
Fri, 6 Oct 2017 20:43:23 +0000 (13:43 -0700)
src/main/scala/devices/pinctrl/PinCtrl.scala

index f487d39..aadb4e7 100644 (file)
@@ -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
+  }
 }