//----------------------------------------------------------------------------
//
// \brief   Main
//
//----------------------------------------------------------------------------


//---Includes-----------------------------------------------------------------


//---Objects/Variables--------------------------------------------------------


#include <arena/arena.h>
#include <arena_app.h>
#include <candis.h>

#if 0
#include <lepto/logoutput_console.h>
#include <HALWrapper/stm32_hal.h>    // REMAP
#include <biwak/usb.hpp>
#include <biwak/i2c_slave.h>
#include <biwak/input_decoder.h>
#include <biwak/usb_class.h>
#include <biwak/usb_device.h>
#include <biwak/flash_spi.hpp>
#include <biwak/flash_i2c.hpp>
#include <biwak/output_blink_modes.h>
#include <ocelli/clock.hpp>

#include <biwak/nvic.h>
#include <machine/endian.h>
#include <arpa/inet.h>

#include <campo/bringup.h>
#include <campo/bringupTests.hpp>
#include <campo/campo.h>      // campoCppEntry
#endif


//---Implementation-----------------------------------------------------------


int main(void)
{
   biwakInit();
   arenaInit();

   CCanDis *pCanDis=new CCanDis;
   setStdio( &pCanDis->m_uartDebug );

   biwakPrintBaseInfo();
   biwakPrintClockInfo();
   
   pCanDis->performTouchCalibration();

   while(1)
   {
      biwakEventLoop();
      usleep( USECS_PER_SEC / 24 );
   }

   return(0);
}


//---fin----------------------------------------------------------------------
