Satellite Observers Workbench. NOT yet complete, just published for forum posters to \"cherry pick\" pieces of code as requiered as an example.
osd/osd.h@0:0a841b89d614, 2010-10-11 (annotated)
- Committer:
- AjK
- Date:
- Mon Oct 11 10:34:55 2010 +0000
- Revision:
- 0:0a841b89d614
Totally Alpha quality as this project isn\t completed. Just publishing it as it answers many questions asked in the forums
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AjK | 0:0a841b89d614 | 1 | /**************************************************************************** |
AjK | 0:0a841b89d614 | 2 | * Copyright 2010 Andy Kirkham, Stellar Technologies Ltd |
AjK | 0:0a841b89d614 | 3 | * |
AjK | 0:0a841b89d614 | 4 | * This file is part of the Satellite Observers Workbench (SOWB). |
AjK | 0:0a841b89d614 | 5 | * |
AjK | 0:0a841b89d614 | 6 | * SOWB is free software: you can redistribute it and/or modify |
AjK | 0:0a841b89d614 | 7 | * it under the terms of the GNU General Public License as published by |
AjK | 0:0a841b89d614 | 8 | * the Free Software Foundation, either version 3 of the License, or |
AjK | 0:0a841b89d614 | 9 | * (at your option) any later version. |
AjK | 0:0a841b89d614 | 10 | * |
AjK | 0:0a841b89d614 | 11 | * SOWB is distributed in the hope that it will be useful, |
AjK | 0:0a841b89d614 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
AjK | 0:0a841b89d614 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
AjK | 0:0a841b89d614 | 14 | * GNU General Public License for more details. |
AjK | 0:0a841b89d614 | 15 | * |
AjK | 0:0a841b89d614 | 16 | * You should have received a copy of the GNU General Public License |
AjK | 0:0a841b89d614 | 17 | * along with SOWB. If not, see <http://www.gnu.org/licenses/>. |
AjK | 0:0a841b89d614 | 18 | * |
AjK | 0:0a841b89d614 | 19 | * $Id: main.cpp 5 2010-07-12 20:51:11Z ajk $ |
AjK | 0:0a841b89d614 | 20 | * |
AjK | 0:0a841b89d614 | 21 | ***************************************************************************/ |
AjK | 0:0a841b89d614 | 22 | |
AjK | 0:0a841b89d614 | 23 | #ifndef OSD_H |
AjK | 0:0a841b89d614 | 24 | #define OSD_H |
AjK | 0:0a841b89d614 | 25 | |
AjK | 0:0a841b89d614 | 26 | #include "MAX7456.h" |
AjK | 0:0a841b89d614 | 27 | |
AjK | 0:0a841b89d614 | 28 | #define L01_MODE_A 1 |
AjK | 0:0a841b89d614 | 29 | #define L01_MODE_B 2 |
AjK | 0:0a841b89d614 | 30 | #define L01_MODE_C 3 |
AjK | 0:0a841b89d614 | 31 | #define L01_MODE_D 4 |
AjK | 0:0a841b89d614 | 32 | |
AjK | 0:0a841b89d614 | 33 | /* Define a structure that holds a OSD character line. |
AjK | 0:0a841b89d614 | 34 | This is used to basically buffer the line so that it |
AjK | 0:0a841b89d614 | 35 | can be displayed during the vertical sync period. |
AjK | 0:0a841b89d614 | 36 | Additionally, we hold a binary flag to state whether |
AjK | 0:0a841b89d614 | 37 | teh buffer has been updated. That way we know if we |
AjK | 0:0a841b89d614 | 38 | don't need to send the buffer to the MAX7456 device |
AjK | 0:0a841b89d614 | 39 | if no update to the buffer has occured. */ |
AjK | 0:0a841b89d614 | 40 | |
AjK | 0:0a841b89d614 | 41 | typedef struct { |
AjK | 0:0a841b89d614 | 42 | bool update; |
AjK | 0:0a841b89d614 | 43 | char line_buffer[MAX7456_DISPLAY_LINE_LEN]; |
AjK | 0:0a841b89d614 | 44 | } OSD_display_line; |
AjK | 0:0a841b89d614 | 45 | |
AjK | 0:0a841b89d614 | 46 | |
AjK | 0:0a841b89d614 | 47 | void osd_init(void); |
AjK | 0:0a841b89d614 | 48 | void osd_clear(void); |
AjK | 0:0a841b89d614 | 49 | void osd_clear_line(int line); |
AjK | 0:0a841b89d614 | 50 | void osd_string(int line, char *s); |
AjK | 0:0a841b89d614 | 51 | void osd_string_xy(int x, int y, char *s); |
AjK | 0:0a841b89d614 | 52 | void osd_stringl(int line, char *s, int len); |
AjK | 0:0a841b89d614 | 53 | void osd_string_xyl(int x, int y, char *s, int len); |
AjK | 0:0a841b89d614 | 54 | |
AjK | 0:0a841b89d614 | 55 | void osd_set_mode_l01(int mode); |
AjK | 0:0a841b89d614 | 56 | void osd_l01_next_mode(void); |
AjK | 0:0a841b89d614 | 57 | int osd_set_crosshair(int mode); |
AjK | 0:0a841b89d614 | 58 | int osd_crosshair_toggle(void); |
AjK | 0:0a841b89d614 | 59 | |
AjK | 0:0a841b89d614 | 60 | void osd_vsync(void); |
AjK | 0:0a841b89d614 | 61 | |
AjK | 0:0a841b89d614 | 62 | |
AjK | 0:0a841b89d614 | 63 | |
AjK | 0:0a841b89d614 | 64 | #endif |
AjK | 0:0a841b89d614 | 65 |