 /***************************************************
-	@author:	bboortz
-	@license:	bsd license
-***************************************************/
+ * 	@author:	bboortz
+ * 	@license:	bsd license
+ ***************************************************/
 
 
 

}

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();
}



  current_state = STATE_SHOW_DATA;
  screen.fillScreen(ILI9341_BLACK);  
  screen.setCursor(0, 0);
  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");

  delay(3000);
}

