star tracker flash read

This commit is contained in:
Jakob Meier
2022-02-25 14:24:51 +01:00
parent 3593f5ab8c
commit e082f3973a
8 changed files with 2285 additions and 2291 deletions

View File

@ -48,6 +48,8 @@ class StarTrackerHandler : public DeviceHandlerBase {
void performOperationHook() override;
Submode_t getInitialSubmode() override;
static const Submode_t SUBMODE_BOOTLOADER = 1;
static const Submode_t SUBMODE_FIRMWARE = 2;
@ -183,11 +185,8 @@ class StarTrackerHandler : public DeviceHandlerBase {
class ReadCmd {
public:
static const uint8_t ADDRESS_OFFSET = 1;
static const uint8_t LENGTH_OFFSET = 5;
static const uint8_t FILE_OFFSET = 9;
// Minimum length of a read command (region, address, length and filename)
static const size_t MIN_LENGTH = 11;
// Minimum length of a read command (region, length and filename)
static const size_t MIN_LENGTH = 7;
};
class EraseCmd {
@ -408,7 +407,7 @@ class StarTrackerHandler : public DeviceHandlerBase {
*
* @return RETURN_OK if start of execution was successful, otherwise error return value
*/
ReturnValue_t executeReadCommand(const uint8_t* commandData, size_t commandDataLen);
ReturnValue_t executeFlashReadCommand(const uint8_t* commandData, size_t commandDataLen);
/**
* @brief Fills command buffer with data to boot image (works only when star tracker is