Lines Matching refs:command
70 uint8_t command[16]; member
120 uint8_t *command; in spi_dataflash_erase() local
130 memset(dataflash->command, 0 , sizeof(dataflash->command)); in spi_dataflash_erase()
131 command = dataflash->command; in spi_dataflash_erase()
165 command[0] = do_block ? OP_ERASE_BLOCK : OP_ERASE_PAGE; in spi_dataflash_erase()
166 command[1] = (uint8_t)(pageaddr >> 16); in spi_dataflash_erase()
167 command[2] = (uint8_t)(pageaddr >> 8); in spi_dataflash_erase()
168 command[3] = 0; in spi_dataflash_erase()
172 command[0], command[1], command[2], command[3], in spi_dataflash_erase()
175 status = spi_flash_cmd_write(spi, command, 4, NULL, 0); in spi_dataflash_erase()
214 uint8_t *command; in spi_dataflash_read() local
221 memset(dataflash->command, 0 , sizeof(dataflash->command)); in spi_dataflash_read()
222 command = dataflash->command; in spi_dataflash_read()
226 command[0], command[1], command[2], command[3]); in spi_dataflash_read()
244 command[0] = OP_READ_CONTINUOUS; in spi_dataflash_read()
245 command[1] = (uint8_t)(addr >> 16); in spi_dataflash_read()
246 command[2] = (uint8_t)(addr >> 8); in spi_dataflash_read()
247 command[3] = (uint8_t)(addr >> 0); in spi_dataflash_read()
250 status = spi_flash_cmd_read(spi, command, 8, buf, len); in spi_dataflash_read()
269 uint8_t *command; in spi_dataflash_write() local
279 memset(dataflash->command, 0 , sizeof(dataflash->command)); in spi_dataflash_write()
280 command = dataflash->command; in spi_dataflash_write()
321 command[0] = OP_TRANSFER_BUF1; in spi_dataflash_write()
322 command[1] = (addr & 0x00FF0000) >> 16; in spi_dataflash_write()
323 command[2] = (addr & 0x0000FF00) >> 8; in spi_dataflash_write()
324 command[3] = 0; in spi_dataflash_write()
327 command[0], command[1], command[2], command[3]); in spi_dataflash_write()
329 status = spi_flash_cmd_write(spi, command, 4, NULL, 0); in spi_dataflash_write()
346 command[0] = OP_PROGRAM_VIA_BUF1; in spi_dataflash_write()
347 command[1] = (addr & 0x00FF0000) >> 16; in spi_dataflash_write()
348 command[2] = (addr & 0x0000FF00) >> 8; in spi_dataflash_write()
349 command[3] = (addr & 0x000000FF); in spi_dataflash_write()
352 command[0], command[1], command[2], command[3]); in spi_dataflash_write()
354 status = spi_flash_cmd_write(spi, command, in spi_dataflash_write()
370 command[0] = OP_COMPARE_BUF1; in spi_dataflash_write()
371 command[1] = (addr & 0x00FF0000) >> 16; in spi_dataflash_write()
372 command[2] = (addr & 0x0000FF00) >> 8; in spi_dataflash_write()
373 command[3] = 0; in spi_dataflash_write()
376 command[0], command[1], command[2], command[3]); in spi_dataflash_write()
378 status = spi_flash_cmd_write(spi, command, in spi_dataflash_write()