Kenji Arai
/
LPC1114_SPI_LCD_ST7565family_test
Controller chip is ST7565
SPI LCD: AQM1248A (Akizuki) or AD-12864-SPI (antendo)
uart_as_stdio/uart_as_stdio.cpp
- Committer:
- kenjiArai
- Date:
- 2021-02-27
- Revision:
- 5:9b4d9c139186
File content as of revision 5:9b4d9c139186:
/* * mbed Application program * Redirect Standard Input/Output * * Copyright (c) 2021 Kenji Arai / JH1PJL * http://www7b.biglobe.ne.jp/~kenjia/ * https://os.mbed.com/users/kenjiArai/ * Created: January 13th, 2021 * Revised: January 14th, 2021 */ // Include -------------------------------------------------------------------- #include "mbed.h" // Definition ----------------------------------------------------------------- // Constructor ---------------------------------------------------------------- static BufferedSerial pc(USBTX, USBRX, 115200); // RAM ------------------------------------------------------------------------ // ROM / Constant data -------------------------------------------------------- // Function prototypes -------------------------------------------------------- //------------------------------------------------------------------------------ // Control Program //------------------------------------------------------------------------------ uint8_t readable() { return pc.readable(); } void putc(uint8_t c) { char dt[4]; dt[0] = (char)c; pc.write(dt, 1); } uint8_t getc() { char dt[4]; pc.read(dt, 1); return (uint8_t)dt[0]; }