GY-63_MS5611/libraries/DEVNULL/DEVNULL.h

37 lines
613 B
C
Raw Normal View History

2021-01-29 06:31:58 -05:00
#pragma once
//
// FILE: DEVNULL.h
// AUTHOR: Rob Tillaart
2022-10-31 14:46:02 -04:00
// VERSION: 0.1.5
2021-11-25 06:55:36 -05:00
// PURPOSE: Arduino library for a /dev/null stream - useful for testing
2021-01-29 06:31:58 -05:00
// URL: https://github.com/RobTillaart/DEVNULL
2021-11-25 06:55:36 -05:00
2021-01-29 06:31:58 -05:00
#include "Arduino.h"
2022-10-31 14:46:02 -04:00
#define DEVNULL_LIB_VERSION (F("0.1.5"))
2021-11-25 06:55:36 -05:00
2021-01-29 06:31:58 -05:00
class DEVNULL : public Stream
{
public:
2022-09-21 04:45:14 -04:00
DEVNULL();
int available();
int peek();
int read();
void flush(); // placeholder to keep CI happy
size_t write(const uint8_t data);
size_t write( const uint8_t *buffer, size_t size);
2021-11-25 06:55:36 -05:00
2022-09-21 04:45:14 -04:00
int lastByte();
2021-01-29 06:31:58 -05:00
private:
uint8_t _bottomLessPit;
};
2021-11-25 06:55:36 -05:00
2021-01-29 06:31:58 -05:00
// -- END OF FILE --
2021-11-25 06:55:36 -05:00