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.
Dependencies: mbed BLE_API X_NUCLEO_IDB0XA1 MODSERIAL
COM/LOGGER.h
- Committer:
- Essenceia
- Date:
- 2016-08-18
- Revision:
- 2:ca6d8d1f77d4
- Parent:
- 1:8bab9152933e
- Child:
- 3:13bd725bd47b
File content as of revision 2:ca6d8d1f77d4:
#ifndef LOGGER_H #define LOGGER_H #include "MODSERIAL.h" #include "mbed.h" #include <string> #define <queue> #define UP 8 #define RIGHT 6 #define LEFT 4 #define DOWN 2 #define STOP 7 #define PLAY 9 class Logger { public : static Logger* Instance(); void log(std::string s); void logn(std::string s); void log(double f); void logn(double f); void log(int i); void logn(int i); void log(long l); void logn(long l); string log_itos(int i); int get_buffer_index(); void flush_buffer(); protected : static Logger* _instance; void rxCallback(MODSERIAL_IRQ_INFO *q); Logger(); MODSERIAL * serial; int buffer_index; std::queue<char> *buffer; }; #endif