mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.1.2 DEVFULL
This commit is contained in:
parent
afe39794bd
commit
955c94007d
@ -1,11 +1,28 @@
|
||||
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:
|
||||
- uno
|
||||
- due
|
||||
- zero
|
||||
- leonardo
|
||||
# - due
|
||||
# - zero
|
||||
# - leonardo
|
||||
- m4
|
||||
- esp32
|
||||
- esp8266
|
||||
- mega2560
|
||||
# - mega2560
|
||||
- rpipico
|
||||
|
||||
|
18
libraries/DEVFULL/CHANGELOG.md
Normal file
18
libraries/DEVFULL/CHANGELOG.md
Normal file
@ -0,0 +1,18 @@
|
||||
# Change Log DEVFULL
|
||||
|
||||
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.2] - 2022-10-31
|
||||
- add changelog.md
|
||||
- add rp2040 to build-CI
|
||||
|
||||
## [0.1.1] - 2022-07-01
|
||||
- add limits.h INT_MAX to support 32 bit int.
|
||||
|
||||
## [0.1.0] - 2022-03-11
|
||||
- initial version
|
||||
|
@ -2,21 +2,18 @@
|
||||
//
|
||||
// FILE: DEVFULL.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.1.1
|
||||
// VERSION: 0.1.2
|
||||
// PURPOSE: Arduino library for a /dev/full stream - useful for testing / debugging.
|
||||
// URL: https://github.com/RobTillaart/DEVFULL
|
||||
//
|
||||
// HISTORY:
|
||||
// 0.1.0 2022-03-11 initial version.
|
||||
// 0.1.1 2022-07-01 add limits.h INT_MAX to support 32 bit int.
|
||||
|
||||
// HISTORY: see changelog.md
|
||||
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "limits.h"
|
||||
|
||||
|
||||
#define DEVFULL_LIB_VERSION (F("0.1.1"))
|
||||
#define DEVFULL_LIB_VERSION (F("0.1.2"))
|
||||
|
||||
|
||||
#ifndef ENOSPC
|
||||
@ -34,23 +31,23 @@ class DEVFULL : public Stream
|
||||
public:
|
||||
DEVFULL()
|
||||
{
|
||||
setTimeout(0); // no timeout.
|
||||
setTimeout(0); // no timeout.
|
||||
};
|
||||
|
||||
int available() { return INT_MAX; };
|
||||
int peek() { return 0; };
|
||||
int read() { return 0; };
|
||||
void flush() { return; }; // placeholder to keep build CI happy
|
||||
void flush() { return; }; // placeholder to keep build CI happy
|
||||
|
||||
size_t write(const uint8_t data)
|
||||
{
|
||||
dummy = data; // keep compiler happy
|
||||
dummy = data; // keep compiler happy
|
||||
return -28;
|
||||
};
|
||||
|
||||
size_t write( const uint8_t *buffer, size_t size)
|
||||
{
|
||||
dummy = buffer[size-1]; // keep compiler happy
|
||||
dummy = buffer[size-1]; // keep compiler happy
|
||||
return -28;
|
||||
};
|
||||
|
||||
|
@ -23,12 +23,6 @@ This causes a return value of n x -28 ==> mostly a number in the 65xxx range
|
||||
See - https://en.wikipedia.org/wiki//dev/full
|
||||
|
||||
|
||||
## Versions
|
||||
|
||||
- 0.1.0 is a minimal implementation.
|
||||
- 0.1.1 implements INT_MAX
|
||||
|
||||
|
||||
## Interface
|
||||
|
||||
- **DEVFULL()** constructor, sets the timeout to zero.
|
||||
@ -62,4 +56,3 @@ See examples.
|
||||
- improve code
|
||||
- test different platforms.
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
// AUTHOR: Rob Tillaart
|
||||
// PURPOSE: demo
|
||||
//
|
||||
// this shows that a print can be split up in many write calls
|
||||
// this shows that a print can be split up in many write calls
|
||||
// that all return -28. Print will add these together.
|
||||
// (is a limit of the Arduino environment)
|
||||
|
||||
|
@ -0,0 +1,15 @@
|
||||
// test run on IDE 1.8.19 UNO
|
||||
// test run while working on improvements for 0.1.2)
|
||||
|
||||
DEVFULL_performance.ino
|
||||
DEVFULL_LIB_VERSION: 0.1.2
|
||||
PRINTLN: 20 2
|
||||
WRITE: 4 1
|
||||
long: 356 1
|
||||
float0: 64 1
|
||||
float1: 596 7
|
||||
float2: 1096 12
|
||||
float3: 1612 17
|
||||
float4: 2116 22
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/RobTillaart/DEVFULL.git"
|
||||
},
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"license": "MIT",
|
||||
"frameworks": "arduino",
|
||||
"platforms": "*",
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=DEVFULL
|
||||
version=0.1.1
|
||||
version=0.1.2
|
||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
sentence=Arduino library for a /dev/full stream
|
||||
|
Loading…
Reference in New Issue
Block a user