7#if not defined(ARDUINO_ARCH_ESP32) && not defined(ARDUINO_ARCH_SAM) && \
8 not defined(ARDUINO_API_VERSION) && not defined(ArduinoFake)
27Print &
endl(Print &printer) {
62Print &
hex(Print &printer) {
72Print &
bin(Print &printer) {
77Print &
dec(Print &printer) {
99Print &
operator<<(Print &printer,
const __FlashStringHelper *s) {
136 return printer << static_cast<double>(f);
144 printer.print(b ? F(
"true") : F(
"false"));
173 return nibble > 9 ? nibble - 10 + (
'a' &
casePrintStream) : nibble +
'0';
176#if __BYTE_ORDER != __LITTLE_ENDIAN
177#error "Byte order not supported"
184 bool nonZero =
false;
185 for (
int i =
sizeof(val) - 1; i >= 0; i--) {
186 uint8_t currByte = ((uint8_t *)&val)[i];
187 if (currByte != 0 || i == 0)
202 bool nonZero =
false;
203 for (
int i =
sizeof(val) - 1; i >= 0; i--) {
204 uint8_t currByte = ((uint8_t *)&val)[i];
205 for (
int j = 7; j >= 0; j--) {
206 uint8_t currBit = currByte & 0x80;
207 if (currBit != 0 || (i == 0 && j == 0))
210 printer.print(currBit ?
'1' :
'0');
228 case DEC: printer.print(i);
break;
229 case HEX:
printHex(printer, i);
break;
230 case BIN:
printBin(printer, i);
break;
260 auto hex_nibble_to_char = [](uint8_t nibble) ->
char {
262 return nibble > 9 ? nibble - 10 +
'A' : nibble +
'0';
264 auto printHex = [&](std::ostream &p, uint8_t b) {
265 p << hex_nibble_to_char(b >> 4) << hex_nibble_to_char(b);
#define BEGIN_AH_NAMESPACE
Print & printIntegral(Print &printer, T i)
char byteSeparatorPrintStream
static char nibble_to_hex(uint8_t nibble)
void printBin(Print &printer, T val)
uint8_t formatPrintStream
bool boolalphaPrintStream
bool leadingZerosPrintStream
uint8_t precisionPrintStream
void printHex(Print &printer, T val)
Print & hex(Print &printer)
Print & bin(Print &printer)
Print & nouppercase(Print &printer)
Print & endl(Print &printer)
Print & uppercase(Print &printer)
Print & flush(Print &printer)
Print & showbase(Print &printer)
Print & manipulator(Print &)
Print & boolalpha(Print &printer)
Setbytesep setbytesep(char bytesep)
Print & leadingzeros(Print &printer)
Print & noshowbase(Print &printer)
Print & dec(Print &printer)
Print & noboolalpha(Print &printer)
Print & noleadingzeros(Print &printer)
Setbase setbase(uint8_t base)
Setprecision setprecision(int n)
Print & operator<<(Print &os, Quaternion e)
Printing.