0.1.1 experimental DAC8551

This commit is contained in:
RobTillaart 2017-12-19 11:36:49 +01:00
parent 190e6c98d3
commit 07c15868f4
4 changed files with 44 additions and 9 deletions

View File

@ -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;

View File

@ -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
{

View File

@ -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"
}
}

View File

@ -0,0 +1,9 @@
name=DAC8551
version=0.1.0
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=DAC8550 DAC8551 library for Arduino
paragraph=
category=Sensors
url=https://github.com/RobTillaart/Arduino/tree/master/libraries/
architectures=*