/** * \brief Main code entry point. */ int main( void ) { xTimerHandle xMonitorTimer; /* Prepare the hardware */ prvSetupHardware(); /* Init Prime Stack */ vPrimeStackInitTask(); /* Configure console */ configure_dbg_console(); puts(STRING_HEADER); /* Debug port for AppEmu */ if (!pio_get(PIN_APPEMU_PIO, PIN_APPEMU_TYPE, PIN_APPEMU_MASK)) { /* Init AppEmu Application */ vAppEmuInitTask(); } /* Create timer to monitor tasks execution */ xMonitorTimer = xTimerCreate( (const signed char *const)"Monitor timer", SIGNALLING_TIMER_RATE, pdTRUE, NULL, _prime_signalling ); configASSERT(xMonitorTimer); xTimerStart(xMonitorTimer, SIGNALLING_TIMER_RATE); /* Start the tasks and timer running. */ vTaskStartScheduler(); /* If all is well, the scheduler will now be running, and the following * line will never be reached. If the following line does execute, then * there was insufficient FreeRTOS heap memory available for the idle * and/or * timer tasks to be created. See the memory management section on the * FreeRTOS web site for more details. */ for (;;) { } }
/** * \brief Main code entry point. */ int main( void ) { /* Prepare the hardware */ prvSetupHardware(); /* Init Prime Stack OSS */ vPrimeStackInitTask(); /* Configure console */ configure_dbg_console(); puts(STRING_HEADER); /* Create timer to update counters in phy layer */ xSignallingTimer = xTimerCreate((const signed char *const)"Signal T", /* Debug name **/ SIGNALLING_TIMER_RATE, /* The timer period. */ pdTRUE, /* This is an auto-reload * timer, so xAutoReload is set * to pdTRUE. */ NULL, /* The timer does not use its * ID, so the ID is just set to * NULL. */ _prime_signalling /* The function that is * called each time the *timer * expires. */ ); configASSERT(xSignallingTimer); /* Start signalling timer */ xTimerStart(xSignallingTimer, SIGNALLING_TIMER_RATE); /* Start the tasks and timer running. */ vTaskStartScheduler(); /* If all is well, the scheduler will now be running, and the following * line will never be reached. If the following line does execute, then * there was insufficient FreeRTOS heap memory available for the idle * and/or * timer tasks to be created. See the memory management section on the * FreeRTOS web site for more details. */ for (;;) { } }
/** * \brief Main code entry point. */ int main( void ) { xTimerHandle xMonitorTimer; /* Prepare the hardware */ prvSetupHardware(); /* Init Prime Stack OSS */ vPrimeStackInitTask(); /* Configure console */ configure_dbg_console(); puts(STRING_HEADER); /* Create timer to monitor tasks execution */ xMonitorTimer = xTimerCreate( (const signed char *const)"Monitor timer", /* Text name for * debugging. **/ MONITOR_TIMER_RATE, /* The timer period. */ pdTRUE, /* This is an auto-reload timer, so xAutoReload * is set to pdTRUE.*/ NULL, /* The timer does not use its ID, so the ID is * just set to NULL. */ prvProcessMonitorTasks /* Function called each time the * timer expires. */ ); configASSERT(xMonitorTimer); xTimerStart(xMonitorTimer, MONITOR_BLOCK_TIME); /* Start the tasks and timer running. */ vTaskStartScheduler(); /* If all is well, the scheduler will now be running, and the following * line will never be reached. If the following line does execute, then * there was insufficient FreeRTOS heap memory available for the idle * and/or * timer tasks to be created. See the memory management section on the * FreeRTOS web site for more details. */ for (;;) { } }