Пример #1
0
/**************************************************************************//**
 * @brief  Main function
 *****************************************************************************/
int main(void)
{
  CHIP_Init();

  // initializations
  initGPIO();
  /* Enable LCD without voltage boost */
  SegmentLCD_Init(false);
  setupSWOForPrint();

  updateLCD(getCapsenseCurrent());

  while (1)
  {
    updateGPIO();
    if (getCapsensePrevious() != getCapsenseCurrent())
    {
      updateLCD(getCapsenseCurrent());
      updateSWO();
    }
  }
}
Пример #2
0
// As SWO has to be accessible everywhere, including ISRs, we can't easily
// communicate the dependency on clocks etc. to other components - so this
// function checks that things appear to be set up, and if not re-configures
// everything
void swoPlatformEnsureInit(){
    if(!swoIsInitd())
        setupSWOForPrint();
}