   current_state = STATE_SHOW_DATA;
   screen.fillScreen(ILI9341_BLACK);  
   screen.setCursor(0, 0);
-  screen.setTextColor(ILI9341_WHITE);  screen.setTextSize(2);
+  screen.setTextColor(ILI9341_WHITE);  
+  screen.setTextSize(2);
   screen.println("The data:");
-  
+
   screen.setCursor(BOXSIZE*2, BOXSIZE*2);
   screen.println("MY SECRET DATA !!");
-  
-//  sd.showFile("test.txt");
-  
+
+  //  sd.showFile("test.txt");
+
   delay(3000);
 }
 

/**** display prepare functions ****/

void clearScreen() {
    screen.clearScreen();
}


void reset() {
  // reset all global variables
  current_state = STATE_RESET;
//  last_key_press_ms = 0;
//  last_key = 0;
  memset(nfc_key, 0, sizeof(nfc_key));
  nfc_key_count = 0;
  
  // show the splash screen
  showSplashScreen();
  
  // reset the sd card controller
  // sd.setup();
  
  // reset the touchscreen
  uint16_t x, y;
  uint8_t z;  

}

void doStateNfcKeyLogin() {
  // wait for the touch and show it
  if (screen.getTouchScreen().bufferEmpty()) {
    return;
  }
  if (! screen.getTouchScreen().touched()) {
    return;
  }


  // Retrieve a point  
  TS_Point p = screen.touchscreenGetPoint();
  /*
    if (p.z == 0) {
   return;
   }
   */

  // act on touchscreen interaction
  actOnTouchScreenInteraction(p.x, p.y, true);
}

void doStateNfcCardLogin() {

  // read the nfc card
  //uint8_t success;
  uint8_t uid[] = { 
    0, 0, 0, 0, 0, 0, 0   };                    // Buffer to store the returned UID
  uint8_t uidLength = nfclib.initTarget(&*uid);               // Length of the UID (4 or 7 bytes depending on ISO14443A card type)
  uidLength = nfclib.printTarget();   

  // show the data
  showDataScreen();

  // reset everything()
  reset();  
}

void doStateShowData() {
  // show the data
  showDataScreen();

  nextState();
}


