Skip to content

Commit

Permalink
OneWire::Bus can just inherit from CBitBang
Browse files Browse the repository at this point in the history
  • Loading branch information
vickash committed Sep 29, 2024
1 parent d11ceb0 commit ab1c576
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/denko/one_wire/bus.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module Denko
module OneWire
class Bus
include Behaviors::SinglePin
class Bus < DigitalIO::CBitBang
include Behaviors::BusControllerAddressed
include Behaviors::Reader
include Behaviors::Lifecycle
Expand All @@ -11,9 +10,6 @@ class Bus
attr_reader :parasite_power

after_initialize do
# Set input mode to force upfront pin validation.
self.mode = :input

read_power_supply
end

Expand Down

0 comments on commit ab1c576

Please sign in to comment.