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)
Nucleo_streamfix.cpp@5:6c1109b4dfb8, 2016-07-29 (annotated)
- Committer:
- jk1lot
- Date:
- Fri Jul 29 16:13:36 2016 +0000
- Revision:
- 5:6c1109b4dfb8
Change from normal class to template class.; It is necessary to support ACM1602NI.; add STM32-Nucleo support.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jk1lot | 5:6c1109b4dfb8 | 1 | #include "mbed.h" |
jk1lot | 5:6c1109b4dfb8 | 2 | |
jk1lot | 5:6c1109b4dfb8 | 3 | #ifdef TARGET_STM |
jk1lot | 5:6c1109b4dfb8 | 4 | #ifdef __MICROLIB /*__CC_ARM*/ |
jk1lot | 5:6c1109b4dfb8 | 5 | /// To suppress MDK-ARM Linker Error: L6218E: Undefined symbol __fread_bytes_avail (referred from ios.o). |
jk1lot | 5:6c1109b4dfb8 | 6 | size_t std::__fread_bytes_avail(void * __restrict ptr, |
jk1lot | 5:6c1109b4dfb8 | 7 | size_t count, FILE * __restrict stream) //__attribute__((__nonnull__(1,3))) |
jk1lot | 5:6c1109b4dfb8 | 8 | { |
jk1lot | 5:6c1109b4dfb8 | 9 | return 0; |
jk1lot | 5:6c1109b4dfb8 | 10 | } |
jk1lot | 5:6c1109b4dfb8 | 11 | |
jk1lot | 5:6c1109b4dfb8 | 12 | |
jk1lot | 5:6c1109b4dfb8 | 13 | #include <wchar.h> |
jk1lot | 5:6c1109b4dfb8 | 14 | /// To suppress MDK-ARM Linker Error: L6218E: Undefined symbol mbsinit (referred from ios.o). |
jk1lot | 5:6c1109b4dfb8 | 15 | int std::mbsinit(const mbstate_t * ps) |
jk1lot | 5:6c1109b4dfb8 | 16 | { |
jk1lot | 5:6c1109b4dfb8 | 17 | return -1; |
jk1lot | 5:6c1109b4dfb8 | 18 | } |
jk1lot | 5:6c1109b4dfb8 | 19 | |
jk1lot | 5:6c1109b4dfb8 | 20 | /// To suppress MDK-ARM Linker Error: L6218E: Undefined symbol mbsinit (referred from ios.o). |
jk1lot | 5:6c1109b4dfb8 | 21 | wchar_t *std::wmemmove(wchar_t * __restrict s1, |
jk1lot | 5:6c1109b4dfb8 | 22 | const wchar_t * __restrict s2, size_t n) //__attribute__((__nonnull__(1,2))) |
jk1lot | 5:6c1109b4dfb8 | 23 | { |
jk1lot | 5:6c1109b4dfb8 | 24 | return NULL; |
jk1lot | 5:6c1109b4dfb8 | 25 | } |
jk1lot | 5:6c1109b4dfb8 | 26 | #endif /*__MICROLIB*/ /*__CC_ARM*/ |
jk1lot | 5:6c1109b4dfb8 | 27 | #endif |