/***************************************************************************//** * @brief * Read Status Register of Device, Clear UART Tx Buffer * ******************************************************************************/ void get_status(void) { uint8_t status[2]; spiflash_read_status(2, status, NULL, NULL); printf("status = %02x %02x\r\n", status[0], status[1]); serial_tx_flush(); }
bool spiflash_device_ready(struct spiflash_dev *dev) { return !(spiflash_read_status(dev) & SPIFLASH_STATUS_BUSY); }