GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> TRD / V0-0-3 > trd / rad750
#include <string.h>
#include <CAB/CAB_lookupPub.h>
#include <MDB/MDB_pubdefs.h>
#include <PBI/PTR.h>
#include <PBS/FFS.ih>
#include <PBS/MTX.h>
#include <TRD/TRD_msgs.h>
#include <ZLIB/zlib.h>
#include <TRD_prvdefs.h>
Defines | |
#define | MEMMAP_BHDR_BASE_OFFSET (0x00000000) |
#define | MEMMAP_BHDR_SIZE (256) |
#define | MEMMAP_BHDR_RESET_PTR_OFFSET (0x00000024) |
#define | MEMMAP_BHDR_RESET_SIZE_OFFSET (0x00000028) |
#define | TFFS_PHYSICAL_READ (0) |
#define | TFFS_PHYSICAL_WRITE (0) |
#define | OK (0) |
Functions | |
unsigned int | TRD_databaseRead (unsigned int vol) |
Read the TRD database from non-volatile memory and execute. | |
unsigned int | TRD_databaseWrite (unsigned int vol) |
Write the TRD database to non-volatile memory. | |
int | TRD_fakeTffsRawio (int tffsDriveNo, int functionNo, int arg0, int arg1, int arg2) |
TFFS raw IO routine (pure fakery for use on unix hosts). | |
unsigned int | TRD_databaseSpace (TRD_Control *tcb, unsigned int vol, unsigned int *off, unsigned int *siz) |
Identify save/restore space in EEPROM. |
CVS $Id: TRD_database.c,v 1.3 2012/10/20 21:59:38 apw Exp $
unsigned int TRD_databaseRead | ( | unsigned int | vol | ) |
Read the TRD database from non-volatile memory and execute.
vol | (in) TFFS volume. Must be either 2 (/mm0) or 3 (/mm1) |
References _TRD_BufferHeader::acs, _TRD_Row::buf, _TRD_Control::buf, _TRD_RowHeader::fmt, _TRD_BufferHeader::frm, _TRD_Row::hdr, _TRD_RowHeader::len, _TRD_BufferHeader::len, _TRD_Control::mtx, _TRD_RowHeader::off, _TRD_Control::sib, _TRD_Control::state, TRD_CTL_INITIALIZED, TRD_databaseSpace(), and TRD_tcb.
unsigned int TRD_databaseSpace | ( | TRD_Control * | tcb, | |
unsigned int | vol, | |||
unsigned int * | off, | |||
unsigned int * | siz | |||
) |
Identify save/restore space in EEPROM.
tcb | (in) TRD control block | |
vol | (in) EEPROM bank (/mm0, /mm1 convention) | |
off | (out) Offset to database in EEPROM | |
siz | (out) Maximum allowed size of database in EEPROM |
vol | TRD control block | |
off | EEPROM bank (/mm0, /mm1 convention) | |
siz | Offset to database in EEPROM Maximum size of database in EEPROM |
References _TRD_Control::sib, and TRD_fakeTffsRawio().
Referenced by TRD_databaseRead(), and TRD_databaseWrite().
unsigned int TRD_databaseWrite | ( | unsigned int | vol | ) |
Write the TRD database to non-volatile memory.
vol | (in) TFFS volume. Must be either 2 (/mm0) or 3 (/mm1) |
References _TRD_BufferHeader::acs, _TRD_Control::bit, _TRD_Control::buf, _TRD_Control::db, _TRD_BufferHeader::frm, _TRD_Row::hdr, _TRD_RowHeader::idx, _TRD_BufferHeader::len, _TRD_RowHeader::len, _TRD_Control::mtx, _TRD_RowHeader::off, _TRD_Control::sib, _TRD_Control::state, TRD_CTL_INITIALIZED, TRD_databaseSpace(), and TRD_tcb.
int TRD_fakeTffsRawio | ( | int | tffsDriveNo, | |
int | functionNo, | |||
int | arg0, | |||
int | arg1, | |||
int | arg2 | |||
) |
TFFS raw IO routine (pure fakery for use on unix hosts).
tffsDriveNo | (in) (Fake) Drive number | |
functionNo | (in) (Fake) Function number | |
arg0 | (in) (Fake) Argument 0 | |
arg1 | (in) (Fake) Argument 1 | |
arg2 | (in) (Fake) Argument 2 |
functionNo | TrueFFS drive number | |
arg0 | TrueFFS function code | |
arg1 | Argument 0 | |
arg2 | Argument 1 Argument 2 |
Referenced by TRD_databaseSpace(), and TRD_initialize().