Defines | |
#define | LOG_WRITE_BUFFER_SIZE 40 |
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 | 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. |
#define LOG_WRITE_BUFFER_SIZE 40 |
Number of bytes to buffer before writing to flash memory.
Definition at line 1698 of file PicoBeacon.c.
void logFlush | ( | ) |
Write the contents of the temporary log buffer to the flash device.
If the buffer is empty, nothing is done.
Definition at line 1724 of file PicoBeacon.c.
References flashWriteBlock(), logAddress, logBuffer, 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.
Definition at line 1715 of file PicoBeacon.c.
References logAddress.
void logInit | ( | ) |
Prepare the flight data recorder for logging.
Definition at line 1738 of file PicoBeacon.c.
References flashReadBlock(), LOG_BOOTED, LOG_COORD, LOG_TEMPERATURE, LOG_VOLTAGE, logAddress, 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 |
Definition at line 1821 of file PicoBeacon.c.
References logBuffer, and logIndex.
Referenced by tncTxPacket().
void logInt32 | ( | int32_t | value | ) |
Save a signed, 32-bit value in the log.
value | signed, 32-bit value |
Definition at line 1843 of file PicoBeacon.c.
References logBuffer, and logIndex.
Referenced by sysLogGPSData().
void logType | ( | LOG_TYPE | type | ) |
Start a entry in the data log.
type | of log entry, i.e. LOG_BOOTED, LOG_COORD, etc. |
Definition at line 1792 of file PicoBeacon.c.
References logAddress, logBuffer, logFlush(), and logIndex.
Referenced by main(), sysLogGPSData(), sysLogVoltage(), and tncTxPacket().
void logUint16 | ( | uint16_t | value | ) |
Save an unsigned, 16-bit value in the log.
value | unsigned, 16-bit value |
Definition at line 1832 of file PicoBeacon.c.
References logBuffer, and logIndex.
Referenced by sysLogGPSData(), and sysLogVoltage().
void logUint8 | ( | uint8_t | value | ) |
Save an unsigned, 8-bit value in the log.
value | unsigned, 8-bit value |
Definition at line 1811 of file PicoBeacon.c.
References logBuffer, and logIndex.
Referenced by main(), and sysLogGPSData().
Last used address in flash memory.
Definition at line 1701 of file PicoBeacon.c.
Referenced by logFlush(), logGetAddress(), logInit(), and logType().
Temporary buffer that holds data before it is written to flash device.
Definition at line 1704 of file PicoBeacon.c.
Referenced by logFlush(), logInt16(), logInt32(), logType(), logUint16(), and logUint8().
Current index into log buffer.
Definition at line 1707 of file PicoBeacon.c.
Referenced by logFlush(), logInit(), logInt16(), logInt32(), logType(), logUint16(), and logUint8().