mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.1.3 TCA9555
This commit is contained in:
parent
d0045e9601
commit
5151d1c712
27
libraries/TCA9555/CHANGELOG.md
Normal file
27
libraries/TCA9555/CHANGELOG.md
Normal file
@ -0,0 +1,27 @@
|
||||
# Change Log TCA9555
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
|
||||
## [0.1.3] - 2022-11-25
|
||||
- Add RP2040 support to build-CI.
|
||||
- Add CHANGELOG.md
|
||||
- update readme.md
|
||||
|
||||
|
||||
## [0.1.2] - 2021-12-28
|
||||
- update Arduino-CI
|
||||
- update readme.md
|
||||
- update license
|
||||
- minor edits
|
||||
|
||||
## [0.1.1] - 2021-06-10
|
||||
- add 16 bit interface
|
||||
|
||||
|
||||
## [0.1.0] - 2021-06-09
|
||||
- initial version
|
||||
|
@ -107,14 +107,17 @@ See examples
|
||||
|
||||
|
||||
#### Must
|
||||
|
||||
- buy TCA9555 / TCA9535
|
||||
- test all functionality (initial version is written with no hardware around)
|
||||
- add TCA9535 error codes
|
||||
|
||||
#### Should
|
||||
- INPUT_PULLUP mappen op INPUT (pinMode ?)
|
||||
- investigate internal pull up etc.
|
||||
- add TCA9535 error codes
|
||||
- investigate TCA9535 differences
|
||||
- elaborate derived class
|
||||
|
||||
#### Could
|
||||
- rethink class hierarchy
|
||||
|
||||
- buy TCA9555 / TCA9535
|
||||
- rethink class hierarchy?
|
||||
- investigate internal pull up etc.
|
||||
|
||||
|
@ -1,15 +1,10 @@
|
||||
//
|
||||
// FILE: TCA9555.cpp
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.1.2
|
||||
// VERSION: 0.1.3
|
||||
// PURPOSE: Arduino library for I2C TCA9555 16 channel port expander
|
||||
// DATE: 2021-06-09
|
||||
// URL: https://github.com/RobTillaart/TCA9555
|
||||
//
|
||||
// HISTORY:
|
||||
// 0.1.0 2021-06-09 initial version
|
||||
// 0.1.1 2021-06-10 add 16 bit interface
|
||||
// 0.1.2 2021-12-28 update Arduino-CI, readme, license, minor edits
|
||||
|
||||
|
||||
#include "TCA9555.h"
|
||||
@ -64,7 +59,7 @@ bool TCA9555::isConnected()
|
||||
//
|
||||
// 1 PIN INTERFACE
|
||||
//
|
||||
bool TCA9555::pinMode(uint8_t pin, uint8_t mode)
|
||||
bool TCA9555::pinMode(uint8_t pin, uint8_t mode) // pin = 0..15
|
||||
{
|
||||
if (pin > 15)
|
||||
{
|
||||
@ -115,7 +110,7 @@ bool TCA9555::digitalWrite(uint8_t pin, uint8_t value) // pin = 0..15
|
||||
}
|
||||
|
||||
|
||||
uint8_t TCA9555::digitalRead(uint8_t pin)
|
||||
uint8_t TCA9555::digitalRead(uint8_t pin) // pin = 0..15
|
||||
{
|
||||
if (pin > 15)
|
||||
{
|
||||
@ -240,7 +235,7 @@ uint8_t TCA9555::getPolarity8(uint8_t port)
|
||||
if (port > 1)
|
||||
{
|
||||
_error = TCA9555_PORT_ERROR;
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
_error = TCA9555_OK;
|
||||
if (port == 0) return readRegister(TCA9555_POLARITY_REGISTER_0);
|
||||
@ -300,9 +295,9 @@ uint8_t TCA9555::getPolarity16()
|
||||
|
||||
int TCA9555::lastError()
|
||||
{
|
||||
int e = _error;
|
||||
int error = _error;
|
||||
_error = TCA9555_OK; // reset error after read.
|
||||
return e;
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// FILE: TCA9555.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.1.2
|
||||
// VERSION: 0.1.3
|
||||
// PURPOSE: Arduino library for I2C TCA9555 16 channel port expander
|
||||
// DATE: 2021-06-09
|
||||
// URL: https://github.com/RobTillaart/TCA9555
|
||||
@ -12,7 +12,7 @@
|
||||
#include "Wire.h"
|
||||
|
||||
|
||||
#define TCA9555_LIB_VERSION (F("0.1.2"))
|
||||
#define TCA9555_LIB_VERSION (F("0.1.3"))
|
||||
|
||||
#define TCA9555_OK 0x00
|
||||
#define TCA9555_PIN_ERROR 0x81
|
||||
|
@ -15,7 +15,7 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/RobTillaart/TCA9555.git"
|
||||
},
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.3",
|
||||
"license": "MIT",
|
||||
"frameworks": "arduino",
|
||||
"platforms": "*",
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=TCA9555
|
||||
version=0.1.2
|
||||
version=0.1.3
|
||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
sentence=Arduino library for I2C TCA9555 16 channel port expander - 16 IO-lines
|
||||
|
Loading…
x
Reference in New Issue
Block a user