Removed multiple debug prints

This commit is contained in:
dario 2024-06-04 22:51:45 +02:00
parent d378bda62c
commit 9fc8bc2b45

View File

@ -54,8 +54,6 @@ namespace sta
// Bytes remaining until the page is full. // Bytes remaining until the page is full.
uint8_t remaining = W25QXX_PAGE_SIZE - ptr_; uint8_t remaining = W25QXX_PAGE_SIZE - ptr_;
STA_DEBUG_PRINTF("Writing at address %d\n", address_ + ptr_);
// If the written data exceeds the remaining bytes in the page. // If the written data exceeds the remaining bytes in the page.
if (ptr_ + length >= W25QXX_PAGE_SIZE) if (ptr_ + length >= W25QXX_PAGE_SIZE)
{ {
@ -89,11 +87,16 @@ namespace sta
{ {
address_ = start_ * W25QXX_SECTOR_SIZE; address_ = start_ * W25QXX_SECTOR_SIZE;
ptr_ = 0; ptr_ = 0;
flash_->sectorErase(address_);
/*
for (uint32_t i = start_; i < end_; i++) for (uint32_t i = start_; i < end_; i++)
{ {
flash_->sectorErase(i * W25QXX_SECTOR_SIZE); flash_->sectorErase(i * W25QXX_SECTOR_SIZE);
} }
*/
} }
template <typename T> template <typename T>