parameters: (self, byte_address, numbytes)
return_statement: return resp[:-1]
docstring: Reads a chunk of flash memory
  
          :param byte_address: start address
          :param numbytes: number of bytes
          :return: data read
docstring_summary: Reads a chunk of flash memory
docstring_tokens: Reads a chunk of flash memory
function: def read_flash_chunk(self, byte_address, numbytes):
          """
          Reads a chunk of flash memory
  
          :param byte_address: start address
          :param numbytes: number of bytes
          :return: data read
          """
          if numbytes > 512:
              raise ValueError("Read chunk too large!")
          if self.last_address != byte_address >> 1:
              self.load_address(byte_address >> 1)
          self.last_address += numbytes
          command = bytearray([AvrIspProtocol.SPI_CMD_READ_FLASH])
          command.extend(binary.pack_be16(numbytes))
          command.extend([AvrIspProtocol.AVR_READ_FLASH_COMMAND])
          resp = self._spi_cmd_resp(command)
          # Strip off status byte
          return resp[:-1]
function_tokens: def read_flash_chunk ( self , byte_address , numbytes ) : if numbytes > 512 : raise ValueError ( "Read chunk too large!" ) if self . last_address != byte_address >> 1 : self . load_address ( byte_address >> 1 ) self . last_address += numbytes command = bytearray ( [ AvrIspProtocol . SPI_CMD_READ_FLASH ] ) command . extend ( binary . pack_be16 ( numbytes ) ) command . extend ( [ AvrIspProtocol . AVR_READ_FLASH_COMMAND ] ) resp = self . _spi_cmd_resp ( command ) # Strip off status byte return resp [ : - 1 ]