/* read data from multiple blocks of nand flash  */
uint32_t flash_read_multi_blocks(uint8_t *pBuf, uint32_t read_addr, uint16_t block_size, uint32_t block_num)
/* read data from multiple blocks of nand flash  */
uint32_t flash_read_multi_blocks(uint8_t *pBuf, uint32_t read_addr, uint16_t block_size, uint32_t block_num)
{
    uint32_t i;
    uint8_t *pSource = (uint8_t *)(read_addr + NAND_FLASH_BASE_ADDRESS);
    while (block_num--) {
        for (i = 0; i < block_size; i++) {
            *pBuf++ = *pSource++;
        }
    }
    return 0;
}