コード例 #1
0
void osResumeAllTasks(void)
{
#if !defined(osCMSIS_RTX)
   //Make sure the operating system is running
   if(osKernelRunning())
   {
      //Resume all tasks
      osThreadResumeAll();
   }
#endif
}
コード例 #2
0
ファイル: qf_port.c プロジェクト: sesamemucho/qsm_study
/*..........................................................................*/
int_t QF_run(void) {
    /* CMSIS-RTX must be initialized and started from the starupt code */
    Q_REQUIRE_ID(200, osKernelRunning());

    /* call-back to the application to configure and start interrupts.
    * In the RTX port, QF_onStartup() typically also calls QF_setRtxTicker().
    */
    QF_onStartup();

    /* CMSIS-RTOS starts thread execution with the function main().
    * This main thread will continue executing after osKernelStart().
    */
    for (;;) {  /* loop of the ticker thread */
        QF_onRtxTicker(); /* call-back to the app to handle the tick */
        osDelay(l_tickerPeriod); /* delay for the configurable period */
    }
#if defined (__GNUC__)
    return (int_t)0; /* dummy return to make the compiler happy */
#endif
}
コード例 #3
0
ファイル: qf_port.c プロジェクト: sesamemucho/qsm_study
/*..........................................................................*/
void QF_init(void) {
    /* CMSIS-RTX must be initialized and started from the starupt code. */
    Q_REQUIRE_ID(100, osKernelRunning());

    /* Special consideration for Cortex-M systems with the hardware FPU... */
#ifdef __TARGET_FPU_VFP
    /* Enable access to Floating-point coprocessor in NVIC_CPACR */
    (*((uint32_t volatile *)0xE000ED88U)) |= ((3U << 10*2) | (3U << 11*2));

    /* Explictily Disable the automatic FPU state preservation and
     * the FPU lazy stacking in SCB_FPCCR
     */
    (*((uint32_t volatile *)0xE000EF34U)) &= ~((1U << 31) | (1U << 30));
#endif /* __TARGET_FPU_VFP */

    /* The main thread will be used as the ticker thread; save its ID */
    l_tickerThreadId = osThreadGetId();

    /* set the default period of the ticker thread...
    * NOTE: can be changed later in QF_setRtxTicker()
    */
    l_tickerPeriod = 100000U;  /* [microseconds] */
}