summaryrefslogtreecommitdiffstats
path: root/bsps/arm/raspberrypi/include/bsp/fbcons.h
blob: ea3eee4f324eef28b022a3bafbd637ae2c93d58b (plain) (blame)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/**
 * @file
 *
 * @ingroup raspberrypi_console
 *
 * @brief framebuffer graphic console support.
 */

/*
 * Copyright (c) 2015 Yang Qiao
 *
 *  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
 *
 */

#ifndef _FBCONS_H_
#define _FBCONS_H_

#include <libchip/serial.h>
#include <rtems/termiostypes.h>

#ifdef __cplusplus
extern "C" {
#endif

/*
 *  This is the ASCII for "PI" in the upper word and 2835
 *  in the lower which should be unique enough to
 *  distinguish this type of serial device from others.
 */

#define FB_CONSOLE 0x50492835

bool fbcons_probe(
  rtems_termios_device_context *base
 );

void fbcons_write_polled(
  rtems_termios_device_context *base,
  char c
);

void output_char_fb(char c);

typedef struct {
    rtems_termios_device_context base;
} rpi_fb_context ;

/*
 * Driver function table
 */
extern const rtems_termios_device_handler fbcons_fns;

#ifdef __cplusplus
}
#endif

#endif /* _FBCONS_H_ */