From 3ace15b04e944a8e70de0c7a74a2858a2e5a2c34 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 27 Dec 2019 11:43:07 +1100 Subject: [PATCH] AP_HAL: added erase() method to Storage class --- libraries/AP_HAL/Storage.cpp | 17 +++++++++++++++++ libraries/AP_HAL/Storage.h | 1 + 2 files changed, 18 insertions(+) create mode 100644 libraries/AP_HAL/Storage.cpp diff --git a/libraries/AP_HAL/Storage.cpp b/libraries/AP_HAL/Storage.cpp new file mode 100644 index 0000000000..ec9852ee93 --- /dev/null +++ b/libraries/AP_HAL/Storage.cpp @@ -0,0 +1,17 @@ +#include "AP_HAL.h" +#include "Storage.h" +#include + +/* + default erase method + */ +bool AP_HAL::Storage::erase(void) +{ + uint8_t blk[16] {}; + uint32_t ofs; + for (ofs=0; ofs