Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a - hopefully - non-breaking change that removes all Scroll pHAT HD specific methods from the IS31FL3731 class and moves them into
__init__.py
, making the underlying driver class a cleaner representation of the device, and__init__.py
a cleaner representation of Scroll pHAT HDs features.This is a pre-requisite to supporting alternate i2c bus addresses and underlying transports and aims to lay the groundwork for #54 and also #55.
Under normal circumstances the device will be
setup()
on demand when ashow()
call is issued, but a manual call tosetup()
should allow the specification of an alternate i2c address and transport class, providing it implements a set of required methods:write_byte_data(address, register, value)
read_byte_data(address, register)
returnsvalue
write_i2c_block_data(address, register, values)
This could, for example, be an
smbus.SMBus()
object or ansmbus2.SMBus()
object depending upon preference and platform availability, or it could be a wrapper aroundpigpio
allowing for remote control of a Scroll pHAT HD.