Browse Source

StorageManager: added storage region for signing keys

master
Andrew Tridgell 9 years ago
parent
commit
ca39ece6cb
  1. 8
      libraries/StorageManager/StorageManager.cpp
  2. 7
      libraries/StorageManager/StorageManager.h

8
libraries/StorageManager/StorageManager.cpp

@ -44,8 +44,8 @@ const StorageManager::StorageArea StorageManager::layout_default[STORAGE_NUM_ARE @@ -44,8 +44,8 @@ const StorageManager::StorageArea StorageManager::layout_default[STORAGE_NUM_ARE
{ StorageParam, 4096, 1280},
{ StorageRally, 5376, 300},
{ StorageFence, 5676, 256},
{ StorageMission, 5932, 2132}, // leave 4 byte gap for PX4
// sentinal and expansion
{ StorageMission, 5932, 2132},
{ StorageKeys, 8064, 64},
#endif
#if STORAGE_NUM_AREAS >= 12
{ StorageParam, 8192, 1280},
@ -70,8 +70,8 @@ const StorageManager::StorageArea StorageManager::layout_copter[STORAGE_NUM_AREA @@ -70,8 +70,8 @@ const StorageManager::StorageArea StorageManager::layout_copter[STORAGE_NUM_AREA
{ StorageParam, 4096, 1280},
{ StorageRally, 5376, 300},
{ StorageFence, 5676, 256},
{ StorageMission, 5932, 2132}, // leave 128 byte gap for
// expansion and PX4 sentinal
{ StorageMission, 5932, 2132},
{ StorageKeys, 8064, 64},
#endif
#if STORAGE_NUM_AREAS >= 12
{ StorageParam, 8192, 1280},

7
libraries/StorageManager/StorageManager.h

@ -28,9 +28,9 @@ @@ -28,9 +28,9 @@
storage. Use larger areas for other boards
*/
#if HAL_STORAGE_SIZE >= 16384
#define STORAGE_NUM_AREAS 12
#define STORAGE_NUM_AREAS 13
#elif HAL_STORAGE_SIZE >= 8192
#define STORAGE_NUM_AREAS 8
#define STORAGE_NUM_AREAS 9
#elif HAL_STORAGE_SIZE >= 4096
#define STORAGE_NUM_AREAS 4
#else
@ -47,7 +47,8 @@ public: @@ -47,7 +47,8 @@ public:
StorageParam = 0,
StorageFence = 1,
StorageRally = 2,
StorageMission = 3
StorageMission = 3,
StorageKeys = 4
};
// erase whole of storage

Loading…
Cancel
Save