star tracker flash read
This commit is contained in:
@ -118,11 +118,10 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu
|
||||
* @brief Starts the flash read procedure
|
||||
*
|
||||
* @param path Path where file with read flash data will be created
|
||||
* @param region Region ID of flash region to read from
|
||||
* @param address Start address of flash section to read
|
||||
* @param startRegion Region form where to start reading
|
||||
* @param length Number of bytes to read from flash
|
||||
*/
|
||||
ReturnValue_t startFlashRead(std::string path, uint8_t region, uint32_t address, uint32_t length);
|
||||
ReturnValue_t startFlashRead(std::string path, uint8_t startRegion, uint32_t length);
|
||||
|
||||
/**
|
||||
* @brief Can be used to interrupt a running data transfer.
|
||||
@ -191,7 +190,7 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu
|
||||
static const uint8_t ADDRESS_OFFSET = 3;
|
||||
static const uint8_t LENGTH_OFFSET = 7;
|
||||
static const size_t CHUNK_SIZE = 1024;
|
||||
static const size_t CONFIG_MAX_DOWNLOAD_RETRIES = 2000;
|
||||
static const size_t CONFIG_MAX_DOWNLOAD_RETRIES = 3;
|
||||
static const uint32_t FLASH_ERASE_DELAY = 500;
|
||||
|
||||
enum class InternalState {
|
||||
@ -245,10 +244,7 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu
|
||||
// Default name of file containing the data read from flash, can be changed via command
|
||||
std::string filename = "flashread.bin";
|
||||
// Will be set with the flash read command
|
||||
uint8_t region = 0;
|
||||
// Will be set with the flash read command and specifies the start address of the flash section
|
||||
// to read
|
||||
uint32_t address = 0;
|
||||
uint8_t startRegion = 0;
|
||||
// Number of bytes to read from flash
|
||||
uint32_t size = 0;
|
||||
};
|
||||
@ -372,7 +368,15 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu
|
||||
*/
|
||||
ReturnValue_t unlockAndEraseRegions(uint32_t from, uint32_t to);
|
||||
|
||||
std::string makeFilename();
|
||||
/**
|
||||
* @brief Creates full filename either with timestamp or without
|
||||
*
|
||||
* @param path Path where to create the file
|
||||
* @param filename Name fo the file
|
||||
*
|
||||
* @return Full filename
|
||||
*/
|
||||
std::string makeFullFilename(std::string path, std::string filename);
|
||||
};
|
||||
|
||||
#endif /* BSP_Q7S_DEVICES_STRHELPER_H_ */
|
||||
|
Reference in New Issue
Block a user