mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-24 21:21:24 +01:00
e0c76a9dc4
In prep for Wifi siolution, all output functions changed to expect Print class instead of Stream... Can still pass Serial1 etc because Stream extends Print, but this allows for an output-only class extending Print to collect a response buffer for Wifi sending with AT commands.
16 lines
424 B
C++
16 lines
424 B
C++
#ifndef StringFormatter_h
|
|
#define StringFormatter_h
|
|
#include <Arduino.h>
|
|
class StringFormatter
|
|
{
|
|
public:
|
|
static int parse(const char * com, int result[], byte maxResults);
|
|
static void print( const __FlashStringHelper* input...);
|
|
static void send(Print & serial, const __FlashStringHelper* input...);
|
|
private:
|
|
static void send(Print & serial, const __FlashStringHelper* input,va_list args);
|
|
|
|
|
|
};
|
|
#endif
|