Flight Data Recorder

Functions to manage and control the flight data recorder. More...


Defines

#define LOG_WRITE_BUFFER_SIZE   255
 Number of bytes to buffer before writing to flash memory.

Functions

uint32_t logGetAddress ()
 Last used address in flash memory.
void logFlush ()
 Write the contents of the temporary log buffer to the flash device.
void logInit ()
 Prepare the flight data recorder for logging.
void logSetDisableFlag (bool_t disableFlag)
 Enable and disable flash write operations.
void logType (LOG_TYPE type)
 Start a entry in the data log.
void logUint8 (uint8_t value)
 Save an unsigned, 8-bit value in the log.
void logInt16 (int16_t value)
 Save a signed, 16-bit value in the log.
void logUint16 (uint16_t value)
 Save an unsigned, 16-bit value in the log.
void logInt32 (int32_t value)
 Save a signed, 32-bit value in the log.

Variables

uint32_t logAddress
 Last used address in flash memory.
uint8_t logBuffer [LOG_WRITE_BUFFER_SIZE]
 Temporary buffer that holds data before it is written to flash device.
uint8_t logIndex
 Current index into log buffer.
bool_t logDisableFlag
 Flag that disable writes to flash.


Detailed Description

Functions to manage and control the flight data recorder.

Define Documentation

#define LOG_WRITE_BUFFER_SIZE   255

Number of bytes to buffer before writing to flash memory.


Function Documentation

void logFlush (  ) 

Write the contents of the temporary log buffer to the flash device.

If the buffer is empty, nothing is done.

References flashWriteBlock(), logAddress, logBuffer, logDisableFlag, and logIndex.

Referenced by logType().

Here is the call graph for this function:

uint32_t logGetAddress (  ) 

Last used address in flash memory.

This location is where the next log data will be written.

Returns:
24-bit flash memory address

References logAddress.

void logInit (  ) 

Prepare the flight data recorder for logging.

References flashReadBlock(), LOG_BOOTED, LOG_COORD, LOG_PUMP, LOG_TEMPERATURE_1, LOG_TEMPERATURE_2, LOG_VOLTAGE, logAddress, logDisableFlag, and logIndex.

Referenced by diagPort(), and main().

Here is the call graph for this function:

void logInt16 ( int16_t  value  ) 

Save a signed, 16-bit value in the log.

Parameters:
value signed, 16-bit value

References logBuffer, and logIndex.

Referenced by main(), and psk31CreateDataPacket().

void logInt32 ( int32_t  value  ) 

Save a signed, 32-bit value in the log.

Parameters:
value signed, 32-bit value

References logBuffer, and logIndex.

Referenced by ballastLogEvent(), and sysLogGPSData().

void logSetDisableFlag ( bool_t  disableFlag  ) 

Enable and disable flash write operations.

This is used to share the SPI port between the flash and DDS.

Parameters:
disableFlag disable

References logDisableFlag.

Referenced by psk31TimeUpdate(), psk31TxPacket(), tncTimeUpdate(), and tncTxPacket().

void logType ( LOG_TYPE  type  ) 

Start a entry in the data log.

Parameters:
type of log entry, i.e. LOG_BOOTED, LOG_COORD, etc.

References logAddress, logBuffer, logFlush(), and logIndex.

Referenced by ballastLogEvent(), main(), psk31CreateDataPacket(), and sysLogGPSData().

Here is the call graph for this function:

void logUint16 ( uint16_t  value  ) 

Save an unsigned, 16-bit value in the log.

Parameters:
value unsigned, 16-bit value

References logBuffer, and logIndex.

Referenced by sysLogGPSData().

void logUint8 ( uint8_t  value  ) 

Save an unsigned, 8-bit value in the log.

Parameters:
value unsigned, 8-bit value

References logBuffer, and logIndex.

Referenced by ballastLogEvent(), main(), and sysLogGPSData().


Variable Documentation

Last used address in flash memory.

Referenced by logFlush(), logGetAddress(), logInit(), and logType().

uint8_t logBuffer[LOG_WRITE_BUFFER_SIZE]

Temporary buffer that holds data before it is written to flash device.

Referenced by logFlush(), logInt16(), logInt32(), logType(), logUint16(), and logUint8().

Flag that disable writes to flash.

Referenced by logFlush(), logInit(), and logSetDisableFlag().

Current index into log buffer.

Referenced by logFlush(), logInit(), logInt16(), logInt32(), logType(), logUint16(), and logUint8().


Generated on Sun Oct 5 11:29:37 2008 for HF-APRS Beacon by  doxygen 1.5.7