blob: 65e4ec1e1a3df81ed83562914b902a18530b6fe3 [file] [log] [blame]
wdenk167c5892001-11-03 22:21:15 +00001/*
2** MPC823 Video Controller
3** =======================
4** (C) 2000 by Paolo Scaffardi (arsenio@tin.it)
5** AIRVENT SAM s.p.a - RIMINI(ITALY)
6**
7*/
8
9#ifndef _VIDEO_H_
10#define _VIDEO_H_
11
12/* Video functions */
13
Simon Glass0d1e1f72014-07-23 06:54:59 -060014struct stdio_dev;
15
16int video_init(void *videobase);
17void video_putc(struct stdio_dev *dev, const char c);
18void video_puts(struct stdio_dev *dev, const char *s);
wdenk167c5892001-11-03 22:21:15 +000019
Stefan Reinauer987d1d82012-09-28 15:11:11 +000020/**
21 * Display a BMP format bitmap on the screen
22 *
23 * @param bmp_image Address of BMP image
24 * @param x X position to draw image
25 * @param y Y position to draw image
26 */
27int video_display_bitmap(ulong bmp_image, int x, int y);
28
29/**
30 * Get the width of the screen in pixels
31 *
32 * @return width of screen in pixels
33 */
34int video_get_pixel_width(void);
35
36/**
37 * Get the height of the screen in pixels
38 *
39 * @return height of screen in pixels
40 */
41int video_get_pixel_height(void);
42
43/**
44 * Get the number of text lines/rows on the screen
45 *
46 * @return number of rows
47 */
48int video_get_screen_rows(void);
49
50/**
51 * Get the number of text columns on the screen
52 *
53 * @return number of columns
54 */
55int video_get_screen_columns(void);
56
57/**
58 * Set the position of the text cursor
59 *
60 * @param col Column to place cursor (0 = left side)
61 * @param row Row to place cursor (0 = top line)
62 */
63void video_position_cursor(unsigned col, unsigned row);
64
65/* Clear the display */
66void video_clear(void);
67
Heiko Schocherd7d112d2013-08-19 16:39:00 +020068#if defined(CONFIG_FORMIKE)
69int kwh043st20_f01_spi_startup(unsigned int bus, unsigned int cs,
70 unsigned int max_hz, unsigned int spi_mode);
71#endif
Heiko Schocher337fb3d2015-04-12 10:20:19 +020072#if defined(CONFIG_LG4573)
73int lg4573_spi_startup(unsigned int bus, unsigned int cs,
74 unsigned int max_hz, unsigned int spi_mode);
75#endif
wdenk167c5892001-11-03 22:21:15 +000076#endif