diff --git a/libraries/DAC8551/DAC8551.cpp b/libraries/DAC8551/DAC8551.cpp index 94a67f8b..a6bdd749 100644 --- a/libraries/DAC8551/DAC8551.cpp +++ b/libraries/DAC8551/DAC8551.cpp @@ -2,10 +2,11 @@ // FILE: DAC8551.cpp // AUTHOR: Rob Tillaart // PURPOSE: DAC8550 DAC8551 library for Arduino -// VERSION: 0.1.0 -// URL: +// VERSION: 0.1.1 +// URL: https://github.com/RobTillaart/Arduino/tree/master/libraries/DAC8551 // HISTORY: // 0.1.0: 2017-12-18 initial version +// 0.1.1: 2017-12-19 fix begin() bug // // Released to the public domain // @@ -32,15 +33,17 @@ DAC8551::DAC8551(uint8_t spiData, uint8_t spiClock, uint8_t slaveSelect) // and sets internal state void DAC8551::begin() { - pinMode(_spiData, OUTPUT); - pinMode(_spiClock, OUTPUT); - pinMode(_slaveSelect, OUTPUT); - if(_hwSPI) { SPI.begin(); delay(1); } + else + { + pinMode(_spiData, OUTPUT); + pinMode(_spiClock, OUTPUT); + pinMode(_slaveSelect, OUTPUT); + } _register = 0; _value = 0; diff --git a/libraries/DAC8551/DAC8551.h b/libraries/DAC8551/DAC8551.h index 9aa8cf45..53725c82 100644 --- a/libraries/DAC8551/DAC8551.h +++ b/libraries/DAC8551/DAC8551.h @@ -2,9 +2,9 @@ // FILE: DAC8551.h // AUTHOR: Rob Tillaart // PURPOSE: DAC8550 DAC8551 library for Arduino -// VERSION: 0.1.0 +// VERSION: 0.1.1 // HISTORY: See DAC8551.cpp -// URL: +// URL: https://github.com/RobTillaart/Arduino/tree/master/libraries/DAC8551 // // Released to the public domain // @@ -16,7 +16,7 @@ #define DAC8551_POWERDOWN_100K 2 #define DAC8551_POWERDOWN_HIGH_IMP 3 -#define DAC8551_LIB_VERSION (F("0.1.0 experimental")) +#define DAC8551_LIB_VERSION (F("0.1.1 experimental")) class DAC8551 { diff --git a/libraries/DAC8551/library.json b/libraries/DAC8551/library.json new file mode 100644 index 00000000..080c8db9 --- /dev/null +++ b/libraries/DAC8551/library.json @@ -0,0 +1,23 @@ +{ + "name": "DAC8551", + "keywords": "DAC8551 DAC8550 Digital Analog Convertor", + "description": "DAC8550 DAC8551 library for Arduino", + "authors": + [ + { + "name": "Rob Tillaart", + "email": "Rob.Tillaart@gmail.com", + "maintainer": true + } + ], + "repository": + { + "type": "git", + "url": "https://github.com/RobTillaart/Arduino.git" + }, + "frameworks": "arduino", + "platforms": "*", + "export": { + "include": "libraries/DAC8551" + } +} diff --git a/libraries/DAC8551/library.properties b/libraries/DAC8551/library.properties new file mode 100644 index 00000000..bbd79553 --- /dev/null +++ b/libraries/DAC8551/library.properties @@ -0,0 +1,9 @@ +name=DAC8551 +version=0.1.0 +author=Rob Tillaart +maintainer=Rob Tillaart +sentence=DAC8550 DAC8551 library for Arduino +paragraph= +category=Sensors +url=https://github.com/RobTillaart/Arduino/tree/master/libraries/ +architectures=* \ No newline at end of file