|
| DataLogger (uint8_t cs_pin, uint8_t led_pin, char *filename, SerialFlashFile file, uint32_t filesize) |
| class constructor pass the chip select pin as a parameter for that class instance
|
|
bool | loggerInit () |
| Initialize the flash memory.
|
|
void | loggerFormat () |
| format the flash memory
|
|
void | loggerInfo () |
| print the data about the flash memory
|
|
bool | loggerTest () |
| test the flash memory write and read function by reading and writing a variable to it
|
|
void | loggerWrite (telemetry_type_t) |
| write the provided data to the file created
|
|
void | loggerRead (uint8_t file_pointer, char buffer) |
| Read data from the start of the file to the end of the file.
|
|
void | loggerSpaces () |
| helper function to print spaces for data formatting
|
|
void | loggerEquals () |
| helper function to print = for data formatting
|
|
◆ DataLogger()
DataLogger::DataLogger |
( |
uint8_t | cs_pin, |
|
|
uint8_t | led_pin, |
|
|
char * | filename, |
|
|
SerialFlashFile | file, |
|
|
uint32_t | filesize ) |
class constructor pass the chip select pin as a parameter for that class instance
- Parameters
-
cs_pin | chip select pin |
flas_led | LED to show formatting status |
filename | the filename of the file being created |
file_size | the size of the file being created |
◆ loggerFormat()
void DataLogger::loggerFormat |
( |
| ) |
|
format the flash memory
- Parameters
-
◆ loggerInit()
bool DataLogger::loggerInit |
( |
| ) |
|
Initialize the flash memory.
- Returns
- true on success and false on fail
◆ loggerRead()
void DataLogger::loggerRead |
( |
uint8_t | file_pointer, |
|
|
char | buffer ) |
Read data from the start of the file to the end of the file.
- Parameters
-
_file_pointer | pointer to where we want to start reading the file. By default, this value os 0 |
buffer | char array to read the data into |
◆ loggerTest()
bool DataLogger::loggerTest |
( |
| ) |
|
test the flash memory write and read function by reading and writing a variable to it
- Parameters
-
- Returns
- true if R/W OK, false otherwise
◆ loggerWrite()
write the provided data to the file created
- Parameters
-
data | this is a struct pointer to the struct that contains the data that needs to be written to the memory |
The documentation for this class was generated from the following files: