mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 13:44:32 +02:00
Remove error from tests.
This commit is contained in:
@@ -17,9 +17,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "esp_log.h"
|
|
||||||
|
|
||||||
static const char *TAG = "Flash_Emulator";
|
|
||||||
|
|
||||||
Flash_Emulator::Flash_Emulator(size_t size, size_t sector_sise, size_t min_size)
|
Flash_Emulator::Flash_Emulator(size_t size, size_t sector_sise, size_t min_size)
|
||||||
{
|
{
|
||||||
@@ -85,16 +82,12 @@ esp_err_t Flash_Emulator::erase_range(size_t start_address, size_t size)
|
|||||||
esp_err_t Flash_Emulator::write(size_t dest_addr, const void *src, size_t size)
|
esp_err_t Flash_Emulator::write(size_t dest_addr, const void *src, size_t size)
|
||||||
{
|
{
|
||||||
esp_err_t result = ESP_OK;
|
esp_err_t result = ESP_OK;
|
||||||
if ((size % this->min_size) != 0)
|
if ((size % this->min_size) != 0) {
|
||||||
{
|
|
||||||
result = ESP_ERR_INVALID_SIZE;
|
result = ESP_ERR_INVALID_SIZE;
|
||||||
ESP_LOGE(TAG, "%s - wrond size, result=%08x, size=%08x", __func__, result, size);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
if ((dest_addr % this->min_size) != 0)
|
if ((dest_addr % this->min_size) != 0) {
|
||||||
{
|
|
||||||
result = ESP_ERR_INVALID_SIZE;
|
result = ESP_ERR_INVALID_SIZE;
|
||||||
ESP_LOGE(TAG, "%s - wrong address, result=%08x, address=%08x", __func__, result, dest_addr);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
if ((this->reset_count != 0x7fffffff) && (this->reset_count != 0)) {
|
if ((this->reset_count != 0x7fffffff) && (this->reset_count != 0)) {
|
||||||
|
Reference in New Issue
Block a user