retargettft.c File Reference

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 "dmd/ssd2119/dmd_ssd2119.h"
#include "bsp.h"
#include "retargettft.h"
Include dependency graph for retargettft.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define fontBits   chars_8x8_bits
 Define font.
#define CHARS   40
 # Characters
#define LINES   30
 # Lines

Functions

static void tftTextReset (void)
 Reset TFT text display state.
static void tftTextScrollUp (void)
 Scroll one line of characters up on the screen.
void RETARGET_TftInit (void)
 Intializes TFT text display.
void RETARGET_TftCrLf (int on)
 Toggle LF to CRLF conversion.
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 stdio retarget.

Detailed Description

Provide stdio retargeting to TFT address mapped mode.

Version:
3.20.5

License

(C) Copyright 2014 Silicon Labs, http://www.silabs.com

This file is licensensed under the Silabs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.

Definition in file retargettft.c.


Define Documentation

#define CHARS   40

# Characters

Definition at line 30 of file retargettft.c.

Referenced by RETARGET_TFTTX(), RETARGET_TFTUpdate(), tftTextReset(), and tftTextScrollUp().

#define fontBits   chars_8x8_bits

Define font.

Definition at line 28 of file retargettft.c.

Referenced by RETARGET_TFTUpdate().

#define LINES   30

# Lines

Definition at line 31 of file retargettft.c.

Referenced by RETARGET_TFTTX(), RETARGET_TFTUpdate(), tftTextReset(), and tftTextScrollUp().


Function Documentation

static void tftTextReset ( void   )  [static]

Reset TFT text display state.

Definition at line 80 of file retargettft.c.

References BC_SSD2119_BASE, BSP_Display_EBI, BSP_Display_Mode8080, BSP_Display_PowerDisable, BSP_Display_PowerEnable, BSP_Display_ResetAssert, BSP_Display_ResetRelease, BSP_DisplayControl(), bufferReset, charBuffer, CHARS, initialized, LINES, rgbColor, tftReset, xpos, and ypos.

Referenced by RETARGET_TftInit(), and RETARGET_WriteChar().

Here is the call graph for this function:

Here is the caller graph for this function:

static void tftTextScrollUp ( 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().

Here is the caller graph for this function:


Variable Documentation

bool bufferReset = true [static]

Reset buffer.

Definition at line 40 of file retargettft.c.

Referenced by RETARGET_WriteChar(), and tftTextReset().

uint8_t charBuffer[LINES][CHARS] [static]

Character buffer.

Definition at line 33 of file retargettft.c.

Referenced by RETARGET_TFTTX(), RETARGET_TFTUpdate(), tftTextReset(), and tftTextScrollUp().

bool fullUpdate = true [static]

Display updated.

Definition at line 39 of file retargettft.c.

Referenced by RETARGET_WriteChar(), and tftTextScrollUp().

bool initialized = false [static]

Intialize TFT stdio retarget.

Definition at line 43 of file retargettft.c.

Referenced by RETARGET_WriteChar(), and tftTextReset().

bool LFtoCRLF = 0 [static]

LF to CRLF conversion disabled.

Definition at line 42 of file retargettft.c.

Referenced by RETARGET_TftCrLf(), and RETARGET_WriteChar().

uint8_t rgbColor[3] [static]

Color for font.

Definition at line 34 of file retargettft.c.

Referenced by RETARGET_TFTTX(), RETARGET_TFTUpdate(), and tftTextReset().

bool tftReset = true [static]

Reset TFT.

Definition at line 41 of file retargettft.c.

Referenced by RETARGET_WriteChar(), and tftTextReset().

int xpos [static]

Cursor position.

Definition at line 37 of file retargettft.c.

Referenced by RETARGET_TFTTX(), RETARGET_TFTUpdate(), tftTextReset(), and tftTextScrollUp().

int ypos [static]

Cursor position.

Definition at line 37 of file retargettft.c.

Referenced by RETARGET_TFTTX(), RETARGET_TFTUpdate(), tftTextReset(), and tftTextScrollUp().