software/libbase/spisdcard: fix width of address parameter

Host address parameter types should match CPU word width, so
use `unsigned long` to be correct on both 32 and 64 bit CPUs.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
This commit is contained in:
Gabriel Somlo 2020-03-27 07:07:30 -04:00
parent 2e48ab568b
commit 540218b2d8
2 changed files with 2 additions and 2 deletions

View file

@ -3,4 +3,4 @@ int spi_sdcard_read_sector(uint32_t device, uint32_t lba,uint_least8_t *buf);
uint8_t spi_sdcard_goidle(void);
uint8_t spi_sdcard_readMBR(void);
uint8_t spi_sdcard_readFile(char *, char *, uint32_t);
uint8_t spi_sdcard_readFile(char *, char *, unsigned long);

View file

@ -523,7 +523,7 @@ uint8_t spi_sdcard_readMBR(void)
// Return 0 success, 1 failure
//
// Details from https://codeandlife.com/2012/04/02/simple-fat-and-sd-tutorial-part-1/
uint8_t spi_sdcard_readFile(char *filename, char *ext, uint32_t address)
uint8_t spi_sdcard_readFile(char *filename, char *ext, unsigned long address)
{
int i, n, sector;
uint16_t fileClusterStart;