Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

Commit

Permalink
ResourceDataUserInvertible: use refinement, drop the generic argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed May 25, 2024
1 parent 4fd7644 commit 8db5073
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import chisel3._

class Button
extends ResourceData[Bool](Input(Bool()))
with ResourceDataUserInvertible[Bool] {}
with ResourceDataUserInvertible {}

object Button {
def apply() = new Button
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/ee/hrzn/chryse/platform/resource/LED.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import chisel3._

class LED
extends ResourceData[Bool](Output(Bool()))
with ResourceDataUserInvertible[Bool] {}
with ResourceDataUserInvertible {}

object LED {
def apply() = new LED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ee.hrzn.chryse.chisel.DirectionOf

import scala.language.implicitConversions

trait ResourceDataUserInvertible[HW <: Data] extends ResourceData[HW] {
trait ResourceDataUserInvertible { this: ResourceData[_] =>
def inverted: this.type = {
_invert = true
this
Expand Down

0 comments on commit 8db5073

Please sign in to comment.