retargettextdisplay.c File Reference

Provide stdio retargeting to text display interface.


Copyright 2018 Silicon Laboratories Inc.

SPDX-License-Identifier: Zlib

The licensor of this software is Silicon Laboratories Inc.

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

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. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  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.

Definition in file retargettextdisplay.c.

#include <stdio.h>
#include <stdint.h>
#include "displayconfigall.h"
#include "display.h"
#include "textdisplay.h"
#include "retargettextdisplay.h"


int RETARGET_ReadChar (void)
 Receive a byte No input method from the text display is possible, thus we always return -1.
EMSTATUS RETARGET_TextDisplayInit (void)
 Initialize/retarget a TEXTDISPLAY device to receivie stdout(put).
int RETARGET_WriteChar (char c)
 Write a single byte to the text display.
EMSTATUS RETARGET_WriteString (char *str)
 Write a string of characters to the RETARGET text display device.

Function Documentation

int RETARGET_ReadChar ( void  )

Receive a byte No input method from the text display is possible, thus we always return -1.

-1 on failure

Definition at line 93 of file retargettextdisplay.c.

int RETARGET_WriteChar ( char  c)

Write a single byte to the text display.

cCharacter to write
Printed character if text display is initialized. -1 if text display is not initialized.

Definition at line 106 of file retargettextdisplay.c.

References TEXTDISPLAY_WriteChar().