Esempio n. 1
0
int main(void){
	
	uint16_t byteCount = 0;
	char buffer0[32];
	
	HAL_Init();
	SYS_TimerInit();
	PHY_Init();
	NWK_Init();
	//SYS_INIT()
	timer3Init();
	uartInit();
	sei();

	while (1){
		
		SYS_TaskHandler();
		
		byteCount = uartAvailable();
		
		if(byteCount > 0){
			HAL_UartBytesReceived(byteCount);
			sprintf(buffer0, "Bytes to send: %i\n", byteCount);
			uartPuts(buffer0);
		}
		APP_TaskHandler();
	}
}
Esempio n. 2
0
/*************************************************************************//**
*****************************************************************************/
static bool appDataInd(NWK_DataInd_t *ind)
{
	for (uint8_t i = 0; i < ind->size; i++) {
		rx_data[i] = ind->data[i];
	}
	printf("received!");
	APP_TaskHandler();
	return true;
}
Esempio n. 3
0
int main(void)
{
	SYS_Init();
	HAL_UartInit(38400);
	HAL_LedInit();
	HAL_LedOff(0);

	init_nwk();
	startTimeoutTimer();
	while (1)
	{
		SYS_TaskHandler();
		HAL_UartTaskHandler();
		APP_TaskHandler();
	}
}
Esempio n. 4
0
int main(void)
{
	
    SYS_Init();

#if APP_COORDINATOR		
    sio2host_init();
#endif	
    		
    while (1)
    {
		
        SYS_TaskHandler();
	    APP_TaskHandler();
		
    }
}
Esempio n. 5
0
int main(void)
{
  SYS_Init();
  HAL_UartInit(38400);
#ifdef APP_ENABLE_OTA
  OTA_ClientInit();
#endif

  while (1)
  {
    SYS_TaskHandler();
    HAL_UartTaskHandler();
#ifdef APP_ENABLE_OTA
    OTA_ClientTaskHandler();
#endif
    APP_TaskHandler();
  }
}