altos: Move ao_storage_erase to shared code. Add len
[fw/altos] / src / micropeak-v2.0 / ao_micropeak.c
index f3fbc9f42ca016041026086b88b0e562e84574a0..c0242b91d5d77a106c1013e9854ba3cd83c49f19 100644 (file)
@@ -167,9 +167,7 @@ ao_battery_voltage(void)
 static void
 ao_log_erase(void)
 {
-       uint32_t        pos;
-       for (pos = 0; pos < ao_storage_log_max; pos += ao_storage_block)
-               ao_storage_erase(pos);
+       ao_storage_erase(0, ao_storage_log_max);
 }
 
 uint8_t        ao_on_battery;