0.1.5 DEVNULL

This commit is contained in:
rob tillaart 2022-10-31 19:46:02 +01:00
parent 955c94007d
commit 08e1246a9a
7 changed files with 79 additions and 32 deletions

View File

@ -1,3 +1,18 @@
platforms:
rpipico:
board: rp2040:rp2040:rpipico
package: rp2040:rp2040
gcc:
features:
defines:
- ARDUINO_ARCH_RP2040
warnings:
flags:
packages:
rp2040:rp2040:
url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
compile:
# Choosing to run compilation tests on 2 different Arduino platforms
platforms:
@ -7,5 +22,7 @@ compile:
# - leonardo
- m4
- esp32
# - esp8266
# - mega2560
- esp8266
# - mega2560
- rpipico

View File

@ -0,0 +1,34 @@
# Change Log DEVNULL
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.5] - 2022-10-31
- add changelog.md
- add rp2040 to build-CI
## [0.1.4] - 2022-09-21
- split up .h in .cpp and .h
- add **lastByte()** to check last byte written.
## [0.1.3] - 2021-12-15
- update library.json, license, minor edits
## [0.1.2] - 2021-11-24
- update build-CI
- add badges
- sets the timeout for reading to 0. No need to wait longer with DEVNULL.
this improves the **find(...)** calls substantially.
- added **size_t write( const uint8_t \*buffer, size_t size)** for faster string processing.
## [0.1.1] - 2020-12-18
- add Arduino-CI.
## [0.1.0] - 2020-06-23
- initial version

View File

@ -1,18 +1,12 @@
//
// FILE: DEVNULL.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.1.4
// VERSION: 0.1.5
// PURPOSE: Arduino library for a /dev/null stream - useful for testing
// URL: https://github.com/RobTillaart/DEVNULL
//
// HISTORY:
// 0.1.0 2020-06-23 initial version.
// 0.1.1 2020-12-18 add Arduino-CI.
// 0.1.2 2021-11-24 update build-CI, badges, etc.
// added write(data, length) + _timeOut.
// 0.1.3 2021-12-15 update library.json, license, minor edits
// 0.1.4 2022-09-21 split up .h in .cpp and .h
// add last() to check last byte written to.
// HISTORY: see changelog.md
#include "DEVNULL.h"
@ -23,11 +17,26 @@ DEVNULL::DEVNULL()
_bottomLessPit = -1; // nothing in the pit
}
int DEVNULL::available() { return 0; };
int DEVNULL::peek() { return EOF; };
int DEVNULL::read() { return EOF; };
int DEVNULL::available()
{
return 0;
};
int DEVNULL::peek()
{
return EOF;
};
int DEVNULL::read()
{
return EOF;
};
// placeholder to keep CI happy
void DEVNULL::flush() { return; };
void DEVNULL::flush()
{
return;
};
size_t DEVNULL::write(const uint8_t data)
{

View File

@ -2,14 +2,14 @@
//
// FILE: DEVNULL.h
// AUTHOR: Rob Tillaart
// VERSION: 0.1.4
// VERSION: 0.1.5
// PURPOSE: Arduino library for a /dev/null stream - useful for testing
// URL: https://github.com/RobTillaart/DEVNULL
#include "Arduino.h"
#define DEVNULL_LIB_VERSION (F("0.1.4"))
#define DEVNULL_LIB_VERSION (F("0.1.5"))
class DEVNULL : public Stream

View File

@ -30,19 +30,6 @@ with only a return 0; (or at least **print(Type)** as the **println(T)** would o
call once extra for the "\n".
## Versions
#### 0.1.2
- sets the timeout for reading to 0. No need to wait longer with DEVNULL.
this improves the **find(...)** calls substantially.
- added **size_t write( const uint8_t \*buffer, size_t size)** for faster string processing.
#### 0.1.4
- add **lastByte()** to check last byte written.
- split of .cpp
## Interface
- **DEVNULL()** constructor, sets the timeout to zero.

View File

@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/DEVNULL.git"
},
"version": "0.1.4",
"version": "0.1.5",
"license": "MIT",
"frameworks": "arduino",
"platforms": "*",

View File

@ -1,5 +1,5 @@
name=DEVNULL
version=0.1.4
version=0.1.5
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library for a /dev/null stream