add KPU and mobilenet demo, fix LCD bug

This commit is contained in:
Neucrack
2019-04-01 18:41:25 +08:00
parent eb16336cae
commit c19cb56c1a
17 changed files with 1535 additions and 10 deletions

View File

@@ -95,6 +95,22 @@ int File::read(void *buf, uint16_t nbyte) {
return 0;
}
long File::read(void *buf, uint32_t nbyte) {
if (!_file)
return 0;
uint32_t bytesToRead = nbyte;
uint16_t ret, readBytesOnece;
while(bytesToRead)
{
readBytesOnece = (bytesToRead>65000) ? 65000 : bytesToRead;
ret = (uint16_t)_file->read(buf+(nbyte-bytesToRead), readBytesOnece);
if(ret == 0xffff)
return -1;
bytesToRead -= ret;
}
return nbyte;
}
int File::available() {
if (! _file) return 0;