Skip to content

Commit

Permalink
Changed the MCP4461 get value function to be const.
Browse files Browse the repository at this point in the history
  • Loading branch information
reprappro committed Jun 17, 2014
1 parent 48b00f3 commit 5fcee7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions MCP4461/MCP4461.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Library to control the MCP4461 Digital Potentiometer over I2C.
http://ww1.microchip.com/downloads/en/DeviceDoc/22265a.pdf
This library does not fully implement the functionality of
the MCP4461 just the basics of changing the wiper values.
the MCP4461 just the basics of changing the wiper values.
Note this is currently configured to use the second I2C bus
on the Due: Wire1
The master joins the bus with the default address of 0
Expand Down Expand Up @@ -174,7 +174,7 @@ void MCP4461::setNonVolatileWipers(uint16_t wiper_value){
}

//return the value for a specific wiper
uint16_t MCP4461::getNonVolatileWiper(uint8_t wiper){
uint16_t MCP4461::getNonVolatileWiper(uint8_t wiper) const{
uint16_t ret = 0;
uint16_t c_byte =0;
switch (wiper) {
Expand Down
2 changes: 1 addition & 1 deletion MCP4461/MCP4461.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class MCP4461{
void setNonVolatileWipers(uint16_t);
void toggleWiper(uint8_t); //NOT YET IMPLEMENTED
uint16_t getVolatileWiper(uint8_t);
uint16_t getNonVolatileWiper(uint8_t);
uint16_t getNonVolatileWiper(uint8_t) const;
uint16_t getStatus();

private:
Expand Down

0 comments on commit 5fcee7f

Please sign in to comment.