Using std::ostream with TextLCD

Dependencies:   ACM1602NI TextLCD

Dependents:   TextLCD_ostream_sample

This is class library inherited std::ostream for TextLCD
Because a large amount of memory is needed, do not work in low memory MPU

Sample program is here. And notebook page is here (sorry notebook page is only in Japanese)

microlib_streamfix.cpp

Committer:
jk1lot
Date:
2016-07-30
Revision:
6:2494d76a38b0

File content as of revision 6:2494d76a38b0:

// Dummy functions to avoid compile error.
// In fact, malfunctions Once these functions are called.
#include "mbed.h"

#ifdef __MICROLIB /*__CC_ARM*/
/// To suppress MDK-ARM Linker Error: L6218E: Undefined symbol __fread_bytes_avail (referred from ios.o).
size_t std::__fread_bytes_avail(void * __restrict ptr,
                    size_t count, FILE * __restrict stream) //__attribute__((__nonnull__(1,3)))
{
        return 1;
}


#include <wchar.h>
/// To suppress MDK-ARM Linker Error: L6218E: Undefined symbol mbsinit (referred from ios.o).
int std::mbsinit(const mbstate_t * ps)
{
        return -1;
}

/// To suppress MDK-ARM Linker Error: L6218E: Undefined symbol mbsinit (referred from ios.o).
wchar_t *std::wmemmove(wchar_t * __restrict s1,
                      const wchar_t * __restrict s2, size_t n) //__attribute__((__nonnull__(1,2)))
{
        return NULL;
}
#endif /*__MICROLIB*/ /*__CC_ARM*/