 **    init functions to initalize the application subsystems.
 */
 
-void
-AppInit()
-  {
-
-  /* Init program state variables.
-  */
-  cntBtnBlink = cntBlinkInit;
-  fbLedPmod = 0x01;
-  fbBtnPmod = 0;
-  xcoPmod = 0;
-  ycoPmod = 0;
-
-  /* Start with LED3 on and LED4 off
-  */
-  fLed3 = HIGH;
-  fLed4 = LOW;
-
+void AppInit() {
+    /* Init program state variables.
+    */
+    cntBtnBlink = cntBlinkInit;
+    fbLedPmod = 0x01;
+    fbBtnPmod = 0;
+    xcoPmod = 0;
+    ycoPmod = 0;
+    /* Start with LED3 on and LED4 off
+    */
+    fLed3 = HIGH;
+    fLed4 = LOW;
 }
 
 /* ------------------------------------------------------------ */

**    Perform basic board/device level initialization.
*/

void
DeviceInit()
{

  /* Set the LED pins to be outputs. Some boards support more
  ** than two LEDs. On those boards, also blink the additional
  ** LEDs.
  */
  pinMode(PIN_LED1, OUTPUT);
  pinMode(PIN_LED2, OUTPUT);
  
  #if defined(PIN_LED3)
  pinMode(PIN_LED3, OUTPUT);
  #endif
  
  #if defined(PIN_LED4)
  pinMode(PIN_LED4, OUTPUT);
  #endif

  /* Initialize the SPI port.
  ** Note: The pmodJSTK requires a delay of at least 6uS between
  ** bytes, so the delay is set to 6uS below.
  */
  spi.begin(pinSS, pinMOSI, pinMISO, pinSCK);
  spi.setSpeed(250000);
  spi.setMode(SSPI_MODE0);
  spi.setDirection(SSPI_SHIFT_LEFT);
  spi.setDelay(6);
  
}

/* ------------------------------------------------------------ */

**    Initialize the system.
*/

void setup() {
    DeviceInit();
    AppInit();
}

/* ------------------------------------------------------------ */
