fls->blk.blk_cnt = FLASH_MEM_SIZE / FLASH_PAGE_SIZE_BYTES;
}
-void flash_hw_init(Flash *fls)
+void flash_hw_init(Flash *fls, int flags)
{
common_init(fls);
fls->blk.priv.vt = &flash_at91_buffered_vt;
- fls->blk.priv.flags |= KB_BUFFERED | KB_PARTIAL_WRITE;
+ fls->blk.priv.flags |= KB_BUFFERED | KB_PARTIAL_WRITE | flags;
fls->blk.priv.buf = flash_buf;
/* Load the first block in the cache */
memcpy(fls->blk.priv.buf, (void *)(FLASH_BASE), fls->blk.blk_size);
}
-void flash_hw_initUnbuffered(Flash *fls)
+void flash_hw_initUnbuffered(Flash *fls, int flags)
{
common_init(fls);
fls->blk.priv.vt = &flash_at91_unbuffered_vt;
+ fls->blk.priv.flags |= flags;
}
}
-void flash_hw_init(Flash *fls)
+void flash_hw_init(Flash *fls, int flags)
{
common_init(fls);
fls->blk.priv.vt = &flash_avr_buffered_vt;
- fls->blk.priv.flags |= KB_BUFFERED | KB_PARTIAL_WRITE;
+ fls->blk.priv.flags |= KB_BUFFERED | KB_PARTIAL_WRITE | flags;
fls->blk.priv.buf = flash_buf;
}
-void flash_hw_initUnbuffered(Flash *fls)
+void flash_hw_initUnbuffered(Flash *fls, int flags)
{
common_init(fls);
fls->blk.priv.vt = &flash_avr_unbuffered_vt;
+ fls->blk.priv.flags |= flags;
}
}
-void flash_hw_init(Flash *fls)
+void flash_hw_init(Flash *fls, int flags);
{
common_init(fls);
fls->blk.priv.vt = &flash_lm3s_buffered_vt;
- fls->blk.priv.flags |= KB_BUFFERED | KB_PARTIAL_WRITE;
+ fls->blk.priv.flags |= KB_BUFFERED | KB_PARTIAL_WRITE | flags;
fls->blk.priv.buf = flash_buf;
/* Load the first block in the cache */
memcpy(fls->blk.priv.buf, flash_start, fls->blk.blk_size);
}
-void flash_hw_initUnbuffered(Flash *fls)
+void flash_hw_initUnbuffered(Flash *fls, int flags)
{
common_init(fls);
fls->blk.priv.vt = &flash_lm3s_unbuffered_vt;
+ fls->blk.priv.flags |= flags;
}
}
-void flash_hw_init(Flash *fls)
+void flash_hw_init(Flash *fls, int flags)
{
common_init(fls);
fls->blk.priv.vt = &flash_stm32_buffered_vt;
- fls->blk.priv.flags |= KB_BUFFERED | KB_PARTIAL_WRITE;
+ fls->blk.priv.flags |= KB_BUFFERED | KB_PARTIAL_WRITE | flags;
fls->blk.priv.buf = flash_buf;
/* Load the first block in the cache */
memcpy(fls->blk.priv.buf, flash_start, fls->blk.blk_size);
}
-void flash_hw_initUnbuffered(Flash *fls)
+void flash_hw_initUnbuffered(Flash *fls, int flags)
{
common_init(fls);
fls->blk.priv.vt = &flash_stm32_unbuffered_vt;
+ fls->blk.priv.flags |= flags;
}