Lines Matching +full:8 +full:- +full:byte
2 * Copyright (c) 2006-2018, RT-Thread Development Team
4 * SPDX-License-Identifier: Apache-2.0
8 * 2015-10-11 fullhan copy from winbond flash
38 #define CMD_RDSR1 (0x05) /* Read Status Register-1 */
42 #define CMD_RDSR2 (0x35) /* Read Status Register-2 */
54 rt_mutex_take(&flash_device->lock, RT_WAITING_FOREVER); in flash_lock()
59 rt_mutex_release(&flash_device->lock); in flash_unlock()
72 /** \brief read [size] byte from [offset] to [buffer]
74 * \param offset uint32_t unit : byte
76 * \param size uint32_t unit : byte
77 * \return uint32_t byte for read
89 send_buffer[2] = (uint8_t)(offset>>8); in w25qxx_read()
101 * \param page_addr uint32_t unit : byte (4096 * N,1 page = 4096byte)
111 RT_ASSERT((page_addr&0xFF) == 0); /* page addr must align to 256byte. */ in w25qxx_page_write()
118 send_buffer[2] = (page_addr >> 8); in w25qxx_page_write()
131 send_buffer[2] = (uint8_t)(page_addr >> 8); in w25qxx_page_write()
151 /* RT-Thread device interface */
192 if (geometry == RT_NULL) return -RT_ERROR; in w25qxx_flash_control()
194 geometry->bytes_per_sector = spi_flash_device.geometry.bytes_per_sector; in w25qxx_flash_control()
195 geometry->sector_count = spi_flash_device.geometry.sector_count; in w25qxx_flash_control()
196 geometry->block_size = spi_flash_device.geometry.block_size; in w25qxx_flash_control()
229 while(block--) in w25qxx_flash_write()
262 return -RT_ENOSYS; in gd_init()
269 return -RT_ENOSYS; in gd_init()
276 cfg.data_width = 8; in gd_init()
305 … FLASH_TRACE("JEDEC Read-ID Data : %02X %02X %02X\r\n", id_recv[0], id_recv[1], id_recv[2]); in gd_init()
306 return -RT_ENOSYS; in gd_init()
314 memory_type_capacity = (memory_type_capacity << 8) | id_recv[2]; in gd_init()
324 return -RT_ENOSYS; in gd_init()