STATIC_ASSERT(countof(addr_buf) <= sizeof(e2addr_t));
-
/* clamp size to memory limit (otherwise may roll back) */
- ASSERT(idx <= blk->blk_cnt);
+ ASSERT(idx < blk->priv.blk_start + blk->blk_cnt);
size = MIN(size, blk->blk_size - offset);
if (mem_info[eep->type].has_dev_addr)
STATIC_ASSERT(countof(addr_buf) <= sizeof(e2addr_t));
/* clamp size to memory limit (otherwise may roll back) */
- ASSERT(idx <= blk->blk.blk_cnt);
+ ASSERT(idx < blk->blk.priv.blk_start + blk->blk.blk_cnt);
size = MIN(size, blk->blk.blk_size - offset);
e2dev_addr_t dev_addr;
* \param type is the eeprom device we want to initialize (\see EepromType)
* \param i2c context for i2c channel
* \param addr is the i2c devide address (usually pins A0, A1, A2).
+ * \param verify enable the write check.
*/
void eeprom_init_5(Eeprom *eep, I2c *i2c, EepromType type, e2dev_addr_t addr, bool verify)
{