예제 #1
0
파일: debugput.c 프로젝트: brentr/charger
void logPanic(const char *panicTxt)
/*
  intended to be called from the SYSTEM_HALT_HOOK
*/
{
  if (!panicTxt)
    panicTxt = "<stack crash>";
  debugPuts("\nPANIC!");
  debugPuts(panicTxt);
  chSysLock();
  chSchGoSleepS(THD_STATE_FINAL);
}
예제 #2
0
파일: debug.cpp 프로젝트: kamnxt/opentx
void dump(unsigned char *data, unsigned int size)
{
  debugPuts("DUMP %d bytes ...\n\r", size);
  unsigned int i = 0, j=0;
  while (i*32+j < size) {
    debugPuts("%.2X ", data[i*32+j]);
    j++;
    if (j==32) {
      i++; j=0;
      debugPuts("\n\r");
    }
  }
  debugPuts("\n\r");
}
예제 #3
0
/*! \brief Main loop.
 *
 *  Most of the action is interrupt driven.  
 *
 * @return Never exits

*/
void main(void) {
   EnableInterrupts; /* enable interrupts */
   
   //TERMIO_Init();
   //initdebugMessageBuffer();
   
   //dprint("main():Starting\r\n");
   
   autoInitClock();
//   initCrystalClock(clockFactors[clksel_12MHz]);

#if (DEBUG&SCI_DEBUG) != 0)   
   debugSCIInit();
   debugPuts("main(): Starting\r");
#endif

   init();
   commandLoop(); // doesn't return
   
//   for(;;) {
//      dprint("main():Waiting\r\n");
//      wait();
//   }
}