wdenk | 167c589 | 2001-11-03 22:21:15 +0000 | [diff] [blame] | 1 | /* |
| 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 Glass | 0d1e1f7 | 2014-07-23 06:54:59 -0600 | [diff] [blame] | 14 | struct stdio_dev; |
| 15 | |
| 16 | int video_init(void *videobase); |
| 17 | void video_putc(struct stdio_dev *dev, const char c); |
| 18 | void video_puts(struct stdio_dev *dev, const char *s); |
wdenk | 167c589 | 2001-11-03 22:21:15 +0000 | [diff] [blame] | 19 | |
Stefan Reinauer | 987d1d8 | 2012-09-28 15:11:11 +0000 | [diff] [blame] | 20 | /** |
| 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 | */ |
| 27 | int 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 | */ |
| 34 | int 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 | */ |
| 41 | int 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 | */ |
| 48 | int video_get_screen_rows(void); |
| 49 | |
| 50 | /** |
| 51 | * Get the number of text columns on the screen |
| 52 | * |
| 53 | * @return number of columns |
| 54 | */ |
| 55 | int 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 | */ |
| 63 | void video_position_cursor(unsigned col, unsigned row); |
| 64 | |
| 65 | /* Clear the display */ |
| 66 | void video_clear(void); |
| 67 | |
Heiko Schocher | d7d112d | 2013-08-19 16:39:00 +0200 | [diff] [blame] | 68 | #if defined(CONFIG_FORMIKE) |
| 69 | int kwh043st20_f01_spi_startup(unsigned int bus, unsigned int cs, |
| 70 | unsigned int max_hz, unsigned int spi_mode); |
| 71 | #endif |
wdenk | 167c589 | 2001-11-03 22:21:15 +0000 | [diff] [blame] | 72 | #endif |