diff --git a/libraries/DAC8551/DAC8551.cpp b/libraries/DAC8551/DAC8551.cpp index 95a18a6d..feb9eaa8 100644 --- a/libraries/DAC8551/DAC8551.cpp +++ b/libraries/DAC8551/DAC8551.cpp @@ -2,7 +2,7 @@ // FILE: DAC8551.cpp // AUTHOR: Rob Tillaart // PURPOSE: Arduino library for DAC8551 SPI Digital Analog Convertor -// VERSION: 0.2.2 +// VERSION: 0.2.3 // URL: https://github.com/RobTillaart/DAC8551 // // HISTORY @@ -13,6 +13,7 @@ // 0.2.0 2020-12-18 add slaveSelect to hardware SPI // 0.2.1 2020-12-18 add arduino-ci + unit tests // 0.2.2 2021-02-04 add DAC8550 DAC8501 DAC8501 derived class + minor refactor +// 0.2.3 2021-06-02 compile ESP32 #include "DAC8551.h" @@ -75,7 +76,7 @@ uint16_t DAC8551::getValue() void DAC8551::setPowerDown(uint8_t powerDownMode) { - _register = powerDownMode; + _register = (powerDownMode & 0x03); updateDevice(); } diff --git a/libraries/DAC8551/DAC8551.h b/libraries/DAC8551/DAC8551.h index 357e9627..7ae7d7bb 100644 --- a/libraries/DAC8551/DAC8551.h +++ b/libraries/DAC8551/DAC8551.h @@ -4,16 +4,17 @@ // AUTHOR: Rob Tillaart // PURPOSE: Arduino library for DAC8551 SPI Digital Analog Convertor // could work with DAC8550, not tested -// VERSION: 0.2.2 +// VERSION: 0.2.3 // HISTORY: See DAC8551.cpp // URL: https://github.com/RobTillaart/DAC8551 // +#include "Arduino.h" #include "SPI.h" -#define DAC8551_LIB_VERSION (F("0.2.2")) +#define DAC8551_LIB_VERSION (F("0.2.3")) #define DAC8551_POWERDOWN_NORMAL 0 diff --git a/libraries/DAC8551/library.json b/libraries/DAC8551/library.json index d04fde83..2a815be7 100644 --- a/libraries/DAC8551/library.json +++ b/libraries/DAC8551/library.json @@ -15,7 +15,7 @@ "type": "git", "url": "https://github.com/RobTillaart/DAC8551" }, - "version": "0.2.2", + "version": "0.2.3", "license": "MIT", "frameworks": "arduino", "platforms": "*" diff --git a/libraries/DAC8551/library.properties b/libraries/DAC8551/library.properties index ab3e1f2e..d85961f1 100644 --- a/libraries/DAC8551/library.properties +++ b/libraries/DAC8551/library.properties @@ -1,5 +1,5 @@ name=DAC8551 -version=0.2.2 +version=0.2.3 author=Rob Tillaart maintainer=Rob Tillaart sentence=Arduino library for DAC8501, DAC8531, DAC8550 and DAC8551 SPI 16-bit Digital Analog Convertor