altos/telefireone-v1.0: Track ao_led_init API change
[fw/altos] / src / drivers / ao_vga.h
1 /*
2  * Copyright © 2016 Keith Packard <keithp@keithp.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  */
14
15 #ifndef _AO_VGA_H_
16 #define _AO_VGA_H_
17
18 #include "ao_draw.h"
19
20 void
21 ao_vga_init(void);
22
23 void
24 ao_vga_enable(int active);
25
26 /* Active frame buffer */
27 #define AO_VGA_WIDTH            320
28 #define AO_VGA_HEIGHT           240
29
30 /* Pad on the right so that there are zeros on the output after the line */
31 #define AO_VGA_HPAD             32
32
33 #define AO_VGA_STRIDE           ((AO_VGA_WIDTH + AO_VGA_HPAD) >> AO_SHIFT)
34
35 extern uint32_t ao_vga_fb[AO_VGA_STRIDE * AO_VGA_HEIGHT];
36
37 extern const struct ao_bitmap ao_vga_bitmap;
38
39 #endif /* _AO_VGA_H_ */