Satellite Observers Workbench. NOT yet complete, just published for forum posters to \"cherry pick\" pieces of code as requiered as an example.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers osd.h Source File

osd.h

00001 /****************************************************************************
00002  *    Copyright 2010 Andy Kirkham, Stellar Technologies Ltd
00003  *    
00004  *    This file is part of the Satellite Observers Workbench (SOWB).
00005  *
00006  *    SOWB is free software: you can redistribute it and/or modify
00007  *    it under the terms of the GNU General Public License as published by
00008  *    the Free Software Foundation, either version 3 of the License, or
00009  *    (at your option) any later version.
00010  *
00011  *    SOWB is distributed in the hope that it will be useful,
00012  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *    GNU General Public License for more details.
00015  *
00016  *    You should have received a copy of the GNU General Public License
00017  *    along with SOWB.  If not, see <http://www.gnu.org/licenses/>.
00018  *
00019  *    $Id: main.cpp 5 2010-07-12 20:51:11Z ajk $
00020  *    
00021  ***************************************************************************/
00022 
00023 #ifndef OSD_H
00024 #define OSD_H
00025 
00026 #include "MAX7456.h"
00027 
00028 #define L01_MODE_A    1
00029 #define L01_MODE_B    2
00030 #define L01_MODE_C    3
00031 #define L01_MODE_D    4
00032 
00033 /* Define a structure that holds a OSD character line.
00034    This is used to basically buffer the line so that it
00035    can be displayed during the vertical sync period.
00036    Additionally, we hold a binary flag to state whether
00037    teh buffer has been updated. That way we know if we
00038    don't need to send the buffer to the MAX7456 device
00039    if no update to the buffer has occured. */
00040    
00041 typedef struct {
00042     bool update;
00043     char line_buffer[MAX7456_DISPLAY_LINE_LEN];
00044 } OSD_display_line;
00045 
00046 
00047 void osd_init(void);
00048 void osd_clear(void);
00049 void osd_clear_line(int line);
00050 void osd_string(int line, char *s);
00051 void osd_string_xy(int x, int y, char *s);
00052 void osd_stringl(int line, char *s, int len);
00053 void osd_string_xyl(int x, int y, char *s, int len);
00054 
00055 void osd_set_mode_l01(int mode);
00056 void osd_l01_next_mode(void);
00057 int osd_set_crosshair(int mode);
00058 int osd_crosshair_toggle(void);
00059 
00060 void osd_vsync(void);
00061 
00062 
00063 
00064 #endif
00065