#define FS_ACTIONS_DIR "NAVIGATE","NEW FILE","DELETE","RENAME"
#define FS_ACTIONS_FILE "READ","EDIT","DELETE","RENAME","SEND","UPLOAD"
static const char* const fs_actions_dir[] = { FS_ACTIONS_DIR };
static const char* const fs_actions_file[] = { FS_ACTIONS_FILE };
/*
void execute(uint8_t index, uint8_t action) {
char* label = (char*)actions[index];
label[3] = '\0';
Serial1.print("label: "); Serial1.println(label);
}
*/
void execute(uint8_t action, uint8_t type) {
//const char* const* actions = (type) ? fs_actions_dir : fs_actions_file;
char buf[4] = {'\0'};
strncpy(buf, ((const char*)((type) ? fs_actions_dir : fs_actions_file)[action]), 3);
Serial1.print("buf: "); Serial1.println(buf);
}
void setup() {
// put your setup code here, to run once:
Serial1.begin(115200);
Serial1.println("");
execute(0, 1);
for (int i=0; i<16; i++)
Serial1.print(i),
Serial1.print(" "),
Serial1.println(i,HEX);
}
void loop() {
// put your main code here, to run repeatedly:
delay(1); // this speeds up the simulation
}