Control Surface  1.2.0
MIDI Control Surface library for Arduino
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MCP23017Encoders< WireType, EncoderPositionType, InterruptSafe >::MCP23017Encoder Class Reference

Proxy to access a single encoder of the 8 encoders managed by MCP23017Encoders. More...

#include <AH/Hardware/MCP23017Encoders.hpp>

+ Collaboration diagram for MCP23017Encoders< WireType, EncoderPositionType, InterruptSafe >::MCP23017Encoder:

Public Member Functions

EncoderPositionType read () const
 Read the position of the encoder. More...
 
EncoderPositionType readAndReset ()
 Read the position of the encoder and reset it to zero. More...
 
void write (EncoderPositionType pos)
 Set the position of the encoder. More...
 

Private Member Functions

 MCP23017Encoder (EncoderPositionStorageType *position)
 

Private Attributes

EncoderPositionStorageTypeposition
 A pointer to the position value inside of the MCP23017Encoders class. More...
 

Detailed Description

template<class WireType, class EncoderPositionType = int32_t, bool InterruptSafe = false>
class AH::MCP23017Encoders< WireType, EncoderPositionType, InterruptSafe >::MCP23017Encoder

Proxy to access a single encoder of the 8 encoders managed by MCP23017Encoders.

Definition at line 314 of file MCP23017Encoders.hpp.

Constructor & Destructor Documentation

◆ MCP23017Encoder()

MCP23017Encoder ( EncoderPositionStorageType position)
inlineprivate

Definition at line 321 of file MCP23017Encoders.hpp.

Member Function Documentation

◆ read()

EncoderPositionType read ( ) const
inline

Read the position of the encoder.

See also
MCP23017Encoders::read

Definition at line 327 of file MCP23017Encoders.hpp.

◆ readAndReset()

EncoderPositionType readAndReset ( )
inline

Read the position of the encoder and reset it to zero.

See also
MCP23017Encoders::readAndReset

Definition at line 340 of file MCP23017Encoders.hpp.

◆ write()

void write ( EncoderPositionType  pos)
inline

Set the position of the encoder.

See also
MCP23017Encoders::write

Definition at line 356 of file MCP23017Encoders.hpp.

Member Data Documentation

◆ position

EncoderPositionStorageType* position
private

A pointer to the position value inside of the MCP23017Encoders class.

Definition at line 319 of file MCP23017Encoders.hpp.


The documentation for this class was generated from the following file: