mirror of
https://github.com/nippur72/apple1-videocard-lib.git
synced 2024-09-27 06:54:25 +00:00
save bytes by moving tmp[] to globals
This commit is contained in:
parent
06ed8bfc4d
commit
3de30bf525
@ -204,6 +204,7 @@ const int ERR_RESPONSE = 255;
|
||||
const int OK_RESPONSE = 0;
|
||||
|
||||
char filename[64];
|
||||
char tmp[64];
|
||||
|
||||
// **************************************************************************************
|
||||
// **************************************************************************************
|
||||
@ -307,7 +308,6 @@ void comando_dir() {
|
||||
|
||||
void print_dir_entry(File dir, int what) {
|
||||
while (true) {
|
||||
if(TIMEOUT) break;
|
||||
File entry = dir.openNextFile();
|
||||
|
||||
if(!entry) {
|
||||
@ -317,7 +317,6 @@ void print_dir_entry(File dir, int what) {
|
||||
|
||||
// send file size or directory
|
||||
entry.getName(filename, 64);
|
||||
char tmp[40];
|
||||
|
||||
if((what == 0 && entry.isDirectory()) || (what == 1 && !entry.isDirectory())) {
|
||||
if(entry.isDirectory()) {
|
||||
@ -330,6 +329,8 @@ void print_dir_entry(File dir, int what) {
|
||||
send_byte_to_cpu(tmp[t]);
|
||||
if(TIMEOUT) break;
|
||||
}
|
||||
if(TIMEOUT) break;
|
||||
|
||||
Serial.println(tmp);
|
||||
}
|
||||
entry.close();
|
||||
|
Loading…
Reference in New Issue
Block a user