OOKwiz
on/off-keying for ESP32 and a variety of supported radio modules
Namespaces | Macros | Functions
tools.h File Reference
#include <Arduino.h>

Go to the source code of this file.

Namespaces

 tools
 

Macros

#define QUOTE_2(x)   #x
 
#define QUOTE(x)   QUOTE_2(x)
 
#define CONCAT_2(x, y)   x##y
 
#define CONCAT(x, y)   CONCAT_2(x, y)
 
#define SPLIT(in, sep, a, b)
 
#define snprintf_append(append_to, len, ...)
 

Functions

size_t getArduinoLoopTaskStackSize ()
 
long tools::nthNumberFrom (String &in, int num)
 Identifies contiguous series of digits in String, giving you the toInt() of the nth one. More...
 
void tools::trim (String &in)
 Takes spaces off start and end of supplied string, operates in place on String passed in. More...
 
void tools::shiftInBit (uint8_t *buf, const int len, const bool bit)
 Shifts bits into a range of bytes. Reverse order because length may be unkown at start. More...
 
bool tools::shiftOutBit (uint8_t *buf, const int len)
 Shifts out the bits in an array of bytes, emptying array in process. More...
 
void tools::split (const String &in, const String &separator, String &before, String &after)
 Will split a srting in two on first occurence of String separator. More...
 
bool tools::between (const int &compare, const int &lower_bound, const int &upper_bound)
 See if number is between two bounds. More...
 

Macro Definition Documentation

◆ QUOTE_2

#define QUOTE_2 (   x)    #x

Definition at line 6 of file tools.h.

◆ QUOTE

#define QUOTE (   x)    QUOTE_2(x)

Definition at line 7 of file tools.h.

◆ CONCAT_2

#define CONCAT_2 (   x,
 
)    x##y

Definition at line 8 of file tools.h.

◆ CONCAT

#define CONCAT (   x,
 
)    CONCAT_2(x, y)

Definition at line 9 of file tools.h.

◆ SPLIT

#define SPLIT (   in,
  sep,
  a,
 
)
Value:
String a;\
String b;\
tools::split(in, sep, a, b);
void split(const String &in, const String &separator, String &before, String &after)
Will split a srting in two on first occurence of String separator.
Definition: tools.cpp:81

Definition at line 14 of file tools.h.

◆ snprintf_append

#define snprintf_append (   append_to,
  len,
  ... 
)
Value:
{\
char buffer[len];\
snprintf(buffer, len, __VA_ARGS__);\
append_to = append_to + buffer;\
}

Definition at line 19 of file tools.h.

Function Documentation

◆ getArduinoLoopTaskStackSize()

size_t getArduinoLoopTaskStackSize ( )

Definition at line 4 of file tools.cpp.