0.3.0 AD56X8

This commit is contained in:
Rob Tillaart 2024-01-19 14:23:07 +01:00
parent 43390bea53
commit e2c3c70e85
11 changed files with 33 additions and 11 deletions

View File

@ -1,7 +1,7 @@
//
// FILE: AD56X8.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.2.1
// VERSION: 0.3.0
// DATE: 2022-07-28
// PURPOSE: Arduino library for AD56X8, SPI 8 channel Digital Analog Convertor.
@ -53,9 +53,9 @@ void AD56X8::begin()
if(_hwSPI)
{
_mySPI->end();
_mySPI->begin();
delay(1);
// _mySPI->end();
// _mySPI->begin();
// delay(1);
}
else // SOFTWARE SPI
{

View File

@ -2,7 +2,7 @@
//
// FILE: AD56X8.h
// AUTHOR: Rob Tillaart
// VERSION: 0.2.1
// VERSION: 0.3.0
// DATE: 2022-07-28
// PURPOSE: Arduino library for AD56X8, SPI 8 channel Digital Analog Convertor.
@ -10,7 +10,7 @@
#include "Arduino.h"
#include "SPI.h"
#define AD56X8_LIB_VERSION (F("0.2.1"))
#define AD56X8_LIB_VERSION (F("0.3.0"))
#ifndef __SPI_CLASS__

View File

@ -6,12 +6,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.3.0] - 2024-01-19
- fix #10, improve handling SPI dependency.
----
## [0.2.1] - 2024-01-02
- fix __SPI_CLASS__
- fix examples
- minor edits
## [0.2.0] - 2023-11-27
- refactor constructor interface - breaking changes.
- minimize conditional code. -- create SPI_CLASS macro to solve it.

View File

@ -44,6 +44,13 @@ At least it lacks support for:
- other points mentioned in future section below.
#### 0.3.0 Breaking change
Version 0.3.0 introduced a breaking change to improve handling the SPI dependency.
The user has to call **SPI.begin()** or equivalent before calling **AD.begin()**.
Optionally the user can provide parameters to the **SPI.begin(...)**
#### 0.2.0 breaking change
The version 0.2.0 has breaking changes in the interface.

View File

@ -7,11 +7,13 @@
#include "AD56X8.h"
AD56X8 AD16_HW(8);
AD56X8 AD16_SW(9, 10, 11);
uint32_t start, stop;
void setup()
{
Serial.begin(115200);
@ -20,6 +22,7 @@ void setup()
Serial.print("AD56X8_LIB_VERSION: ");
Serial.println(AD56X8_LIB_VERSION);
SPI.begin();
AD16_HW.begin();
AD16_SW.begin();
@ -66,7 +69,6 @@ void setup()
delay(10);
}
Serial.println("\nDone...");
}

View File

@ -4,8 +4,10 @@
// PURPOSE: test
// URL: https://github.com/RobTillaart/AD56X8
#include "AD56X8.h"
AD56X8 AD16_HW(8);
AD56X8 AD16_SW(9, 10, 11);
@ -18,6 +20,7 @@ void setup()
Serial.print("AD56X8_LIB_VERSION: ");
Serial.println(AD56X8_LIB_VERSION);
SPI.begin();
AD16_HW.begin();
AD16_SW.begin();

View File

@ -21,6 +21,7 @@ AD56X8 AD16_SW(15, 13, 14);
int value = 0;
void setup()
{
Serial.begin(115200);
@ -29,6 +30,7 @@ void setup()
Serial.print("AD56X8_LIB_VERSION: ");
Serial.println(AD56X8_LIB_VERSION);
myspi->begin();
AD16_HW.begin();
AD16_SW.begin();

View File

@ -7,8 +7,10 @@
#include "AD56X8.h"
AD5648 AD(8);
void setup()
{
Serial.begin(115200);
@ -17,6 +19,7 @@ void setup()
Serial.print("AD56X8_LIB_VERSION: ");
Serial.println(AD56X8_LIB_VERSION);
SPI.begin();
AD.begin();
for (int chan = 0; chan < 8; chan++)

View File

@ -7,7 +7,8 @@
#include "AD56X8.h"
AD56X8 AD16_SW(9, 10, 11);
AD56X8 AD16_SW(9, 10, 11); // SW SPI
uint32_t start, stop;

View File

@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/AD56X8.git"
},
"version": "0.2.1",
"version": "0.3.0",
"license": "MIT",
"frameworks": "*",
"platforms": "*",

View File

@ -1,5 +1,5 @@
name=AD56X8
version=0.2.1
version=0.3.0
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library for AD56X8, SPI 8 channel Digital Analog Convertor.