/**
 * Title:        Flash TINI LED<p>
 * Description:
 *               Test program to flash CPU status LED (D1) connected to port 3, bit5
 *               of the Tini micro controller<p>
 *
 * Copyright:    Copyright (c) payman Habibelahi<p>
 * Company:      payman.com<p>
 * @author Payman Habibelahi
 * @version 1.1 Bruce Boyes, modified to work with Tini 1.0
 * @version 1.0 Payman Habibelahi
 */

package flash_led;

import com.dalsemi.comm.*;
import com.dalsemi.system.*;
//import com.dalsemi.jellybeans.*;


public class flash {

  public flash() {
  }

  public static void main(String[] args) {
  //TINIOS is a static method and can't be instantiated.
  //TINIOS OS = new TINIOS();                                       //get a reference to the TINI OS
  byte LEDselect = com.dalsemi.system.BitPort.Port3Bit5;          //set LEDSelect to selection code for the CPU status LED D1
  BitPort LEDdrive = new com.dalsemi.system.BitPort(LEDselect);   //get a reference to TINI CPU P3.5

  while (true){                   // forever
    LEDdrive.clear();               // LED off
    TINIOS.sleepProcess(1000);          // wait for 1 second
    LEDdrive.set();                 // LED on
    TINIOS.sleepProcess(1000);          // wait for 1 second
    }
  }
}