Lines Matching full:length
112 …25qxx_read(struct rt_mtd_nor_device *device, rt_off_t offset, rt_uint8_t *buffer, rt_size_t length) in w25qxx_read() argument
117 if((offset + length) > device->block_end * FLASH_BLOCK_SIZE) in w25qxx_read()
132 buffer, length); in w25qxx_read()
135 return length; in w25qxx_read()
138 …rite(struct rt_mtd_nor_device *device, rt_off_t offset, const rt_uint8_t *buffer, rt_size_t length) in w25qxx_write() argument
145 if((offset + length) > device->block_end * FLASH_BLOCK_SIZE) in w25qxx_write()
157 while(write_total < length) in w25qxx_write()
168 //address % FLASH_PAGE_SIZE + length in w25qxx_write()
169 if(((offset & (FLASH_PAGE_SIZE - 1)) + (length - write_total)) > FLASH_PAGE_SIZE) in w25qxx_write()
175 write_size = (length - write_total); in w25qxx_write()
193 return length; in w25qxx_write()
196 … rt_err_t w25qxx_erase_block(struct rt_mtd_nor_device *device, rt_off_t offset, rt_uint32_t length) in w25qxx_erase_block() argument
206 if((offset + length) > device->block_end * FLASH_BLOCK_SIZE) in w25qxx_erase_block()
209 /* check length must align to block size */ in w25qxx_erase_block()
210 if(length % device->block_size != 0) in w25qxx_erase_block()
212 rt_kprintf("param length = %d ,error\n",length); in w25qxx_erase_block()
221 while (erase_size < length) in w25qxx_erase_block()