mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-09-19 16:46:11 -04:00
0.1.1 experimental DAC8554
This commit is contained in:
parent
07c15868f4
commit
a00dce420e
@ -2,10 +2,11 @@
|
||||
// FILE: DAC8552.cpp
|
||||
// AUTHOR: Rob Tillaart
|
||||
// PURPOSE: DAC8552 library for Arduino
|
||||
// VERSION: 0.1.0
|
||||
// URL:
|
||||
// VERSION: 0.1.1
|
||||
// URL: https://github.com/RobTillaart/Arduino/tree/master/libraries/DAC8552
|
||||
// HISTORY:
|
||||
// 0.1.0: 2017-12-14 initial version
|
||||
// 0.1.1: 2017-12-19 fix begin() bug
|
||||
//
|
||||
// Released to the public domain
|
||||
//
|
||||
@ -35,15 +36,17 @@ DAC8552::DAC8552(uint8_t spiData, uint8_t spiClock, uint8_t slaveSelect)
|
||||
// and sets internal state
|
||||
void DAC8552::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);
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < 2; i++)
|
||||
{
|
||||
|
@ -2,9 +2,9 @@
|
||||
// FILE: DAC8552.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// PURPOSE: DAC8552 library for Arduino
|
||||
// VERSION: 0.1.0
|
||||
// VERSION: 0.1.1
|
||||
// HISTORY: See DAC8552.cpp
|
||||
// URL:
|
||||
// URL: https://github.com/RobTillaart/Arduino/tree/master/libraries/DAC8552
|
||||
//
|
||||
// Released to the public domain
|
||||
//
|
||||
@ -16,7 +16,7 @@
|
||||
#define DAC8552_POWERDOWN_100K 2
|
||||
#define DAC8552_POWERDOWN_HIGH_IMP 3
|
||||
|
||||
#define DAC8552_LIB_VERSION (F("0.1.0 experimental"))
|
||||
#define DAC8552_LIB_VERSION (F("0.1.1 experimental"))
|
||||
|
||||
class DAC8552
|
||||
{
|
||||
|
23
libraries/DAC8552/library.json
Normal file
23
libraries/DAC8552/library.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "DAC8552",
|
||||
"keywords": "DAC8552 Digital Analog Convertor",
|
||||
"description": "DAC8552 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/DAC8552"
|
||||
}
|
||||
}
|
9
libraries/DAC8552/library.properties
Normal file
9
libraries/DAC8552/library.properties
Normal file
@ -0,0 +1,9 @@
|
||||
name=DAC8552
|
||||
version=0.1.1
|
||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
sentence=DAC8552 library for Arduino
|
||||
paragraph=
|
||||
category=Sensors
|
||||
url=https://github.com/RobTillaart/Arduino/tree/master/libraries/
|
||||
architectures=*
|
Loading…
Reference in New Issue
Block a user