Skip to content

Commit

Permalink
updated comments from template
Browse files Browse the repository at this point in the history
  • Loading branch information
itzandroidtab committed Oct 9, 2023
1 parent f9c987e commit b02fea4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions flash/flash_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ using memory = klib::hardware::memory::is25lq040b<spi, cs>;
#define CUSTOM_VERIFY (false)

/**
* @brief Allow changes in the sector arrangement on
* @brief Enable changes to the sector layout at runtime. Can be used to create
* one flash loader that supports multiple chips (like multiple variants of the
* same NOR flash)
*
*/
#define RUNTIME_SECTORS (false)
Expand Down Expand Up @@ -191,10 +193,10 @@ int __attribute__ ((noinline)) Init(const uint32_t address, const uint32_t frequ
// init the memory using the spi and cs
memory::init();

// wait until the device is not busy
while (memory::is_busy()) {
klib::delay<klib::busy_wait>(klib::time::ms{3});
}
// // wait until the device is not busy
// while (memory::is_busy()) {
// klib::delay<klib::busy_wait>(klib::time::ms{3});
// }

return 0;
}
Expand Down Expand Up @@ -341,7 +343,7 @@ int __attribute__ ((noinline)) SEGGER_OPEN_Program(uint32_t address, uint32_t si

// set the flash data
for (uint32_t i = 0; i < info->count; i++) {
// update every sector
// set every sector (data pointer points is not set to something specific)
info->sectors[i] = {
// set the start offset for the current sector
.offset = i * 0x100,
Expand Down

0 comments on commit b02fea4

Please sign in to comment.