docs: def read_status(self, num_bytes=2):
          """Read up to 24 bits (num_bytes) of SPI flash status register contents
          via RDSR, RDSR2, RDSR3 commands
  
          Not all SPI flash supports all three commands. The upper 1 or 2
          bytes may be 0xFF.
          """
          SPIFLASH_RDSR  = 0x05
          SPIFLASH_RDSR2 = 0x35
          SPIFLASH_RDSR3 = 0x15
  
          status = 0
          shift = 0
          for cmd in [SPIFLASH_RDSR, SPIFLASH_RDSR2, SPIFLASH_RDSR3][0:num_bytes]:
              status += self.run_spiflash_command(cmd, read_bits=8) << shift
              shift += 8
          return status