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 rit.h Source File

rit.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 RIT_H
00024 #define RIT_H
00025 
00026 #define RIT_TIMER_CB_GPS    0
00027 #define RIT_TIMER_CB_WAIT   1
00028 #define RIT_TIMER_NEXSTAR   2
00029 #define RIT_ONESEC_NEXSTAR  3
00030 #define RIT_100TH_NEXSTAR   4
00031 #define FLASH_WRITE_CB      5
00032 #define SDCARD_TIMER_CB     6
00033 #define MAIN_TEST_CB        7
00034 
00035 #include "sowb.h"
00036 
00037 typedef struct _rit_timer {
00038     uint32_t    reload;         /* Value to reload for recurring mode. */
00039     uint32_t    counter;        /* The acutal counter that "down counts" to zero. */
00040     void      (*callback)(int); /* The function to call when zero is reached. */
00041 } RIT_TIMER;
00042 
00043 void rit_init(void);
00044 void rit_timer_set_counter(int index, uint32_t value);
00045 void rit_timer_set_reload(int index, uint32_t value);
00046 void rit_timer_get_values(int *, uint32_t *, uint32_t *);
00047 void rit_read_uptime(uint32_t *h, uint32_t *l);
00048 
00049 #endif