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. |
#define LOG_WRITE_BUFFER_SIZE 255 |
Number of bytes to buffer before writing to flash memory.
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().
uint32_t logGetAddress | ( | ) |
Last used address in flash memory.
This location is where the next log data will be written.
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().
void logInt16 | ( | int16_t | value | ) |
Save a signed, 16-bit value in the log.
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.
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.
disableFlag | disable |
References logDisableFlag.
Referenced by psk31TimeUpdate(), psk31TxPacket(), tncTimeUpdate(), and tncTxPacket().
void logType | ( | LOG_TYPE | type | ) |
Start a entry in the data log.
type | of log entry, i.e. LOG_BOOTED, LOG_COORD, etc. |
References logAddress, logBuffer, logFlush(), and logIndex.
Referenced by ballastLogEvent(), main(), psk31CreateDataPacket(), and sysLogGPSData().
void logUint16 | ( | uint16_t | value | ) |
Save an unsigned, 16-bit value in the log.
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.
value | unsigned, 8-bit value |
References logBuffer, and logIndex.
Referenced by ballastLogEvent(), main(), and sysLogGPSData().
Last used address in flash memory.
Referenced by logFlush(), logGetAddress(), logInit(), and logType().
Temporary buffer that holds data before it is written to flash device.
Referenced by logFlush(), logInt16(), logInt32(), logType(), logUint16(), and logUint8().
Current index into log buffer.
Referenced by logFlush(), logInit(), logInt16(), logInt32(), logType(), logUint16(), and logUint8().