mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-21 23:19:00 +00:00
feat: add support for seesaw encoders
Adds the necessary function addresses for reading and writing encoders on a seesaw. Also provides two helper functions to make this easier.
This commit is contained in:
committed by
deadprogram
parent
a31ba26a6c
commit
857ab80ae6
@@ -98,3 +98,13 @@ const (
|
||||
FunctionKeypadCount FunctionAddress = 0x04
|
||||
FunctionKeypadFifo FunctionAddress = 0x10
|
||||
)
|
||||
|
||||
// encoder module function address registers
|
||||
// these are the defaults for encoder 0, change the lower nibble to address other encoders
|
||||
// see the Device.GetEncoderPosition and SetEncoderPosition methods for examples.
|
||||
const (
|
||||
FunctionEncoderIntenset FunctionAddress = 0x10
|
||||
FunctionEncoderIntenclr FunctionAddress = 0x20
|
||||
FunctionEncoderPosition FunctionAddress = 0x30
|
||||
FunctionEncoderDelta FunctionAddress = 0x40
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user