Provide stdio retargeting to TFT address mapped mode. More...
#include <stdio.h>
#include <stdint.h>
#include "em_device.h"
#include "em_cmu.h"
#include "em_ebi.h"
#include "em_gpio.h"
#include "glib/glib_font.h"
#include "dmd/ssd2119/dmd_ssd2119.h"
#include "bsp.h"
#include "retargetserial.h"
Go to the source code of this file.
Defines | |
#define | CHARS 40 |
# Characters | |
#define | LINES 30 |
# Lines | |
Functions | |
void | RETARGET_SerialCrLf (int on) |
UART/LEUART toggle LF to CRLF conversion. | |
void | RETARGET_SerialInit (void) |
Intializes TFT serial output. | |
static void | scrollUp (void) |
Scroll one line of characters up on the screen. | |
void | RETARGET_TFTTX (int c) |
Transmit/display a character. | |
void | RETARGET_TFTUpdate (bool fullFrame) |
Display framebuffer. | |
int | RETARGET_ReadChar (void) |
Receive a byte No input method from TFT is possible, thus we always return -1. | |
int | RETARGET_WriteChar (char c) |
Transmit single byte to the TFT. | |
Variables | |
static uint8_t | charBuffer [LINES][CHARS] |
Character buffer. | |
static uint8_t | rgbColor [3] |
Color for font. | |
static int | xpos |
Cursor position. | |
static int | ypos |
Cursor position. | |
static bool | fullUpdate = true |
Display updated. | |
static bool | bufferReset = true |
Reset buffer. | |
static bool | tftReset = true |
Reset TFT. | |
static bool | LFtoCRLF = 0 |
LF to CRLF conversion disabled. | |
static bool | initialized = false |
Intialize TFT serial output. |
Provide stdio retargeting to TFT address mapped mode.
(C) Copyright 2012 Energy Micro AS, http://www.energymicro.com
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. 4. The source and compiled code may only be used on Energy Micro "EFM32" microcontrollers and "EFR4" radios.
DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no obligation to support this Software. Energy Micro AS is providing the Software "AS IS", with no express or implied warranties of any kind, including, but not limited to, any implied warranties of merchantability or fitness for any particular purpose or warranties against infringement of any proprietary rights of a third party.
Energy Micro AS will not be liable for any consequential, incidental, or special damages, or any other relief, or for any claim by any third party, arising from your use of this Software.
Definition in file retargettft.c.
#define CHARS 40 |
# Characters
Definition at line 46 of file retargettft.c.
Referenced by RETARGET_SerialInit(), RETARGET_TFTTX(), RETARGET_TFTUpdate(), and scrollUp().
#define LINES 30 |
# Lines
Definition at line 47 of file retargettft.c.
Referenced by RETARGET_SerialInit(), RETARGET_TFTTX(), RETARGET_TFTUpdate(), and scrollUp().
static void scrollUp | ( | void | ) | [static] |
Scroll one line of characters up on the screen.
Definition at line 135 of file retargettft.c.
References charBuffer, CHARS, fullUpdate, LINES, xpos, and ypos.
Referenced by RETARGET_TFTTX().
bool bufferReset = true [static] |
Reset buffer.
Definition at line 56 of file retargettft.c.
Referenced by RETARGET_SerialInit(), and RETARGET_WriteChar().
uint8_t charBuffer[LINES][CHARS] [static] |
Character buffer.
Definition at line 49 of file retargettft.c.
Referenced by RETARGET_SerialInit(), RETARGET_TFTTX(), RETARGET_TFTUpdate(), and scrollUp().
bool fullUpdate = true [static] |
Display updated.
Definition at line 55 of file retargettft.c.
Referenced by RETARGET_WriteChar(), and scrollUp().
bool initialized = false [static] |
Intialize TFT serial output.
Definition at line 59 of file retargettft.c.
Referenced by RETARGET_SerialInit(), and RETARGET_WriteChar().
bool LFtoCRLF = 0 [static] |
LF to CRLF conversion disabled.
Definition at line 58 of file retargettft.c.
Referenced by RETARGET_SerialCrLf(), and RETARGET_WriteChar().
uint8_t rgbColor[3] [static] |
Color for font.
Definition at line 50 of file retargettft.c.
Referenced by RETARGET_SerialInit(), RETARGET_TFTTX(), and RETARGET_TFTUpdate().
bool tftReset = true [static] |
Reset TFT.
Definition at line 57 of file retargettft.c.
Referenced by RETARGET_SerialInit(), and RETARGET_WriteChar().
int xpos [static] |
Cursor position.
Definition at line 53 of file retargettft.c.
Referenced by RETARGET_SerialInit(), RETARGET_TFTTX(), RETARGET_TFTUpdate(), and scrollUp().
int ypos [static] |
Cursor position.
Definition at line 53 of file retargettft.c.
Referenced by RETARGET_SerialInit(), RETARGET_TFTTX(), RETARGET_TFTUpdate(), and scrollUp().