diff options
author | Josh Blum <josh@joshknows.com> | 2010-12-18 00:09:55 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-12-18 00:09:55 -0800 |
commit | 4c3ba019003fea27577bcd91b2ff5f8cf0f4ac9b (patch) | |
tree | 2873a9856ae3a9cdac58d1e2535e496dc6130a62 /firmware/microblaze/usrp2p/spi_flash_read.c | |
parent | 4c98ef443b24955b2d266f5783cf5d26c04d3715 (diff) | |
download | uhd-4c3ba019003fea27577bcd91b2ff5f8cf0f4ac9b.tar.gz uhd-4c3ba019003fea27577bcd91b2ff5f8cf0f4ac9b.tar.bz2 uhd-4c3ba019003fea27577bcd91b2ff5f8cf0f4ac9b.zip |
usrp-n210: removed fw warnings, bootloader does full size 16k load
Diffstat (limited to 'firmware/microblaze/usrp2p/spi_flash_read.c')
-rw-r--r-- | firmware/microblaze/usrp2p/spi_flash_read.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/microblaze/usrp2p/spi_flash_read.c b/firmware/microblaze/usrp2p/spi_flash_read.c index 02155b209..36c326e96 100644 --- a/firmware/microblaze/usrp2p/spi_flash_read.c +++ b/firmware/microblaze/usrp2p/spi_flash_read.c @@ -100,8 +100,8 @@ spi_flash_read(uint32_t flash_addr, size_t nbytes, void *buf) * Read up to 16 bytes at a time until done */ unsigned char *dst = (unsigned char *) buf; - uint32_t m; - for (uint32_t n = 0; n < nbytes; n += m, dst += m){ + size_t m; + for (size_t n = 0; n < nbytes; n += m){ spif_regs->ctrl = FLAGS | LEN(16 * 8); // xfer 16 bytes spif_regs->ctrl = FLAGS | LEN(16 * 8) | SPI_CTRL_GO_BSY; @@ -115,7 +115,7 @@ spi_flash_read(uint32_t flash_addr, size_t nbytes, void *buf) unsigned char *src = (unsigned char *) &w[0]; m = min(nbytes - n, 16); for (size_t i = 0; i < m; i++) - dst[i] = src[i]; + *(dst++) = src[i]; } spif_regs->ss = 0; // deassert chip select } |