diff options
Diffstat (limited to 'board/cr50/usb_spi_board.h')
-rw-r--r-- | board/cr50/usb_spi_board.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/board/cr50/usb_spi_board.h b/board/cr50/usb_spi_board.h index 1c40f0814d..7549b98f7f 100644 --- a/board/cr50/usb_spi_board.h +++ b/board/cr50/usb_spi_board.h @@ -9,3 +9,14 @@ int usb_spi_sha256_update(struct sha256_ctx *ctx, uint32_t offset, uint32_t size); void usb_spi_sha256_final(struct sha256_ctx *ctx, void *digest, size_t digest_size); + +/** + * Returns the content of SPI flash + * + * @param buf Buffer to write flash contents + * @param offset Flash offset to start reading from + * @param bytes Number of bytes to read. + * + * @return EC_SUCCESS, or non-zero if any error. + */ +int usb_spi_read_buffer(void *buf, unsigned int offset, size_t bytes); |