Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Log.h
00001 #pragma once 00002 00003 #include "mbed.h" 00004 #include <string> 00005 00006 class Log 00007 { 00008 private: 00009 Serial* serial; 00010 bool wasLineBreak; 00011 00012 void printInfo(); 00013 00014 public: 00015 explicit Log(Serial* serial = NULL); 00016 ~Log(); 00017 00018 Serial* getSerial() const; 00019 void setSerial(Serial* serial); 00020 00021 Log& print(const char*); 00022 Log& print(const string&); 00023 Log& print(bool value); 00024 Log& print(unsigned char num, uint8_t base = 10); 00025 Log& print(unsigned int num, uint8_t base = 10); 00026 Log& print(unsigned long num, uint8_t base = 10); 00027 Log& print(unsigned long long num, uint8_t base = 10); 00028 Log& print(char c); 00029 Log& print(int num); 00030 Log& print(long num); 00031 Log& print(long long num); 00032 Log& print(double num, uint8_t decimals = 2); 00033 Log& printf(const char* fmt, ...); 00034 Log& ln(uint8_t quantity = 1); 00035 00036 Log& flush(); 00037 };
Generated on Fri Aug 19 2022 07:33:34 by
1.7.2