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)
Diff: microlib_streamfix.cpp
- Revision:
- 6:2494d76a38b0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/microlib_streamfix.cpp Sat Jul 30 06:59:22 2016 +0000 @@ -0,0 +1,27 @@ +// 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*/