|
modm API documentation
|
Classes | |
| class | modm::IODevice |
| class | modm::IODeviceObjectWrapper< Device, behavior > |
| class | modm::IODeviceWrapper< Device, behavior > |
| class | modm::IOStream |
Enums | |
| enum | modm::IOBuffer { DiscardIfFull, BlockIfFull } |
| IOStream & | modm::flush (IOStream &ios) |
| IOStream & | modm::endl (IOStream &ios) |
| Write a newline. DOES NOT FLUSH THE STREAM! | |
| IOStream & | modm::bin (IOStream &ios) |
| set the output mode to binary style | |
| IOStream & | modm::hex (IOStream &ios) |
| set the output mode to hexadecimal style | |
| IOStream & | modm::ascii (IOStream &ios) |
| set the output mode to ASCII style | |
| IOStream & | modm::black (IOStream &ios) |
| Set the foreground colour on ANSI terminals. | |
| IOStream & | modm::red (IOStream &ios) |
| IOStream & | modm::green (IOStream &ios) |
| IOStream & | modm::yellow (IOStream &ios) |
| IOStream & | modm::blue (IOStream &ios) |
| IOStream & | modm::magenta (IOStream &ios) |
| IOStream & | modm::cyan (IOStream &ios) |
| IOStream & | modm::white (IOStream &ios) |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::year year) |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::month month) |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::day day) |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::weekday wd) |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::weekday_indexed wdi) |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::weekday_last wdl) |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::month_day md) |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::month_day_last mdl) |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::month_weekday mwd) |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::month_weekday_last mwdl) |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::year_month ym) |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::year_month_day &ymd) |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::year_month_day_last &ymdl) |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::year_month_weekday &ymwd) |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::year_month_weekday_last &ymwdl) |
| template<class Duration > | |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::hh_mm_ss< Duration > &hms) |
| template<class Rep , class Period > | |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::duration< Rep, Period > &d) |
| template<class Clock , class Duration > | |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::chrono::time_point< Clock, Duration > &tp) |
| modm::IOStream & | modm::operator<< (modm::IOStream &s, const std::tm &tm) |
lbuild module: modm:io
The modm::IOStream class contains efficient formatting that supports both C++ std::basic_ostream-like formatting via operator << as well as implementing printf via the modm:printf module.
printf are disabled by default to reduce firmware size! Please check the options.modm::endl does NOT implicitly flush! Flushing is extremely expensive on embedded systems, therefore modm::endl does not implicitly flush the stream. Please call modm::flush explicitly.The modm::IODeviceWrapper transforms any peripheral device that provides static write() and read() functions into an IODevice:
The modm::IODeviceWrapper can be configured to discard or block in case the device is full. Discarding data is always non-blocking, however, blocking on write involves waiting in a loop until the device has space. This can cause a deadlock when called inside an interrupt!
If compiled with the modm:processing:fiber module, the blocking behavior allows the fiber to yield while waiting for the device. To prevent interlaced output from different fibers, the write(char) function is protected by a mutex that releases when a newline character \n is written. The flush() function is also mutex protected to allow one fiber to reliably flush the stream without having other fibers push data into the device.
Generated with: yes in [yes, no]
On AVRs floating point values can be printed, however, the formatting cannot be specified and all values are printed as scientific-notation exponential floating point
Generated with: yes in [yes, no]
Generated with: yes in [yes, no]
|
strong |
The preferred behavior when the IODevice buffer is full