Thanks PaulS-
Im at work and brought my stuff.. (so I can play/test a bit while Im learning)
Before I dive in.. I want to make sure I am correct when you said look at the documentation...
You meant look in .cpp file? (more so, the FatReader.cpp file) correct?
I found this:
//------------------------------------------------------------------------------
/**
* Read data from a file at starting at the current read position.
*
* \param[out] buf Pointer to the location that will receive the data.
*
* \param[in] count Maximum number of bytes to read.
*
* \return For success read() returns the number of bytes read.
* A value less than \a count, including zero, will be returned
* if end of file is reached.
* If an error occurs, read() returns -1. Possible errors include
* read() called before a file has been opened, corrupt file system
* or an I/O error occurred.
*/
int16_t FatReader::read(void *buf, uint16_t count) {
uint8_t *dst = (uint8_t *)buf;
uint16_t nr = 0;
int16_t n = 0;
while (nr < count && (n = readBlockData(dst, count - nr)) > 0) {
if (!seekCur(n)) return -1;
dst += n;
nr += n;
}
return n < 0 ? -1 : nr;
}
the param[in] param[out] stuff is a bit confusing....but the BUF (first param) says its a pointer to the location that will receive the data... is there where you got it can be an array type of 'location'?
Im going to dive into the code sample(s).. and see whats going on. (Im sure I'll be back)
thanks