1 /* SPDX-License-Identifier: GPL-2.0-only */
10 struct spi_slave slave
;
13 int spi_sdcard_init(struct spi_sdcard
*card
,
14 const unsigned int bus
,
15 const unsigned int cs
);
17 int spi_sdcard_single_read(const struct spi_sdcard
*card
,
21 int spi_sdcard_multiple_read(const struct spi_sdcard
*card
,
22 size_t start_block_address
,
23 size_t end_block_address
,
26 int spi_sdcard_single_write(const struct spi_sdcard
*card
,
30 int spi_sdcard_read(const struct spi_sdcard
*card
,
35 int spi_sdcard_multiple_write(const struct spi_sdcard
*card
,
36 size_t start_block_address
,
37 size_t end_block_address
,
40 int spi_sdcard_erase(const struct spi_sdcard
*card
,
41 size_t start_block_address
,
42 size_t end_block_address
);
44 int spi_sdcard_erase_all(const struct spi_sdcard
*card
);
46 /* get the sdcard size in bytes */
47 size_t spi_sdcard_size(const struct spi_sdcard
*card
);
49 #endif /* _SPI_SDCARD_H_ */