summaryrefslogtreecommitdiff
path: root/cpukit/libcsupport/src/rtems_putc.c
blob: 6596a06d94ad3930e5fb18106e67acf39eec6690 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
 *  @file
 *
 *  @brief RTEMS Output a Character
 *  @ingroup libcsupport
 */

/*
 * Copyright (c) 2012, 2017 embedded brains GmbH.  All rights reserved.
 *
 *  embedded brains GmbH
 *  Obere Lagerstr. 30
 *  82178 Puchheim
 *  Germany
 *  <rtems@embedded-brains.de>
 *
 * The license and distribution terms for this file may be
 * found in the file LICENSE in this distribution or at
 * http://www.rtems.org/license/LICENSE.
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <rtems/bspIo.h>

void rtems_putc(char c)
{
  if (c == '\n') {
    (*BSP_output_char)('\r');
  }

  (*BSP_output_char)(c);
}