Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: HttpClientSamlpe AsyncHttpdSample MbedFileServer TcpSocketClientSamlpe ... more
Fork of NySDFileSystem by
Diff: SDFileSystem.cpp
- Revision:
- 9:b2ca0e66c1f7
- Parent:
- 8:22ce3449b224
diff -r 22ce3449b224 -r b2ca0e66c1f7 SDFileSystem.cpp
--- a/SDFileSystem.cpp Sun Apr 28 12:23:28 2013 +0000
+++ b/SDFileSystem.cpp Tue Nov 12 03:41:14 2013 +0000
@@ -353,7 +353,7 @@
while (_spi.write(0xFF) != 0xFE);
// read data
- for (int i = 0; i < length; i++) {
+ for (uint32_t i = 0; i < length; i++) {
buffer[i] = _spi.write(0xFF);
}
_spi.write(0xFF); // checksum
@@ -371,7 +371,7 @@
_spi.write(0xFE);
// write the data
- for (int i = 0; i < length; i++) {
+ for (uint32_t i = 0; i < length; i++) {
_spi.write(buffer[i]);
}
@@ -397,7 +397,7 @@
static uint32_t ext_bits(unsigned char *data, int msb, int lsb) {
uint32_t bits = 0;
uint32_t size = 1 + msb - lsb;
- for (int i = 0; i < size; i++) {
+ for (uint32_t i = 0; i < size; i++) {
uint32_t position = lsb + i;
uint32_t byte = 15 - (position >> 3);
uint32_t bit = position & 0x7;
