0.2.1 MCP_DAC

This commit is contained in:
Rob Tillaart 2023-11-13 16:59:44 +01:00
parent 78669581ce
commit fb7d506716
6 changed files with 34 additions and 11 deletions

View File

@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.2.1] - 2023-11-13
- update readme.md
## [0.2.0] - 2023-03-23
- fix #21 bug LDAC invert
- fix **setPercentage()**

View File

@ -1,7 +1,7 @@
//
// FILE: MCP_DAC.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.2.0
// VERSION: 0.2.1
// DATE: 2021-02-03
// PURPOSE: Arduino library for MCP_DAC
// URL: https://github.com/RobTillaart/MCP_DAC

View File

@ -2,7 +2,7 @@
//
// FILE: MCP_DAC.h
// AUTHOR: Rob Tillaart
// VERSION: 0.2.0
// VERSION: 0.2.1
// DATE: 2021-02-03
// PURPOSE: Arduino library for MCP_DAC
// URL: https://github.com/RobTillaart/MCP_DAC
@ -12,7 +12,7 @@
#include "SPI.h"
#define MCP_DAC_LIB_VERSION (F("0.2.0"))
#define MCP_DAC_LIB_VERSION (F("0.2.1"))
///////////////////////////////////////////////////////////////
@ -23,6 +23,7 @@ class MCP_DAC
{
public:
// if no pins defined, => HW-SPI
#if defined(ARDUINO_ARCH_RP2040)
MCP_DAC(uint8_t dataOut = 255, uint8_t clock = 255, SPIClassRP2040 *mySPI = &SPI);
#else
@ -32,9 +33,9 @@ public:
// if only select is given ==> HW SPI
void begin(uint8_t select);
// 0 or 1
// returns 0 or 1
uint8_t channels();
// 255 (8 bit) or 1023 (10 bit) or 4095 (12 bit)
// returns 255 (=8 bit) or 1023 (=10 bit) or 4095 (=12 bit)
uint16_t maxValue();
// gain = 1 or 2

View File

@ -2,8 +2,11 @@
[![Arduino CI](https://github.com/RobTillaart/MCP_DAC/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
[![Arduino-lint](https://github.com/RobTillaart/MCP_DAC/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/MCP_DAC/actions/workflows/arduino-lint.yml)
[![JSON check](https://github.com/RobTillaart/MCP_DAC/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/MCP_DAC/actions/workflows/jsoncheck.yml)
[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/MCP_DAC.svg)](https://github.com/RobTillaart/MCP_DAC/issues)
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/MCP_DAC/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/RobTillaart/MCP_DAC.svg?maxAge=3600)](https://github.com/RobTillaart/MCP_DAC/releases)
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/MCP_DAC.svg)](https://registry.platformio.org/libraries/robtillaart/MCP_DAC)
# MCP_DAC
@ -247,15 +250,21 @@ See examples
- test test test and ....
- improve documentation.
#### Should
#### Could
- functional names for magic masks.
- refactor the API (how).
- minimize conditional in code if possible.
- functional names for magic masks.
- would this work?
```cpp
#if defined(ARDUINO_ARCH_RP2040)
#define _mySPIClass SPIClassRP2040
#else
#define _mySPIClass SPIClass
#endif
```
#### Wont
@ -268,3 +277,12 @@ See examples
- would reduce conditional code.
- does not improve library
## Support
If you appreciate my libraries, you can support the development and maintenance.
Improve the quality of the libraries by providing issues and Pull Requests, or
donate through PayPal or GitHub sponsors.
Thank you,

View File

@ -15,9 +15,9 @@
"type": "git",
"url": "https://github.com/RobTillaart/MCP_DAC"
},
"version": "0.2.0",
"version": "0.2.1",
"license": "MIT",
"frameworks": "arduino",
"frameworks": "*",
"platforms": "*",
"headers": "MCP_DAC.h"
}

View File

@ -1,5 +1,5 @@
name=MCP_DAC
version=0.2.0
version=0.2.1
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library for Microchip SPI DAC, 8, 10, 12 bit; 1 or 2 channel.