From 94f8c1705d84ebd54a83df17e1610596f0e0c737 Mon Sep 17 00:00:00 2001 From: Megan Wachs Date: Fri, 6 Oct 2017 13:43:23 -0700 Subject: [PATCH] pinctrl: Add the ability to convert EnhancedPin to BasePin --- src/main/scala/devices/pinctrl/PinCtrl.scala | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/scala/devices/pinctrl/PinCtrl.scala b/src/main/scala/devices/pinctrl/PinCtrl.scala index f487d39..aadb4e7 100644 --- 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 + } } -- 2.30.2