mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.3.0 HC4051
This commit is contained in:
parent
3bc3891230
commit
3621777c7f
@ -6,6 +6,12 @@ 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-08-14
|
||||
- Fix for setChannel(), Thanks to C. Fraser!
|
||||
- update readme.md
|
||||
|
||||
----
|
||||
|
||||
## [0.2.1] - 2024-05-28
|
||||
- change return type of **bool setChannel()**
|
||||
- verify the channel parameter of **bool setChannel()**
|
||||
|
@ -3,7 +3,7 @@
|
||||
// FILE: HC4051.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// DATE: 2023-01-25
|
||||
// VERSION: 0.2.1
|
||||
// VERSION: 0.3.0
|
||||
// PURPOSE: Arduino library for CD74HC4051 1 x 8 channel multiplexer and compatibles.
|
||||
// URL: https://github.com/RobTillaart/HC4051
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
#define HC4051_LIB_VERSION (F("0.2.1"))
|
||||
#define HC4051_LIB_VERSION (F("0.3.0"))
|
||||
|
||||
|
||||
class HC4051
|
||||
@ -57,8 +57,9 @@ public:
|
||||
// only write changed pins. // AVR only?
|
||||
if (mask & _changed)
|
||||
{
|
||||
digitalWrite(_pins[i--], (mask & _new));
|
||||
digitalWrite(_pins[i], (mask & _new));
|
||||
}
|
||||
i--;
|
||||
mask >>= 1;
|
||||
}
|
||||
enable();
|
||||
|
@ -31,6 +31,10 @@ The channel selection is done with four select lines **A, B, C**
|
||||
|
||||
The device can be enabled/disabled by the enable line **INH**
|
||||
|
||||
### 0.3.0 breaking change
|
||||
|
||||
Version 0.3.0 has a bugfix for **setChannel()** which obsolete all previous versions.
|
||||
|
||||
|
||||
#### Compatibles
|
||||
|
||||
@ -99,7 +103,7 @@ This will result in another subset of the Y pins to select from.
|
||||
#include "HC4051.h"
|
||||
```
|
||||
|
||||
#### Core
|
||||
### Core
|
||||
|
||||
- **HC4051(uint8_t A, uint8_t B, uint8_t C, uint8_t enablePin = 255)** constructor.
|
||||
Set the three select pins and optional the enable pin.
|
||||
@ -118,7 +122,7 @@ Note the device cannot be disabled if there is no enable pin configured.
|
||||
The selected channel is also returned when the multiplexer is disabled.
|
||||
|
||||
|
||||
#### Enable
|
||||
### Enable
|
||||
|
||||
These functions work only if a valid **enablePin** is set in the constructor.
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/RobTillaart/HC4051.git"
|
||||
},
|
||||
"version": "0.2.1",
|
||||
"version": "0.3.0",
|
||||
"license": "MIT",
|
||||
"frameworks": "*",
|
||||
"platforms": "*",
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=HC4051
|
||||
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 a HC4051 1x8 channel multiplexer
|
||||
|
Loading…
Reference in New Issue
Block a user