Patch from David Gustafsson: break out SPI functions and fix bug in capacity

calculation.

Removed expensive modulo operations from sd_read and sd_write because the block size is now a variable. (nvt)
This commit is contained in:
nvt-se 2009-11-03 15:21:43 +00:00
parent 9b801b59c7
commit 9b4cd05e1f
4 changed files with 89 additions and 64 deletions

View file

@ -73,5 +73,8 @@
#define SD_READ_BLOCK_ATTEMPTS 2
int sd_arch_init(void);
void sd_arch_spi_write(int c);
void sd_arch_spi_write_block(uint8_t *bytes, int amount);
unsigned sd_arch_spi_read(void);
#endif /* !SD_ARCH_H */