/* find the continue 0xFF flash address to end address  */
uint32_t _fdb_continue_ff_addr(fdb_db_t db, uint32_t start, uint32_t end)
/* find the continue 0xFF flash address to end address  */
uint32_t _fdb_continue_ff_addr(fdb_db_t db, uint32_t start, uint32_t end)
{
        if (start + sizeof(buf) < end) {
            read_size = sizeof(buf);
        } else {
            read_size = end - start;
        }
        _fdb_flash_read(db, start, (uint32_t*)buf, read_size);
        for (i = 0; i < read_size; i++) {
            if (last_data != FDB_BYTE_ERASED && buf[i] == FDB_BYTE_ERASED) {
                addr = start + i;
            }
            last_data = buf[i];
        }
    }
    if (last_data == FDB_BYTE_ERASED) {
        return FDB_WG_ALIGN(addr);
    } else {
        return end;
    }
}